From c79d64827f5cccfb86fb8367412c11a732036fa4 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 30 Oct 2026 14:39:05 +0000 Subject: [PATCH] Regenerate client from commit 2b22c81 of spec repo --- .generator/schemas/v2/openapi.yaml | 253 +++++++ .../CreateAWSCloudAuthIntakeMapping.rb | 21 + .../DeleteAWSCloudAuthIntakeMapping.rb | 12 + .../GetAWSCloudAuthIntakeMapping.rb | 12 + .../ListAWSCloudAuthIntakeMappings.rb | 9 + features/scenarios_model_mapping.rb | 9 + features/v2/cloud_authentication.feature | 85 +++ features/v2/given.json | 18 + features/v2/undo.json | 31 + generated-test/test-runner-data/manifest.json | 56 ++ ...-mapping-returns-bad-request-response.json | 33 + ...ake-mapping-returns-conflict-response.json | 33 + ...take-mapping-returns-created-response.json | 33 + ...e-mapping-returns-no-content-response.json | 35 + ...ke-mapping-returns-not-found-response.json | 35 + ...ke-mapping-returns-not-found-response.json | 35 + ...on-intake-mapping-returns-ok-response.json | 35 + ...n-intake-mappings-returns-ok-response.json | 18 + generated-test/test-server-data/manifest.json | 5 + .../v2/cloud-authentication.json | 616 ++++++++++++++++++ lib/datadog_api_client/configuration.rb | 4 + lib/datadog_api_client/inflector.rb | 8 + .../v2/api/cloud_authentication_api.rb | 281 ++++++++ ...auth_intake_mapping_attributes_response.rb | 133 ++++ ...d_auth_intake_mapping_create_attributes.rb | 127 ++++ ...s_cloud_auth_intake_mapping_create_data.rb | 144 ++++ ...loud_auth_intake_mapping_create_request.rb | 123 ++++ ...cloud_auth_intake_mapping_data_response.rb | 165 +++++ .../aws_cloud_auth_intake_mapping_response.rb | 123 ++++ .../aws_cloud_auth_intake_mapping_type.rb | 26 + ...aws_cloud_auth_intake_mappings_response.rb | 125 ++++ 31 files changed, 2643 insertions(+) create mode 100644 examples/v2/cloud-authentication/CreateAWSCloudAuthIntakeMapping.rb create mode 100644 examples/v2/cloud-authentication/DeleteAWSCloudAuthIntakeMapping.rb create mode 100644 examples/v2/cloud-authentication/GetAWSCloudAuthIntakeMapping.rb create mode 100644 examples/v2/cloud-authentication/ListAWSCloudAuthIntakeMappings.rb create mode 100644 generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-bad-request-response.json create mode 100644 generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-conflict-response.json create mode 100644 generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-created-response.json create mode 100644 generated-test/test-runner-data/v2/cloud-authentication/delete-an-aws-cloud-authentication-intake-mapping-returns-no-content-response.json create mode 100644 generated-test/test-runner-data/v2/cloud-authentication/delete-an-aws-cloud-authentication-intake-mapping-returns-not-found-response.json create mode 100644 generated-test/test-runner-data/v2/cloud-authentication/get-an-aws-cloud-authentication-intake-mapping-returns-not-found-response.json create mode 100644 generated-test/test-runner-data/v2/cloud-authentication/get-an-aws-cloud-authentication-intake-mapping-returns-ok-response.json create mode 100644 generated-test/test-runner-data/v2/cloud-authentication/list-aws-cloud-authentication-intake-mappings-returns-ok-response.json create mode 100644 generated-test/test-server-data/v2/cloud-authentication.json create mode 100644 lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_create_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_create_data.rb create mode 100644 lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_create_request.rb create mode 100644 lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_response.rb create mode 100644 lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_type.rb create mode 100644 lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mappings_response.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 8bd7f75292f6..692ab25bd41d 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.rb b/examples/v2/cloud-authentication/CreateAWSCloudAuthIntakeMapping.rb new file mode 100644 index 000000000000..9973492daaa2 --- /dev/null +++ b/examples/v2/cloud-authentication/CreateAWSCloudAuthIntakeMapping.rb @@ -0,0 +1,21 @@ +# Create an AWS cloud authentication intake mapping returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] + config.unstable_operations["v2.create_aws_cloud_auth_intake_mapping".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CloudAuthenticationAPI.new + +# there is an integrated AWS test account for WIF +AWS_WIF_ACCOUNT_V2_DATA_0_ATTRIBUTES_AWS_ACCOUNT_ID = ENV["AWS_WIF_ACCOUNT_V2_DATA_0_ATTRIBUTES_AWS_ACCOUNT_ID"] + +body = DatadogAPIClient::V2::AWSCloudAuthIntakeMappingCreateRequest.new({ + data: DatadogAPIClient::V2::AWSCloudAuthIntakeMappingCreateData.new({ + type: DatadogAPIClient::V2::AWSCloudAuthIntakeMappingType::AWS_CLOUD_AUTH_INTAKE_MAPPING, + attributes: DatadogAPIClient::V2::AWSCloudAuthIntakeMappingCreateAttributes.new({ + arn_pattern: "arn:aws:sts::123456789012:assumed-role/DatadogAgent-de20b7e944abfac3/*", + }), + }), +}) +p api_instance.create_aws_cloud_auth_intake_mapping(body) diff --git a/examples/v2/cloud-authentication/DeleteAWSCloudAuthIntakeMapping.rb b/examples/v2/cloud-authentication/DeleteAWSCloudAuthIntakeMapping.rb new file mode 100644 index 000000000000..9eebf91c79f0 --- /dev/null +++ b/examples/v2/cloud-authentication/DeleteAWSCloudAuthIntakeMapping.rb @@ -0,0 +1,12 @@ +# Delete an AWS cloud authentication intake mapping returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] + config.unstable_operations["v2.delete_aws_cloud_auth_intake_mapping".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CloudAuthenticationAPI.new + +# there is a valid "aws_cloud_auth_intake_mapping" in the system +AWS_CLOUD_AUTH_INTAKE_MAPPING_DATA_ID = ENV["AWS_CLOUD_AUTH_INTAKE_MAPPING_DATA_ID"] +api_instance.delete_aws_cloud_auth_intake_mapping(AWS_CLOUD_AUTH_INTAKE_MAPPING_DATA_ID) diff --git a/examples/v2/cloud-authentication/GetAWSCloudAuthIntakeMapping.rb b/examples/v2/cloud-authentication/GetAWSCloudAuthIntakeMapping.rb new file mode 100644 index 000000000000..e997867d209c --- /dev/null +++ b/examples/v2/cloud-authentication/GetAWSCloudAuthIntakeMapping.rb @@ -0,0 +1,12 @@ +# Get an AWS cloud authentication intake mapping returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] + config.unstable_operations["v2.get_aws_cloud_auth_intake_mapping".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CloudAuthenticationAPI.new + +# there is a valid "aws_cloud_auth_intake_mapping" in the system +AWS_CLOUD_AUTH_INTAKE_MAPPING_DATA_ID = ENV["AWS_CLOUD_AUTH_INTAKE_MAPPING_DATA_ID"] +p api_instance.get_aws_cloud_auth_intake_mapping(AWS_CLOUD_AUTH_INTAKE_MAPPING_DATA_ID) diff --git a/examples/v2/cloud-authentication/ListAWSCloudAuthIntakeMappings.rb b/examples/v2/cloud-authentication/ListAWSCloudAuthIntakeMappings.rb new file mode 100644 index 000000000000..2dc61c3684b8 --- /dev/null +++ b/examples/v2/cloud-authentication/ListAWSCloudAuthIntakeMappings.rb @@ -0,0 +1,9 @@ +# List AWS cloud authentication intake mappings returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] + config.unstable_operations["v2.list_aws_cloud_auth_intake_mappings".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CloudAuthenticationAPI.new +p api_instance.list_aws_cloud_auth_intake_mappings() diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index eba3752952a2..0f243bc1241e 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -7269,6 +7269,15 @@ "uuid" => "UUID", "body" => "CreateOrUpdateWidgetRequest", }, + "v2.CreateAWSCloudAuthIntakeMapping" => { + "body" => "AWSCloudAuthIntakeMappingCreateRequest", + }, + "v2.DeleteAWSCloudAuthIntakeMapping" => { + "intake_mapping_id" => "String", + }, + "v2.GetAWSCloudAuthIntakeMapping" => { + "intake_mapping_id" => "String", + }, "v2.CreateAWSCloudAuthPersonaMapping" => { "body" => "AWSCloudAuthPersonaMappingCreateRequest", }, diff --git a/features/v2/cloud_authentication.feature b/features/v2/cloud_authentication.feature index 6debf5b1d04b..02d93adbd2c5 100644 --- a/features/v2/cloud_authentication.feature +++ b/features/v2/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/features/v2/given.json b/features/v2/given.json index 860416b2d946..859600cfb7b5 100644 --- a/features/v2/given.json +++ b/features/v2/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/features/v2/undo.json b/features/v2/undo.json index 4c993af33b3f..41a80bf646d9 100644 --- a/features/v2/undo.json +++ b/features/v2/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": { diff --git a/generated-test/test-runner-data/manifest.json b/generated-test/test-runner-data/manifest.json index 383f224e0d8a..6bc9e44461d2 100644 --- a/generated-test/test-runner-data/manifest.json +++ b/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": "../../features/v2/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": "../../features/v2/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": "../../features/v2/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": "../../features/v2/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": "../../features/v2/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": "../../features/v2/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": "../../features/v2/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": "../../features/v2/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": "../../features/v2/cloud_cost_management.feature", diff --git a/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-bad-request-response.json b/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 000000000000..9707fc019061 --- /dev/null +++ b/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/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-conflict-response.json b/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-conflict-response.json new file mode 100644 index 000000000000..9e7b31e1ee49 --- /dev/null +++ b/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/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-created-response.json b/generated-test/test-runner-data/v2/cloud-authentication/create-an-aws-cloud-authentication-intake-mapping-returns-created-response.json new file mode 100644 index 000000000000..74ef542fcbd2 --- /dev/null +++ b/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/generated-test/test-runner-data/v2/cloud-authentication/delete-an-aws-cloud-authentication-intake-mapping-returns-no-content-response.json b/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 000000000000..d75dbf713495 --- /dev/null +++ b/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/generated-test/test-runner-data/v2/cloud-authentication/delete-an-aws-cloud-authentication-intake-mapping-returns-not-found-response.json b/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 000000000000..f1762ee3daa5 --- /dev/null +++ b/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/generated-test/test-runner-data/v2/cloud-authentication/get-an-aws-cloud-authentication-intake-mapping-returns-not-found-response.json b/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 000000000000..52242f9e73fd --- /dev/null +++ b/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/generated-test/test-runner-data/v2/cloud-authentication/get-an-aws-cloud-authentication-intake-mapping-returns-ok-response.json b/generated-test/test-runner-data/v2/cloud-authentication/get-an-aws-cloud-authentication-intake-mapping-returns-ok-response.json new file mode 100644 index 000000000000..e58858a226fe --- /dev/null +++ b/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/generated-test/test-runner-data/v2/cloud-authentication/list-aws-cloud-authentication-intake-mappings-returns-ok-response.json b/generated-test/test-runner-data/v2/cloud-authentication/list-aws-cloud-authentication-intake-mappings-returns-ok-response.json new file mode 100644 index 000000000000..33411a246063 --- /dev/null +++ b/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/generated-test/test-server-data/manifest.json b/generated-test/test-server-data/manifest.json index 563b35eb133d..ad02abee0b2e 100644 --- a/generated-test/test-server-data/manifest.json +++ b/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/generated-test/test-server-data/v2/cloud-authentication.json b/generated-test/test-server-data/v2/cloud-authentication.json new file mode 100644 index 000000000000..51afb51e7dc0 --- /dev/null +++ b/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/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 7727f62ec394..b125524e4118 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -829,15 +829,19 @@ def initialize "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/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 8afda3d19c47..85318307bbca 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1770,6 +1770,14 @@ def overrides "v2.aws_ccm_config_validation_response_attributes" => "AWSCcmConfigValidationResponseAttributes", "v2.aws_ccm_config_validation_response_data" => "AWSCcmConfigValidationResponseData", "v2.aws_ccm_config_validation_type" => "AWSCcmConfigValidationType", + "v2.aws_cloud_auth_intake_mapping_attributes_response" => "AWSCloudAuthIntakeMappingAttributesResponse", + "v2.aws_cloud_auth_intake_mapping_create_attributes" => "AWSCloudAuthIntakeMappingCreateAttributes", + "v2.aws_cloud_auth_intake_mapping_create_data" => "AWSCloudAuthIntakeMappingCreateData", + "v2.aws_cloud_auth_intake_mapping_create_request" => "AWSCloudAuthIntakeMappingCreateRequest", + "v2.aws_cloud_auth_intake_mapping_data_response" => "AWSCloudAuthIntakeMappingDataResponse", + "v2.aws_cloud_auth_intake_mapping_response" => "AWSCloudAuthIntakeMappingResponse", + "v2.aws_cloud_auth_intake_mappings_response" => "AWSCloudAuthIntakeMappingsResponse", + "v2.aws_cloud_auth_intake_mapping_type" => "AWSCloudAuthIntakeMappingType", "v2.aws_cloud_auth_persona_mapping_attributes_response" => "AWSCloudAuthPersonaMappingAttributesResponse", "v2.aws_cloud_auth_persona_mapping_create_attributes" => "AWSCloudAuthPersonaMappingCreateAttributes", "v2.aws_cloud_auth_persona_mapping_create_data" => "AWSCloudAuthPersonaMappingCreateData", diff --git a/lib/datadog_api_client/v2/api/cloud_authentication_api.rb b/lib/datadog_api_client/v2/api/cloud_authentication_api.rb index 4de48f907a7e..36ab4055f084 100644 --- a/lib/datadog_api_client/v2/api/cloud_authentication_api.rb +++ b/lib/datadog_api_client/v2/api/cloud_authentication_api.rb @@ -23,6 +23,79 @@ def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end + # Create an AWS cloud authentication intake mapping. + # + # @see #create_aws_cloud_auth_intake_mapping_with_http_info + def create_aws_cloud_auth_intake_mapping(body, opts = {}) + data, _status_code, _headers = create_aws_cloud_auth_intake_mapping_with_http_info(body, opts) + data + end + + # 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. + # + # @param body [AWSCloudAuthIntakeMappingCreateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(AWSCloudAuthIntakeMappingResponse, Integer, Hash)>] AWSCloudAuthIntakeMappingResponse data, response status code and response headers + def create_aws_cloud_auth_intake_mapping_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_aws_cloud_auth_intake_mapping".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_aws_cloud_auth_intake_mapping") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_aws_cloud_auth_intake_mapping")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudAuthenticationAPI.create_aws_cloud_auth_intake_mapping ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CloudAuthenticationAPI.create_aws_cloud_auth_intake_mapping" + end + # resource path + local_var_path = '/api/v2/wif/aws/intake_mapping' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'AWSCloudAuthIntakeMappingResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_aws_cloud_auth_intake_mapping, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudAuthenticationAPI#create_aws_cloud_auth_intake_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create an AWS cloud authentication persona mapping. # # @see #create_aws_cloud_auth_persona_mapping_with_http_info @@ -242,6 +315,77 @@ def create_git_hub_cloud_auth_persona_mapping_with_http_info(body, opts = {}) return data, status_code, headers end + # Delete an AWS cloud authentication intake mapping. + # + # @see #delete_aws_cloud_auth_intake_mapping_with_http_info + def delete_aws_cloud_auth_intake_mapping(intake_mapping_id, opts = {}) + delete_aws_cloud_auth_intake_mapping_with_http_info(intake_mapping_id, opts) + nil + end + + # Delete an AWS cloud authentication intake mapping. + # + # Delete an AWS cloud authentication intake mapping by ID. + # + # @param intake_mapping_id [String] The ID of the intake mapping + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_aws_cloud_auth_intake_mapping_with_http_info(intake_mapping_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_aws_cloud_auth_intake_mapping".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_aws_cloud_auth_intake_mapping") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_aws_cloud_auth_intake_mapping")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudAuthenticationAPI.delete_aws_cloud_auth_intake_mapping ...' + end + # verify the required parameter 'intake_mapping_id' is set + if @api_client.config.client_side_validation && intake_mapping_id.nil? + fail ArgumentError, "Missing the required parameter 'intake_mapping_id' when calling CloudAuthenticationAPI.delete_aws_cloud_auth_intake_mapping" + end + # resource path + local_var_path = '/api/v2/wif/aws/intake_mapping/{intake_mapping_id}'.sub('{intake_mapping_id}', CGI.escape(intake_mapping_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_aws_cloud_auth_intake_mapping, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudAuthenticationAPI#delete_aws_cloud_auth_intake_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete an AWS cloud authentication persona mapping. # # @see #delete_aws_cloud_auth_persona_mapping_with_http_info @@ -455,6 +599,77 @@ def delete_git_hub_cloud_auth_persona_mapping_with_http_info(persona_mapping_id, return data, status_code, headers end + # Get an AWS cloud authentication intake mapping. + # + # @see #get_aws_cloud_auth_intake_mapping_with_http_info + def get_aws_cloud_auth_intake_mapping(intake_mapping_id, opts = {}) + data, _status_code, _headers = get_aws_cloud_auth_intake_mapping_with_http_info(intake_mapping_id, opts) + data + end + + # Get an AWS cloud authentication intake mapping. + # + # Get an AWS cloud authentication intake mapping by ID. + # + # @param intake_mapping_id [String] The ID of the intake mapping + # @param opts [Hash] the optional parameters + # @return [Array<(AWSCloudAuthIntakeMappingResponse, Integer, Hash)>] AWSCloudAuthIntakeMappingResponse data, response status code and response headers + def get_aws_cloud_auth_intake_mapping_with_http_info(intake_mapping_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_aws_cloud_auth_intake_mapping".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_aws_cloud_auth_intake_mapping") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_aws_cloud_auth_intake_mapping")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudAuthenticationAPI.get_aws_cloud_auth_intake_mapping ...' + end + # verify the required parameter 'intake_mapping_id' is set + if @api_client.config.client_side_validation && intake_mapping_id.nil? + fail ArgumentError, "Missing the required parameter 'intake_mapping_id' when calling CloudAuthenticationAPI.get_aws_cloud_auth_intake_mapping" + end + # resource path + local_var_path = '/api/v2/wif/aws/intake_mapping/{intake_mapping_id}'.sub('{intake_mapping_id}', CGI.escape(intake_mapping_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'AWSCloudAuthIntakeMappingResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_aws_cloud_auth_intake_mapping, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudAuthenticationAPI#get_aws_cloud_auth_intake_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get an AWS cloud authentication persona mapping. # # @see #get_aws_cloud_auth_persona_mapping_with_http_info @@ -668,6 +883,72 @@ def get_git_hub_cloud_auth_persona_mapping_with_http_info(persona_mapping_id, op return data, status_code, headers end + # List AWS cloud authentication intake mappings. + # + # @see #list_aws_cloud_auth_intake_mappings_with_http_info + def list_aws_cloud_auth_intake_mappings(opts = {}) + data, _status_code, _headers = list_aws_cloud_auth_intake_mappings_with_http_info(opts) + data + end + + # List AWS cloud authentication intake mappings. + # + # List AWS cloud authentication intake mappings configured for the organization. + # + # @param opts [Hash] the optional parameters + # @return [Array<(AWSCloudAuthIntakeMappingsResponse, Integer, Hash)>] AWSCloudAuthIntakeMappingsResponse data, response status code and response headers + def list_aws_cloud_auth_intake_mappings_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_aws_cloud_auth_intake_mappings".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_aws_cloud_auth_intake_mappings") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_aws_cloud_auth_intake_mappings")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudAuthenticationAPI.list_aws_cloud_auth_intake_mappings ...' + end + # resource path + local_var_path = '/api/v2/wif/aws/intake_mapping' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'AWSCloudAuthIntakeMappingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_aws_cloud_auth_intake_mappings, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudAuthenticationAPI#list_aws_cloud_auth_intake_mappings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List AWS cloud authentication persona mappings. # # @see #list_aws_cloud_auth_persona_mappings_with_http_info diff --git a/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_attributes_response.rb b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_attributes_response.rb new file mode 100644 index 000000000000..ddcb997e0135 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_attributes_response.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for AWS cloud authentication intake mapping response. + class AWSCloudAuthIntakeMappingAttributesResponse + include BaseGenericModel + + # 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. + attr_reader :arn_pattern + + # 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. + attr_accessor :par_enrollment_enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'arn_pattern' => :'arn_pattern', + :'par_enrollment_enabled' => :'par_enrollment_enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'arn_pattern' => :'String', + :'par_enrollment_enabled' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCloudAuthIntakeMappingAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'arn_pattern') + self.arn_pattern = attributes[:'arn_pattern'] + end + + if attributes.key?(:'par_enrollment_enabled') + self.par_enrollment_enabled = attributes[:'par_enrollment_enabled'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @arn_pattern.nil? + true + end + + # Custom attribute writer method with validation + # @param arn_pattern [Object] Object to be assigned + # @!visibility private + def arn_pattern=(arn_pattern) + if arn_pattern.nil? + fail ArgumentError, 'invalid value for "arn_pattern", arn_pattern cannot be nil.' + end + @arn_pattern = arn_pattern + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + arn_pattern == o.arn_pattern && + par_enrollment_enabled == o.par_enrollment_enabled && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [arn_pattern, par_enrollment_enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_create_attributes.rb b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_create_attributes.rb new file mode 100644 index 000000000000..2cb6642dd9d3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_create_attributes.rb @@ -0,0 +1,127 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for creating an AWS cloud authentication intake mapping. + class AWSCloudAuthIntakeMappingCreateAttributes + include BaseGenericModel + + # 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. + attr_reader :arn_pattern + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'arn_pattern' => :'arn_pattern' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'arn_pattern' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCloudAuthIntakeMappingCreateAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'arn_pattern') + self.arn_pattern = attributes[:'arn_pattern'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @arn_pattern.nil? + return false if @arn_pattern.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param arn_pattern [Object] Object to be assigned + # @!visibility private + def arn_pattern=(arn_pattern) + if arn_pattern.nil? + fail ArgumentError, 'invalid value for "arn_pattern", arn_pattern cannot be nil.' + end + if arn_pattern.to_s.length < 1 + fail ArgumentError, 'invalid value for "arn_pattern", the character length must be great than or equal to 1.' + end + @arn_pattern = arn_pattern + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + arn_pattern == o.arn_pattern && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [arn_pattern, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_create_data.rb b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_create_data.rb new file mode 100644 index 000000000000..f22d25bcddf3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_create_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for creating an AWS cloud authentication intake mapping. + class AWSCloudAuthIntakeMappingCreateData + include BaseGenericModel + + # Attributes for creating an AWS cloud authentication intake mapping. + attr_reader :attributes + + # Type identifier for AWS cloud authentication intake mapping. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'AWSCloudAuthIntakeMappingCreateAttributes', + :'type' => :'AWSCloudAuthIntakeMappingType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCloudAuthIntakeMappingCreateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_create_request.rb b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_create_request.rb new file mode 100644 index 000000000000..45ac0a54633c --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_create_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request used to create an AWS cloud authentication intake mapping. + class AWSCloudAuthIntakeMappingCreateRequest + include BaseGenericModel + + # Data for creating an AWS cloud authentication intake mapping. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'AWSCloudAuthIntakeMappingCreateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCloudAuthIntakeMappingCreateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_data_response.rb b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_data_response.rb new file mode 100644 index 000000000000..52be921e7d8c --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for AWS cloud authentication intake mapping response. + class AWSCloudAuthIntakeMappingDataResponse + include BaseGenericModel + + # Attributes for AWS cloud authentication intake mapping response. + attr_reader :attributes + + # Unique identifier for the intake mapping. + attr_reader :id + + # Type identifier for AWS cloud authentication intake mapping. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'AWSCloudAuthIntakeMappingAttributesResponse', + :'id' => :'String', + :'type' => :'AWSCloudAuthIntakeMappingType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCloudAuthIntakeMappingDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_response.rb b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_response.rb new file mode 100644 index 000000000000..647c39964229 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing a single AWS cloud authentication intake mapping. + class AWSCloudAuthIntakeMappingResponse + include BaseGenericModel + + # Data for AWS cloud authentication intake mapping response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'AWSCloudAuthIntakeMappingDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCloudAuthIntakeMappingResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_type.rb b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_type.rb new file mode 100644 index 000000000000..a935574ea421 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mapping_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Type identifier for AWS cloud authentication intake mapping. + class AWSCloudAuthIntakeMappingType + include BaseEnumModel + + AWS_CLOUD_AUTH_INTAKE_MAPPING = "aws_cloud_auth_intake_mapping".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mappings_response.rb b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mappings_response.rb new file mode 100644 index 000000000000..2c2302c0ca27 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_cloud_auth_intake_mappings_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing a list of AWS cloud authentication intake mappings. + class AWSCloudAuthIntakeMappingsResponse + include BaseGenericModel + + # List of AWS cloud authentication intake mappings. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCloudAuthIntakeMappingsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end