diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 8bd7f75292..692ab25bd4 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -4045,6 +4045,101 @@ components: type: string x-enum-varnames: - CCM_CONFIG_VALIDATION + AWSCloudAuthIntakeMappingAttributesResponse: + description: Attributes for AWS cloud authentication intake mapping response. + properties: + arn_pattern: + description: AWS caller ARN pattern allowed to authenticate for telemetry submission. ARN syntax and AWS integration membership are validated by the server. For an assumed role, use the STS assumed-role ARN with a trailing /* wildcard to match its sessions. + example: arn:aws:sts::123456789012:assumed-role/DatadogAgentRole/* + type: string + par_enrollment_enabled: + description: Whether the mapping allows Private Action Runner enrollment. This attribute may be omitted when enrollment is disabled. Enrollment permission is managed separately from the ARN pattern. + example: true + readOnly: true + type: boolean + required: + - arn_pattern + type: object + AWSCloudAuthIntakeMappingCreateAttributes: + description: Attributes for creating an AWS cloud authentication intake mapping. + properties: + arn_pattern: + description: AWS caller ARN pattern allowed to authenticate for telemetry submission. ARN syntax and AWS integration membership are validated by the server. For an assumed role, use the STS assumed-role ARN with a trailing /* wildcard to match its sessions. + example: arn:aws:sts::123456789012:assumed-role/DatadogAgentRole/* + minLength: 1 + type: string + required: + - arn_pattern + type: object + AWSCloudAuthIntakeMappingCreateData: + description: Data for creating an AWS cloud authentication intake mapping. + properties: + attributes: + $ref: "#/components/schemas/AWSCloudAuthIntakeMappingCreateAttributes" + type: + $ref: "#/components/schemas/AWSCloudAuthIntakeMappingType" + required: + - type + - attributes + type: object + AWSCloudAuthIntakeMappingCreateRequest: + description: Request used to create an AWS cloud authentication intake mapping. + properties: + data: + $ref: "#/components/schemas/AWSCloudAuthIntakeMappingCreateData" + required: + - data + type: object + AWSCloudAuthIntakeMappingDataResponse: + description: Data for AWS cloud authentication intake mapping response. + properties: + attributes: + $ref: "#/components/schemas/AWSCloudAuthIntakeMappingAttributesResponse" + id: + description: Unique identifier for the intake mapping. + example: c5c758c6-18c2-4484-ae3f-46b84128404a + type: string + type: + $ref: "#/components/schemas/AWSCloudAuthIntakeMappingType" + required: + - id + - type + - attributes + type: object + AWSCloudAuthIntakeMappingResponse: + description: Response containing a single AWS cloud authentication intake mapping. + properties: + data: + $ref: "#/components/schemas/AWSCloudAuthIntakeMappingDataResponse" + required: + - data + type: object + AWSCloudAuthIntakeMappingType: + description: Type identifier for AWS cloud authentication intake mapping. + enum: + - aws_cloud_auth_intake_mapping + example: aws_cloud_auth_intake_mapping + type: string + x-enum-varnames: + - AWS_CLOUD_AUTH_INTAKE_MAPPING + AWSCloudAuthIntakeMappingsData: + description: List of AWS cloud authentication intake mappings. + items: + $ref: "#/components/schemas/AWSCloudAuthIntakeMappingDataResponse" + type: array + AWSCloudAuthIntakeMappingsResponse: + description: Response containing a list of AWS cloud authentication intake mappings. + properties: + data: + $ref: "#/components/schemas/AWSCloudAuthIntakeMappingsData" + example: + - attributes: + arn_pattern: arn:aws:sts::123456789012:assumed-role/DatadogAgentRole/* + id: c5c758c6-18c2-4484-ae3f-46b84128404a + type: aws_cloud_auth_intake_mapping + required: + - data + type: object AWSCloudAuthPersonaMappingAttributesResponse: description: Attributes for AWS cloud authentication persona mapping response properties: @@ -256919,6 +257014,164 @@ paths: - generate_log_reports - manage_log_reports - product_analytics_saved_widgets_write + /api/v2/wif/aws/intake_mapping: + get: + description: List AWS cloud authentication intake mappings configured for the organization. + operationId: ListAWSCloudAuthIntakeMappings + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + arn_pattern: arn:aws:sts::123456789012:assumed-role/DatadogAgentRole/* + id: c5c758c6-18c2-4484-ae3f-46b84128404a + type: aws_cloud_auth_intake_mapping + schema: + $ref: "#/components/schemas/AWSCloudAuthIntakeMappingsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List AWS cloud authentication intake mappings + tags: + - Cloud Authentication + x-unstable: "**Note**: This endpoint is in public beta and is subject to change.\nIf you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/)." + post: + description: Create an AWS cloud authentication intake mapping to authorize an AWS ARN pattern for Agent authentication. The AWS account must already be integrated with Datadog, and managed API key rotation must be enabled for the organization. Patterns that conflict with existing intake or persona mappings are rejected. + operationId: CreateAWSCloudAuthIntakeMapping + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + arn_pattern: arn:aws:sts::123456789012:assumed-role/DatadogAgentRole/* + type: aws_cloud_auth_intake_mapping + schema: + $ref: "#/components/schemas/AWSCloudAuthIntakeMappingCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + arn_pattern: arn:aws:sts::123456789012:assumed-role/DatadogAgentRole/* + id: c5c758c6-18c2-4484-ae3f-46b84128404a + type: aws_cloud_auth_intake_mapping + schema: + $ref: "#/components/schemas/AWSCloudAuthIntakeMappingResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create an AWS cloud authentication intake mapping + tags: + - Cloud Authentication + x-codegen-request-body-name: body + x-unstable: "**Note**: This endpoint is in public beta and is subject to change.\nIf you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/)." + /api/v2/wif/aws/intake_mapping/{intake_mapping_id}: + delete: + description: Delete an AWS cloud authentication intake mapping by ID. + operationId: DeleteAWSCloudAuthIntakeMapping + parameters: + - $ref: "#/components/parameters/IntakeMappingID" + responses: + "204": + description: No Content + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete an AWS cloud authentication intake mapping + tags: + - Cloud Authentication + x-unstable: "**Note**: This endpoint is in public beta and is subject to change.\nIf you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/)." + get: + description: Get an AWS cloud authentication intake mapping by ID. + operationId: GetAWSCloudAuthIntakeMapping + parameters: + - $ref: "#/components/parameters/IntakeMappingID" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + arn_pattern: arn:aws:sts::123456789012:assumed-role/DatadogAgentRole/* + id: c5c758c6-18c2-4484-ae3f-46b84128404a + type: aws_cloud_auth_intake_mapping + schema: + $ref: "#/components/schemas/AWSCloudAuthIntakeMappingResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get an AWS cloud authentication intake mapping + tags: + - Cloud Authentication + x-unstable: "**Note**: This endpoint is in public beta and is subject to change.\nIf you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/)." /api/v2/wif/aws/persona_mapping: get: description: List all AWS cloud authentication persona mappings. This endpoint retrieves all configured persona mappings that associate AWS IAM principals with Datadog users. diff --git a/examples/v2/cloud-authentication/CreateAWSCloudAuthIntakeMapping.py b/examples/v2/cloud-authentication/CreateAWSCloudAuthIntakeMapping.py new file mode 100644 index 0000000000..44f2ace838 --- /dev/null +++ b/examples/v2/cloud-authentication/CreateAWSCloudAuthIntakeMapping.py @@ -0,0 +1,36 @@ +""" +Create an AWS cloud authentication intake mapping returns "Created" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_authentication_api import CloudAuthenticationApi +from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_create_attributes import ( + AWSCloudAuthIntakeMappingCreateAttributes, +) +from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_create_data import AWSCloudAuthIntakeMappingCreateData +from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_create_request import ( + AWSCloudAuthIntakeMappingCreateRequest, +) +from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_type import AWSCloudAuthIntakeMappingType + +# there is an integrated AWS test account for WIF +AWS_WIF_ACCOUNT_V2_DATA_0_ATTRIBUTES_AWS_ACCOUNT_ID = environ["AWS_WIF_ACCOUNT_V2_DATA_0_ATTRIBUTES_AWS_ACCOUNT_ID"] + +body = AWSCloudAuthIntakeMappingCreateRequest( + data=AWSCloudAuthIntakeMappingCreateData( + type=AWSCloudAuthIntakeMappingType.AWS_CLOUD_AUTH_INTAKE_MAPPING, + attributes=AWSCloudAuthIntakeMappingCreateAttributes( + arn_pattern="arn:aws:sts::123456789012:assumed-role/DatadogAgent-de20b7e944abfac3/*", + ), + ), +) + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["create_aws_cloud_auth_intake_mapping"] = True +with ApiClient(configuration) as api_client: + api_instance = CloudAuthenticationApi(api_client) + response = api_instance.create_aws_cloud_auth_intake_mapping(body=body) + + print(response) diff --git a/examples/v2/cloud-authentication/DeleteAWSCloudAuthIntakeMapping.py b/examples/v2/cloud-authentication/DeleteAWSCloudAuthIntakeMapping.py new file mode 100644 index 0000000000..ed7a5ce63b --- /dev/null +++ b/examples/v2/cloud-authentication/DeleteAWSCloudAuthIntakeMapping.py @@ -0,0 +1,19 @@ +""" +Delete an AWS cloud authentication intake mapping returns "No Content" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_authentication_api import CloudAuthenticationApi + +# there is a valid "aws_cloud_auth_intake_mapping" in the system +AWS_CLOUD_AUTH_INTAKE_MAPPING_DATA_ID = environ["AWS_CLOUD_AUTH_INTAKE_MAPPING_DATA_ID"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["delete_aws_cloud_auth_intake_mapping"] = True +with ApiClient(configuration) as api_client: + api_instance = CloudAuthenticationApi(api_client) + api_instance.delete_aws_cloud_auth_intake_mapping( + intake_mapping_id=AWS_CLOUD_AUTH_INTAKE_MAPPING_DATA_ID, + ) diff --git a/examples/v2/cloud-authentication/GetAWSCloudAuthIntakeMapping.py b/examples/v2/cloud-authentication/GetAWSCloudAuthIntakeMapping.py new file mode 100644 index 0000000000..9b9b36c96d --- /dev/null +++ b/examples/v2/cloud-authentication/GetAWSCloudAuthIntakeMapping.py @@ -0,0 +1,21 @@ +""" +Get an AWS cloud authentication intake mapping returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_authentication_api import CloudAuthenticationApi + +# there is a valid "aws_cloud_auth_intake_mapping" in the system +AWS_CLOUD_AUTH_INTAKE_MAPPING_DATA_ID = environ["AWS_CLOUD_AUTH_INTAKE_MAPPING_DATA_ID"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["get_aws_cloud_auth_intake_mapping"] = True +with ApiClient(configuration) as api_client: + api_instance = CloudAuthenticationApi(api_client) + response = api_instance.get_aws_cloud_auth_intake_mapping( + intake_mapping_id=AWS_CLOUD_AUTH_INTAKE_MAPPING_DATA_ID, + ) + + print(response) diff --git a/examples/v2/cloud-authentication/ListAWSCloudAuthIntakeMappings.py b/examples/v2/cloud-authentication/ListAWSCloudAuthIntakeMappings.py new file mode 100644 index 0000000000..838748ea6e --- /dev/null +++ b/examples/v2/cloud-authentication/ListAWSCloudAuthIntakeMappings.py @@ -0,0 +1,16 @@ +""" +List AWS cloud authentication intake mappings returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_authentication_api import CloudAuthenticationApi + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["list_aws_cloud_auth_intake_mappings"] = True +with ApiClient(configuration) as api_client: + api_instance = CloudAuthenticationApi(api_client) + response = api_instance.list_aws_cloud_auth_intake_mappings() + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 463badaf54..e3e10d4b7a 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -888,15 +888,19 @@ def __init__( "v2.get_web_integration_account": False, "v2.list_web_integration_accounts": False, "v2.update_web_integration_account": False, + "v2.create_aws_cloud_auth_intake_mapping": False, "v2.create_aws_cloud_auth_persona_mapping": False, "v2.create_git_hub_cloud_auth_intake_mapping": False, "v2.create_git_hub_cloud_auth_persona_mapping": False, + "v2.delete_aws_cloud_auth_intake_mapping": False, "v2.delete_aws_cloud_auth_persona_mapping": False, "v2.delete_git_hub_cloud_auth_intake_mapping": False, "v2.delete_git_hub_cloud_auth_persona_mapping": False, + "v2.get_aws_cloud_auth_intake_mapping": False, "v2.get_aws_cloud_auth_persona_mapping": False, "v2.get_git_hub_cloud_auth_intake_mapping": False, "v2.get_git_hub_cloud_auth_persona_mapping": False, + "v2.list_aws_cloud_auth_intake_mappings": False, "v2.list_aws_cloud_auth_persona_mappings": False, "v2.list_git_hub_cloud_auth_intake_mappings": False, "v2.list_git_hub_cloud_auth_persona_mappings": False, diff --git a/src/datadog_api_client/v2/api/cloud_authentication_api.py b/src/datadog_api_client/v2/api/cloud_authentication_api.py index 6b9637b819..6db891c2cf 100644 --- a/src/datadog_api_client/v2/api/cloud_authentication_api.py +++ b/src/datadog_api_client/v2/api/cloud_authentication_api.py @@ -7,6 +7,11 @@ from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.configuration import Configuration +from datadog_api_client.v2.model.aws_cloud_auth_intake_mappings_response import AWSCloudAuthIntakeMappingsResponse +from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_response import AWSCloudAuthIntakeMappingResponse +from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_create_request import ( + AWSCloudAuthIntakeMappingCreateRequest, +) from datadog_api_client.v2.model.aws_cloud_auth_persona_mappings_response import AWSCloudAuthPersonaMappingsResponse from datadog_api_client.v2.model.aws_cloud_auth_persona_mapping_response import AWSCloudAuthPersonaMappingResponse from datadog_api_client.v2.model.aws_cloud_auth_persona_mapping_create_request import ( @@ -40,6 +45,26 @@ def __init__(self, api_client=None): api_client = ApiClient(Configuration()) self.api_client = api_client + self._create_aws_cloud_auth_intake_mapping_endpoint = _Endpoint( + settings={ + "response_type": (AWSCloudAuthIntakeMappingResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/wif/aws/intake_mapping", + "operation_id": "create_aws_cloud_auth_intake_mapping", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (AWSCloudAuthIntakeMappingCreateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._create_aws_cloud_auth_persona_mapping_endpoint = _Endpoint( settings={ "response_type": (AWSCloudAuthPersonaMappingResponse,), @@ -100,6 +125,29 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._delete_aws_cloud_auth_intake_mapping_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/wif/aws/intake_mapping/{intake_mapping_id}", + "operation_id": "delete_aws_cloud_auth_intake_mapping", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "intake_mapping_id": { + "required": True, + "openapi_types": (str,), + "attribute": "intake_mapping_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + self._delete_aws_cloud_auth_persona_mapping_endpoint = _Endpoint( settings={ "response_type": None, @@ -169,6 +217,29 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_aws_cloud_auth_intake_mapping_endpoint = _Endpoint( + settings={ + "response_type": (AWSCloudAuthIntakeMappingResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/wif/aws/intake_mapping/{intake_mapping_id}", + "operation_id": "get_aws_cloud_auth_intake_mapping", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "intake_mapping_id": { + "required": True, + "openapi_types": (str,), + "attribute": "intake_mapping_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._get_aws_cloud_auth_persona_mapping_endpoint = _Endpoint( settings={ "response_type": (AWSCloudAuthPersonaMappingResponse,), @@ -238,6 +309,22 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_aws_cloud_auth_intake_mappings_endpoint = _Endpoint( + settings={ + "response_type": (AWSCloudAuthIntakeMappingsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/wif/aws/intake_mapping", + "operation_id": "list_aws_cloud_auth_intake_mappings", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_aws_cloud_auth_persona_mappings_endpoint = _Endpoint( settings={ "response_type": (AWSCloudAuthPersonaMappingsResponse,), @@ -286,6 +373,22 @@ def __init__(self, api_client=None): api_client=api_client, ) + def create_aws_cloud_auth_intake_mapping( + self, + body: AWSCloudAuthIntakeMappingCreateRequest, + ) -> AWSCloudAuthIntakeMappingResponse: + """Create an AWS cloud authentication intake mapping. + + Create an AWS cloud authentication intake mapping to authorize an AWS ARN pattern for Agent authentication. The AWS account must already be integrated with Datadog, and managed API key rotation must be enabled for the organization. Patterns that conflict with existing intake or persona mappings are rejected. + + :type body: AWSCloudAuthIntakeMappingCreateRequest + :rtype: AWSCloudAuthIntakeMappingResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_aws_cloud_auth_intake_mapping_endpoint.call_with_http_info(**kwargs) + def create_aws_cloud_auth_persona_mapping( self, body: AWSCloudAuthPersonaMappingCreateRequest, @@ -334,6 +437,23 @@ def create_git_hub_cloud_auth_persona_mapping( return self._create_git_hub_cloud_auth_persona_mapping_endpoint.call_with_http_info(**kwargs) + def delete_aws_cloud_auth_intake_mapping( + self, + intake_mapping_id: str, + ) -> None: + """Delete an AWS cloud authentication intake mapping. + + Delete an AWS cloud authentication intake mapping by ID. + + :param intake_mapping_id: The ID of the intake mapping + :type intake_mapping_id: str + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["intake_mapping_id"] = intake_mapping_id + + return self._delete_aws_cloud_auth_intake_mapping_endpoint.call_with_http_info(**kwargs) + def delete_aws_cloud_auth_persona_mapping( self, persona_mapping_id: str, @@ -385,6 +505,23 @@ def delete_git_hub_cloud_auth_persona_mapping( return self._delete_git_hub_cloud_auth_persona_mapping_endpoint.call_with_http_info(**kwargs) + def get_aws_cloud_auth_intake_mapping( + self, + intake_mapping_id: str, + ) -> AWSCloudAuthIntakeMappingResponse: + """Get an AWS cloud authentication intake mapping. + + Get an AWS cloud authentication intake mapping by ID. + + :param intake_mapping_id: The ID of the intake mapping + :type intake_mapping_id: str + :rtype: AWSCloudAuthIntakeMappingResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["intake_mapping_id"] = intake_mapping_id + + return self._get_aws_cloud_auth_intake_mapping_endpoint.call_with_http_info(**kwargs) + def get_aws_cloud_auth_persona_mapping( self, persona_mapping_id: str, @@ -436,6 +573,18 @@ def get_git_hub_cloud_auth_persona_mapping( return self._get_git_hub_cloud_auth_persona_mapping_endpoint.call_with_http_info(**kwargs) + def list_aws_cloud_auth_intake_mappings( + self, + ) -> AWSCloudAuthIntakeMappingsResponse: + """List AWS cloud authentication intake mappings. + + List AWS cloud authentication intake mappings configured for the organization. + + :rtype: AWSCloudAuthIntakeMappingsResponse + """ + kwargs: Dict[str, Any] = {} + return self._list_aws_cloud_auth_intake_mappings_endpoint.call_with_http_info(**kwargs) + def list_aws_cloud_auth_persona_mappings( self, ) -> AWSCloudAuthPersonaMappingsResponse: diff --git a/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_attributes_response.py b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_attributes_response.py new file mode 100644 index 0000000000..e696a7e7f9 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_attributes_response.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class AWSCloudAuthIntakeMappingAttributesResponse(ModelNormal): + @cached_property + def openapi_types(_): + return { + "arn_pattern": (str,), + "par_enrollment_enabled": (bool,), + } + + attribute_map = { + "arn_pattern": "arn_pattern", + "par_enrollment_enabled": "par_enrollment_enabled", + } + read_only_vars = { + "par_enrollment_enabled", + } + + def __init__(self_, arn_pattern: str, par_enrollment_enabled: Union[bool, UnsetType] = unset, **kwargs): + """ + Attributes for AWS cloud authentication intake mapping response. + + :param arn_pattern: AWS caller ARN pattern allowed to authenticate for telemetry submission. ARN syntax and AWS integration membership are validated by the server. For an assumed role, use the STS assumed-role ARN with a trailing /* wildcard to match its sessions. + :type arn_pattern: str + + :param par_enrollment_enabled: Whether the mapping allows Private Action Runner enrollment. This attribute may be omitted when enrollment is disabled. Enrollment permission is managed separately from the ARN pattern. + :type par_enrollment_enabled: bool, optional + """ + if par_enrollment_enabled is not unset: + kwargs["par_enrollment_enabled"] = par_enrollment_enabled + super().__init__(kwargs) + + self_.arn_pattern = arn_pattern diff --git a/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_create_attributes.py b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_create_attributes.py new file mode 100644 index 0000000000..e75446e79d --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_create_attributes.py @@ -0,0 +1,39 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class AWSCloudAuthIntakeMappingCreateAttributes(ModelNormal): + validations = { + "arn_pattern": { + "min_length": 1, + }, + } + + @cached_property + def openapi_types(_): + return { + "arn_pattern": (str,), + } + + attribute_map = { + "arn_pattern": "arn_pattern", + } + + def __init__(self_, arn_pattern: str, **kwargs): + """ + Attributes for creating an AWS cloud authentication intake mapping. + + :param arn_pattern: AWS caller ARN pattern allowed to authenticate for telemetry submission. ARN syntax and AWS integration membership are validated by the server. For an assumed role, use the STS assumed-role ARN with a trailing /* wildcard to match its sessions. + :type arn_pattern: str + """ + super().__init__(kwargs) + + self_.arn_pattern = arn_pattern diff --git a/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_create_data.py b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_create_data.py new file mode 100644 index 0000000000..dbc65a0805 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_create_data.py @@ -0,0 +1,54 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_create_attributes import ( + AWSCloudAuthIntakeMappingCreateAttributes, + ) + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_type import AWSCloudAuthIntakeMappingType + + +class AWSCloudAuthIntakeMappingCreateData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_create_attributes import ( + AWSCloudAuthIntakeMappingCreateAttributes, + ) + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_type import AWSCloudAuthIntakeMappingType + + return { + "attributes": (AWSCloudAuthIntakeMappingCreateAttributes,), + "type": (AWSCloudAuthIntakeMappingType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, attributes: AWSCloudAuthIntakeMappingCreateAttributes, type: AWSCloudAuthIntakeMappingType, **kwargs + ): + """ + Data for creating an AWS cloud authentication intake mapping. + + :param attributes: Attributes for creating an AWS cloud authentication intake mapping. + :type attributes: AWSCloudAuthIntakeMappingCreateAttributes + + :param type: Type identifier for AWS cloud authentication intake mapping. + :type type: AWSCloudAuthIntakeMappingType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_create_request.py b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_create_request.py new file mode 100644 index 0000000000..a8ccf09699 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_create_request.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_create_data import ( + AWSCloudAuthIntakeMappingCreateData, + ) + + +class AWSCloudAuthIntakeMappingCreateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_create_data import ( + AWSCloudAuthIntakeMappingCreateData, + ) + + return { + "data": (AWSCloudAuthIntakeMappingCreateData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: AWSCloudAuthIntakeMappingCreateData, **kwargs): + """ + Request used to create an AWS cloud authentication intake mapping. + + :param data: Data for creating an AWS cloud authentication intake mapping. + :type data: AWSCloudAuthIntakeMappingCreateData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_data_response.py b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_data_response.py new file mode 100644 index 0000000000..c302817cf7 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_data_response.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_attributes_response import ( + AWSCloudAuthIntakeMappingAttributesResponse, + ) + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_type import AWSCloudAuthIntakeMappingType + + +class AWSCloudAuthIntakeMappingDataResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_attributes_response import ( + AWSCloudAuthIntakeMappingAttributesResponse, + ) + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_type import AWSCloudAuthIntakeMappingType + + return { + "attributes": (AWSCloudAuthIntakeMappingAttributesResponse,), + "id": (str,), + "type": (AWSCloudAuthIntakeMappingType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: AWSCloudAuthIntakeMappingAttributesResponse, + id: str, + type: AWSCloudAuthIntakeMappingType, + **kwargs, + ): + """ + Data for AWS cloud authentication intake mapping response. + + :param attributes: Attributes for AWS cloud authentication intake mapping response. + :type attributes: AWSCloudAuthIntakeMappingAttributesResponse + + :param id: Unique identifier for the intake mapping. + :type id: str + + :param type: Type identifier for AWS cloud authentication intake mapping. + :type type: AWSCloudAuthIntakeMappingType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_response.py b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_response.py new file mode 100644 index 0000000000..ef212f72a6 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_response.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_data_response import ( + AWSCloudAuthIntakeMappingDataResponse, + ) + + +class AWSCloudAuthIntakeMappingResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_data_response import ( + AWSCloudAuthIntakeMappingDataResponse, + ) + + return { + "data": (AWSCloudAuthIntakeMappingDataResponse,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: AWSCloudAuthIntakeMappingDataResponse, **kwargs): + """ + Response containing a single AWS cloud authentication intake mapping. + + :param data: Data for AWS cloud authentication intake mapping response. + :type data: AWSCloudAuthIntakeMappingDataResponse + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_type.py b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_type.py new file mode 100644 index 0000000000..a164a8155c --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mapping_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AWSCloudAuthIntakeMappingType(ModelSimple): + """ + Type identifier for AWS cloud authentication intake mapping. + + :param value: If omitted defaults to "aws_cloud_auth_intake_mapping". Must be one of ["aws_cloud_auth_intake_mapping"]. + :type value: str + """ + + allowed_values = { + "aws_cloud_auth_intake_mapping", + } + AWS_CLOUD_AUTH_INTAKE_MAPPING: ClassVar["AWSCloudAuthIntakeMappingType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AWSCloudAuthIntakeMappingType.AWS_CLOUD_AUTH_INTAKE_MAPPING = AWSCloudAuthIntakeMappingType( + "aws_cloud_auth_intake_mapping" +) diff --git a/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mappings_response.py b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mappings_response.py new file mode 100644 index 0000000000..e5251dd397 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_cloud_auth_intake_mappings_response.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_data_response import ( + AWSCloudAuthIntakeMappingDataResponse, + ) + + +class AWSCloudAuthIntakeMappingsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_data_response import ( + AWSCloudAuthIntakeMappingDataResponse, + ) + + return { + "data": ([AWSCloudAuthIntakeMappingDataResponse],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[AWSCloudAuthIntakeMappingDataResponse], **kwargs): + """ + Response containing a list of AWS cloud authentication intake mappings. + + :param data: List of AWS cloud authentication intake mappings. + :type data: [AWSCloudAuthIntakeMappingDataResponse] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index b0fc519a61..0844b67aea 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -87,6 +87,22 @@ ) from datadog_api_client.v2.model.aws_ccm_config_validation_response_data import AWSCcmConfigValidationResponseData from datadog_api_client.v2.model.aws_ccm_config_validation_type import AWSCcmConfigValidationType +from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_attributes_response import ( + AWSCloudAuthIntakeMappingAttributesResponse, +) +from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_create_attributes import ( + AWSCloudAuthIntakeMappingCreateAttributes, +) +from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_create_data import AWSCloudAuthIntakeMappingCreateData +from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_create_request import ( + AWSCloudAuthIntakeMappingCreateRequest, +) +from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_data_response import ( + AWSCloudAuthIntakeMappingDataResponse, +) +from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_response import AWSCloudAuthIntakeMappingResponse +from datadog_api_client.v2.model.aws_cloud_auth_intake_mapping_type import AWSCloudAuthIntakeMappingType +from datadog_api_client.v2.model.aws_cloud_auth_intake_mappings_response import AWSCloudAuthIntakeMappingsResponse from datadog_api_client.v2.model.aws_cloud_auth_persona_mapping_attributes_response import ( AWSCloudAuthPersonaMappingAttributesResponse, ) @@ -13290,6 +13306,14 @@ "AWSCcmConfigValidationResponseAttributes", "AWSCcmConfigValidationResponseData", "AWSCcmConfigValidationType", + "AWSCloudAuthIntakeMappingAttributesResponse", + "AWSCloudAuthIntakeMappingCreateAttributes", + "AWSCloudAuthIntakeMappingCreateData", + "AWSCloudAuthIntakeMappingCreateRequest", + "AWSCloudAuthIntakeMappingDataResponse", + "AWSCloudAuthIntakeMappingResponse", + "AWSCloudAuthIntakeMappingType", + "AWSCloudAuthIntakeMappingsResponse", "AWSCloudAuthPersonaMappingAttributesResponse", "AWSCloudAuthPersonaMappingCreateAttributes", "AWSCloudAuthPersonaMappingCreateData", diff --git a/tests/generated-test/test-runner-data/manifest.json b/tests/generated-test/test-runner-data/manifest.json index 029a4a6a59..5b9ff71df7 100644 --- a/tests/generated-test/test-runner-data/manifest.json +++ b/tests/generated-test/test-runner-data/manifest.json @@ -4011,6 +4011,62 @@ "scenario": "Search tests events returns \"OK\" response with pagination", "version": "v2" }, + { + "feature": "Cloud Authentication", + "feature_file": "../../v2/features/cloud_authentication.feature", + "file": "v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-bad-request-response.json", + "scenario": "Create an AWS cloud authentication intake mapping returns \"Bad Request\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "feature_file": "../../v2/features/cloud_authentication.feature", + "file": "v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-conflict-response.json", + "scenario": "Create an AWS cloud authentication intake mapping returns \"Conflict\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "feature_file": "../../v2/features/cloud_authentication.feature", + "file": "v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-created-response.json", + "scenario": "Create an AWS cloud authentication intake mapping returns \"Created\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "feature_file": "../../v2/features/cloud_authentication.feature", + "file": "v2/cloud-authentication/delete-an-aws-cloud-authentication-intake-mapping-returns-no-content-response.json", + "scenario": "Delete an AWS cloud authentication intake mapping returns \"No Content\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "feature_file": "../../v2/features/cloud_authentication.feature", + "file": "v2/cloud-authentication/delete-an-aws-cloud-authentication-intake-mapping-returns-not-found-response.json", + "scenario": "Delete an AWS cloud authentication intake mapping returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "feature_file": "../../v2/features/cloud_authentication.feature", + "file": "v2/cloud-authentication/get-an-aws-cloud-authentication-intake-mapping-returns-not-found-response.json", + "scenario": "Get an AWS cloud authentication intake mapping returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "feature_file": "../../v2/features/cloud_authentication.feature", + "file": "v2/cloud-authentication/get-an-aws-cloud-authentication-intake-mapping-returns-ok-response.json", + "scenario": "Get an AWS cloud authentication intake mapping returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "feature_file": "../../v2/features/cloud_authentication.feature", + "file": "v2/cloud-authentication/list-aws-cloud-authentication-intake-mappings-returns-ok-response.json", + "scenario": "List AWS cloud authentication intake mappings returns \"OK\" response", + "version": "v2" + }, { "feature": "Cloud Cost Management", "feature_file": "../../v2/features/cloud_cost_management.feature", diff --git a/tests/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-bad-request-response.json b/tests/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-bad-request-response.json new file mode 100644 index 0000000000..9707fc0190 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-bad-request-response.json @@ -0,0 +1,33 @@ +{ + "api": "CloudAuthentication", + "expected_status": 400, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/Create an AWS cloud authentication intake mapping returns \"Bad Request\" response", + "operation_id": "CreateAWSCloudAuthIntakeMapping", + "request": { + "body": { + "schema": { + "format": null, + "ref": "AWSCloudAuthIntakeMappingCreateRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "arn_pattern": "not-an-arn" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/wif/aws/intake_mapping" + }, + "scenario": "Create an AWS cloud authentication intake mapping returns \"Bad Request\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-conflict-response.json b/tests/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-conflict-response.json new file mode 100644 index 0000000000..9e7b31e1ee --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-conflict-response.json @@ -0,0 +1,33 @@ +{ + "api": "CloudAuthentication", + "expected_status": 409, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/Create an AWS cloud authentication intake mapping returns \"Conflict\" response", + "operation_id": "CreateAWSCloudAuthIntakeMapping", + "request": { + "body": { + "schema": { + "format": null, + "ref": "AWSCloudAuthIntakeMappingCreateRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "arn_pattern": "arn:aws:sts::{{ aws_wif_account_v2.data[0].attributes.aws_account_id }}:assumed-role/DatadogAgent-{{ unique_hash }}/*" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/wif/aws/intake_mapping" + }, + "scenario": "Create an AWS cloud authentication intake mapping returns \"Conflict\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-created-response.json b/tests/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-created-response.json new file mode 100644 index 0000000000..74ef542fcb --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-created-response.json @@ -0,0 +1,33 @@ +{ + "api": "CloudAuthentication", + "expected_status": 201, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/Create an AWS cloud authentication intake mapping returns \"Created\" response", + "operation_id": "CreateAWSCloudAuthIntakeMapping", + "request": { + "body": { + "schema": { + "format": null, + "ref": "AWSCloudAuthIntakeMappingCreateRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "arn_pattern": "arn:aws:sts::{{ aws_wif_account_v2.data[0].attributes.aws_account_id }}:assumed-role/DatadogAgent-{{ unique_hash }}/*" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/wif/aws/intake_mapping" + }, + "scenario": "Create an AWS cloud authentication intake mapping returns \"Created\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/cloud-authentication/delete-an-aws-cloud-authentication-intake-mapping-returns-no-content-response.json b/tests/generated-test/test-runner-data/v2/cloud-authentication/delete-an-aws-cloud-authentication-intake-mapping-returns-no-content-response.json new file mode 100644 index 0000000000..d75dbf7134 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/cloud-authentication/delete-an-aws-cloud-authentication-intake-mapping-returns-no-content-response.json @@ -0,0 +1,35 @@ +{ + "api": "CloudAuthentication", + "expected_status": 204, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/Delete an AWS cloud authentication intake mapping returns \"No Content\" response", + "operation_id": "DeleteAWSCloudAuthIntakeMapping", + "request": { + "body": null, + "content_type": null, + "method": "DELETE", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "intake_mapping_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "aws_cloud_auth_intake_mapping.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/wif/aws/intake_mapping/{intake_mapping_id}" + }, + "scenario": "Delete an AWS cloud authentication intake mapping returns \"No Content\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/cloud-authentication/delete-an-aws-cloud-authentication-intake-mapping-returns-not-found-response.json b/tests/generated-test/test-runner-data/v2/cloud-authentication/delete-an-aws-cloud-authentication-intake-mapping-returns-not-found-response.json new file mode 100644 index 0000000000..f1762ee3da --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/cloud-authentication/delete-an-aws-cloud-authentication-intake-mapping-returns-not-found-response.json @@ -0,0 +1,35 @@ +{ + "api": "CloudAuthentication", + "expected_status": 404, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/Delete an AWS cloud authentication intake mapping returns \"Not Found\" response", + "operation_id": "DeleteAWSCloudAuthIntakeMapping", + "request": { + "body": null, + "content_type": null, + "method": "DELETE", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "intake_mapping_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "00000000-0000-0000-0000-000000000000" + }, + "style": null + } + ], + "path": "/api/v2/wif/aws/intake_mapping/{intake_mapping_id}" + }, + "scenario": "Delete an AWS cloud authentication intake mapping returns \"Not Found\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/cloud-authentication/get-an-aws-cloud-authentication-intake-mapping-returns-not-found-response.json b/tests/generated-test/test-runner-data/v2/cloud-authentication/get-an-aws-cloud-authentication-intake-mapping-returns-not-found-response.json new file mode 100644 index 0000000000..52242f9e73 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/cloud-authentication/get-an-aws-cloud-authentication-intake-mapping-returns-not-found-response.json @@ -0,0 +1,35 @@ +{ + "api": "CloudAuthentication", + "expected_status": 404, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/Get an AWS cloud authentication intake mapping returns \"Not Found\" response", + "operation_id": "GetAWSCloudAuthIntakeMapping", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "intake_mapping_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "00000000-0000-0000-0000-000000000000" + }, + "style": null + } + ], + "path": "/api/v2/wif/aws/intake_mapping/{intake_mapping_id}" + }, + "scenario": "Get an AWS cloud authentication intake mapping returns \"Not Found\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/cloud-authentication/get-an-aws-cloud-authentication-intake-mapping-returns-ok-response.json b/tests/generated-test/test-runner-data/v2/cloud-authentication/get-an-aws-cloud-authentication-intake-mapping-returns-ok-response.json new file mode 100644 index 0000000000..e58858a226 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/cloud-authentication/get-an-aws-cloud-authentication-intake-mapping-returns-ok-response.json @@ -0,0 +1,35 @@ +{ + "api": "CloudAuthentication", + "expected_status": 200, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/Get an AWS cloud authentication intake mapping returns \"OK\" response", + "operation_id": "GetAWSCloudAuthIntakeMapping", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "intake_mapping_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "aws_cloud_auth_intake_mapping.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/wif/aws/intake_mapping/{intake_mapping_id}" + }, + "scenario": "Get an AWS cloud authentication intake mapping returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/cloud-authentication/list-aws-cloud-authentication-intake-mappings-returns-ok-response.json b/tests/generated-test/test-runner-data/v2/cloud-authentication/list-aws-cloud-authentication-intake-mappings-returns-ok-response.json new file mode 100644 index 0000000000..33411a2460 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/cloud-authentication/list-aws-cloud-authentication-intake-mappings-returns-ok-response.json @@ -0,0 +1,18 @@ +{ + "api": "CloudAuthentication", + "expected_status": 200, + "feature": "Cloud Authentication", + "id": "v2/Cloud Authentication/List AWS cloud authentication intake mappings returns \"OK\" response", + "operation_id": "ListAWSCloudAuthIntakeMappings", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/wif/aws/intake_mapping" + }, + "scenario": "List AWS cloud authentication intake mappings returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-server-data/manifest.json b/tests/generated-test/test-server-data/manifest.json index 563b35eb13..ad02abee0b 100644 --- a/tests/generated-test/test-server-data/manifest.json +++ b/tests/generated-test/test-server-data/manifest.json @@ -220,6 +220,11 @@ "file": "v2/case-management-type.json", "version": "v2" }, + { + "feature": "Cloud Authentication", + "file": "v2/cloud-authentication.json", + "version": "v2" + }, { "feature": "Cloud Cost Management", "file": "v2/cloud-cost-management.json", diff --git a/tests/generated-test/test-server-data/v2/cloud-authentication.json b/tests/generated-test/test-server-data/v2/cloud-authentication.json new file mode 100644 index 0000000000..51afb51e7d --- /dev/null +++ b/tests/generated-test/test-server-data/v2/cloud-authentication.json @@ -0,0 +1,616 @@ +{ + "feature": "Cloud Authentication", + "recordings": [ + { + "feature": "Cloud Authentication", + "frozen_at": "2026-10-29T17:41:58.788Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "arn_pattern": "not-an-arn" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/aws/intake_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid ARN pattern format\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + } + ], + "scenario": "Create an AWS cloud authentication intake mapping returns \"Bad Request\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-10-29T17:41:58.958Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/integration/aws/accounts", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"00000000-0000-4000-8000-000000000001\",\"type\":\"account\",\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"DatadogIntegrationRole\",\"external_id\":\"00000000000000000000000000000000\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2026-07-29T13:00:24.231898Z\",\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[],\"log_source_config\":{\"tag_filters\":[]}}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/SQS\",\"AWS/ElasticMapReduce\",\"AWS/Usage\"]}},\"modified_at\":\"2026-07-29T13:00:24.231898Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[]}}}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-1577729b51a75aae/*" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/aws/intake_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"f4f3ca19-91bf-4e21-9424-ade6e1f26ff5\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-1577729b51a75aae/*\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-1577729b51a75aae/*" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/aws/intake_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"ARN pattern already exists in intake mapping\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Conflict", + "status": 409 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/aws/intake_mapping/f4f3ca19-91bf-4e21-9424-ade6e1f26ff5", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Create an AWS cloud authentication intake mapping returns \"Conflict\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-10-29T17:41:59.581Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/integration/aws/accounts", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"00000000-0000-4000-8000-000000000001\",\"type\":\"account\",\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"DatadogIntegrationRole\",\"external_id\":\"00000000000000000000000000000000\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2026-07-29T13:00:24.231898Z\",\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[],\"log_source_config\":{\"tag_filters\":[]}}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/SQS\",\"AWS/ElasticMapReduce\",\"AWS/Usage\"]}},\"modified_at\":\"2026-07-29T13:00:24.231898Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[]}}}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-484d2c17a502b020/*" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/aws/intake_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"6b882892-4b24-48cc-ae5a-951a868cf4f1\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-484d2c17a502b020/*\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/aws/intake_mapping/6b882892-4b24-48cc-ae5a-951a868cf4f1", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Create an AWS cloud authentication intake mapping returns \"Created\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-10-29T17:42:00.102Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/integration/aws/accounts", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"00000000-0000-4000-8000-000000000001\",\"type\":\"account\",\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"DatadogIntegrationRole\",\"external_id\":\"00000000000000000000000000000000\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2026-07-29T13:00:24.231898Z\",\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[],\"log_source_config\":{\"tag_filters\":[]}}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/SQS\",\"AWS/ElasticMapReduce\",\"AWS/Usage\"]}},\"modified_at\":\"2026-07-29T13:00:24.231898Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[]}}}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-e42cabb82e76a0b0/*" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/aws/intake_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"5f939215-97b2-41e9-930e-f0527336b0aa\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-e42cabb82e76a0b0/*\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/aws/intake_mapping/5f939215-97b2-41e9-930e-f0527336b0aa", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/aws/intake_mapping/5f939215-97b2-41e9-930e-f0527336b0aa", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Delete an AWS cloud authentication intake mapping returns \"No Content\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-10-29T17:42:00.690Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/aws/intake_mapping/00000000-0000-0000-0000-000000000000", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Delete an AWS cloud authentication intake mapping returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-10-29T17:42:00.815Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/wif/aws/intake_mapping/00000000-0000-0000-0000-000000000000", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Get an AWS cloud authentication intake mapping returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-10-29T17:42:00.943Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/integration/aws/accounts", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"00000000-0000-4000-8000-000000000001\",\"type\":\"account\",\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"DatadogIntegrationRole\",\"external_id\":\"00000000000000000000000000000000\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2026-07-29T13:00:24.231898Z\",\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[],\"log_source_config\":{\"tag_filters\":[]}}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/SQS\",\"AWS/ElasticMapReduce\",\"AWS/Usage\"]}},\"modified_at\":\"2026-07-29T13:00:24.231898Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[]}}}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-9f53d5ba800a7fdb/*" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/aws/intake_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"5283249d-a3a6-4291-88b6-e155bda4ab65\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-9f53d5ba800a7fdb/*\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/wif/aws/intake_mapping/5283249d-a3a6-4291-88b6-e155bda4ab65", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"5283249d-a3a6-4291-88b6-e155bda4ab65\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-9f53d5ba800a7fdb/*\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/aws/intake_mapping/5283249d-a3a6-4291-88b6-e155bda4ab65", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get an AWS cloud authentication intake mapping returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Cloud Authentication", + "frozen_at": "2026-10-29T17:42:01.510Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/integration/aws/accounts", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"00000000-0000-4000-8000-000000000001\",\"type\":\"account\",\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"DatadogIntegrationRole\",\"external_id\":\"00000000000000000000000000000000\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2026-07-29T13:00:24.231898Z\",\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[],\"log_source_config\":{\"tag_filters\":[]}}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/SQS\",\"AWS/ElasticMapReduce\",\"AWS/Usage\"]}},\"modified_at\":\"2026-07-29T13:00:24.231898Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[]}}}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "arn_pattern": "arn:aws:sts::123456789012:assumed-role/DatadogAgent-ddf9858670106ffb/*" + }, + "type": "aws_cloud_auth_intake_mapping" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/wif/aws/intake_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"80586b57-c847-4a6d-8e02-2e2c185996d0\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-ddf9858670106ffb/*\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/wif/aws/intake_mapping", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"80586b57-c847-4a6d-8e02-2e2c185996d0\",\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::123456789012:assumed-role/DatadogAgent-ddf9858670106ffb/*\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/wif/aws/intake_mapping/80586b57-c847-4a6d-8e02-2e2c185996d0", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "List AWS cloud authentication intake mappings returns \"OK\" response", + "version": "v2" + } + ], + "schema_version": 1, + "version": "v2" +} diff --git a/tests/v2/features/cloud_authentication.feature b/tests/v2/features/cloud_authentication.feature index 6debf5b1d0..02d93adbd2 100644 --- a/tests/v2/features/cloud_authentication.feature +++ b/tests/v2/features/cloud_authentication.feature @@ -56,6 +56,36 @@ Feature: Cloud Authentication When the request is sent Then the response status is 201 Created + @team:ddoghq/team-aaaauthn + Scenario: Create an AWS cloud authentication intake mapping returns "Bad Request" response + Given operation "CreateAWSCloudAuthIntakeMapping" enabled + And new "CreateAWSCloudAuthIntakeMapping" request + And body with value {"data": {"attributes": {"arn_pattern": "not-an-arn"}, "type": "aws_cloud_auth_intake_mapping"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:ddoghq/team-aaaauthn + Scenario: Create an AWS cloud authentication intake mapping returns "Conflict" response + Given there is an integrated AWS test account for WIF + And there is a valid "aws_cloud_auth_intake_mapping" in the system + And operation "CreateAWSCloudAuthIntakeMapping" enabled + And new "CreateAWSCloudAuthIntakeMapping" request + And body with value {"data":{"type":"aws_cloud_auth_intake_mapping","attributes":{"arn_pattern":"arn:aws:sts::{{ aws_wif_account_v2.data[0].attributes.aws_account_id }}:assumed-role/DatadogAgent-{{ unique_hash }}/*"}}} + When the request is sent + Then the response status is 409 Conflict + + @team:ddoghq/team-aaaauthn + Scenario: Create an AWS cloud authentication intake mapping returns "Created" response + Given there is an integrated AWS test account for WIF + And operation "CreateAWSCloudAuthIntakeMapping" enabled + And new "CreateAWSCloudAuthIntakeMapping" request + And body with value {"data":{"type":"aws_cloud_auth_intake_mapping","attributes":{"arn_pattern":"arn:aws:sts::{{ aws_wif_account_v2.data[0].attributes.aws_account_id }}:assumed-role/DatadogAgent-{{ unique_hash }}/*"}}} + When the request is sent + Then the response status is 201 Created + And the response "data.type" is equal to "aws_cloud_auth_intake_mapping" + And the response "data" has field "id" + And the response "data.attributes.arn_pattern" is equal to "arn:aws:sts::{{ aws_wif_account_v2.data[0].attributes.aws_account_id }}:assumed-role/DatadogAgent-{{ unique_hash }}/*" + @generated @skip @team:ddoghq/team-aaaauthn Scenario: Create an AWS cloud authentication persona mapping returns "Bad Request" response Given operation "CreateAWSCloudAuthPersonaMapping" enabled @@ -112,6 +142,24 @@ Feature: Cloud Authentication When the request is sent Then the response status is 404 Not Found + @team:ddoghq/team-aaaauthn + Scenario: Delete an AWS cloud authentication intake mapping returns "No Content" response + Given there is an integrated AWS test account for WIF + And there is a valid "aws_cloud_auth_intake_mapping" in the system + And operation "DeleteAWSCloudAuthIntakeMapping" enabled + And new "DeleteAWSCloudAuthIntakeMapping" request + And request contains "intake_mapping_id" parameter from "aws_cloud_auth_intake_mapping.data.id" + When the request is sent + Then the response status is 204 No Content + + @team:ddoghq/team-aaaauthn + Scenario: Delete an AWS cloud authentication intake mapping returns "Not Found" response + Given operation "DeleteAWSCloudAuthIntakeMapping" enabled + And new "DeleteAWSCloudAuthIntakeMapping" request + And request contains "intake_mapping_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:ddoghq/team-aaaauthn Scenario: Delete an AWS cloud authentication persona mapping returns "No Content" response Given operation "DeleteAWSCloudAuthPersonaMapping" enabled @@ -160,6 +208,26 @@ Feature: Cloud Authentication When the request is sent Then the response status is 200 OK + @team:ddoghq/team-aaaauthn + Scenario: Get an AWS cloud authentication intake mapping returns "Not Found" response + Given operation "GetAWSCloudAuthIntakeMapping" enabled + And new "GetAWSCloudAuthIntakeMapping" request + And request contains "intake_mapping_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @team:ddoghq/team-aaaauthn + Scenario: Get an AWS cloud authentication intake mapping returns "OK" response + Given there is an integrated AWS test account for WIF + And there is a valid "aws_cloud_auth_intake_mapping" in the system + And operation "GetAWSCloudAuthIntakeMapping" enabled + And new "GetAWSCloudAuthIntakeMapping" request + And request contains "intake_mapping_id" parameter from "aws_cloud_auth_intake_mapping.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.id" has the same value as "aws_cloud_auth_intake_mapping.data.id" + And the response "data.attributes.arn_pattern" is equal to "arn:aws:sts::{{ aws_wif_account_v2.data[0].attributes.aws_account_id }}:assumed-role/DatadogAgent-{{ unique_hash }}/*" + @generated @skip @team:ddoghq/team-aaaauthn Scenario: Get an AWS cloud authentication persona mapping returns "Not Found" response Given operation "GetAWSCloudAuthPersonaMapping" enabled @@ -176,6 +244,23 @@ Feature: Cloud Authentication When the request is sent Then the response status is 200 OK + @generated @skip @team:ddoghq/team-aaaauthn + Scenario: List AWS cloud authentication intake mappings returns "Bad Request" response + Given operation "ListAWSCloudAuthIntakeMappings" enabled + And new "ListAWSCloudAuthIntakeMappings" request + When the request is sent + Then the response status is 400 Bad Request + + @team:ddoghq/team-aaaauthn + Scenario: List AWS cloud authentication intake mappings returns "OK" response + Given there is an integrated AWS test account for WIF + And there is a valid "aws_cloud_auth_intake_mapping" in the system + And operation "ListAWSCloudAuthIntakeMappings" enabled + And new "ListAWSCloudAuthIntakeMappings" request + When the request is sent + Then the response status is 200 OK + And the response "data" has item with field "id" with value "{{ aws_cloud_auth_intake_mapping.data.id }}" + @generated @skip @team:ddoghq/team-aaaauthn Scenario: List AWS cloud authentication persona mappings returns "Bad Request" response Given operation "ListAWSCloudAuthPersonaMappings" enabled diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index 860416b2d9..859600cfb7 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -850,6 +850,12 @@ "tag": "Incidents", "operationId": "CreateIncidentTodo" }, + { + "step": "there is an integrated AWS test account for WIF", + "key": "aws_wif_account_v2", + "tag": "AWS Integration", + "operationId": "ListAWSAccounts" + }, { "parameters": [ { @@ -2191,6 +2197,18 @@ "tag": "Web Integrations", "operationId": "CreateWebIntegrationAccount" }, + { + "parameters": [ + { + "name": "body", + "value": "{\"data\":{\"type\":\"aws_cloud_auth_intake_mapping\",\"attributes\":{\"arn_pattern\":\"arn:aws:sts::{{ aws_wif_account_v2.data[0].attributes.aws_account_id }}:assumed-role/DatadogAgent-{{ unique_hash }}/*\"}}}" + } + ], + "step": "there is a valid \"aws_cloud_auth_intake_mapping\" in the system", + "key": "aws_cloud_auth_intake_mapping", + "tag": "Cloud Authentication", + "operationId": "CreateAWSCloudAuthIntakeMapping" + }, { "parameters": [ { diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 4c993af33b..41a80bf646 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -11513,6 +11513,37 @@ "type": "safe" } }, + "ListAWSCloudAuthIntakeMappings": { + "tag": "Cloud Authentication", + "undo": { + "type": "safe" + } + }, + "CreateAWSCloudAuthIntakeMapping": { + "tag": "Cloud Authentication", + "undo": { + "operationId": "DeleteAWSCloudAuthIntakeMapping", + "parameters": [ + { + "name": "intake_mapping_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteAWSCloudAuthIntakeMapping": { + "tag": "Cloud Authentication", + "undo": { + "type": "idempotent" + } + }, + "GetAWSCloudAuthIntakeMapping": { + "tag": "Cloud Authentication", + "undo": { + "type": "safe" + } + }, "ListAWSCloudAuthPersonaMappings": { "tag": "Cloud Authentication", "undo": {