diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 42ec940d04..9a4d9f05ee 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -27888,6 +27888,7 @@ paths: - aws_configuration_read /api/v1/integration/aws/event_bridge: delete: + deprecated: true description: Delete an Amazon EventBridge source. operationId: DeleteAWSEventBridgeSource requestBody: @@ -27928,6 +27929,7 @@ paths: permissions: - manage_integrations get: + deprecated: true description: Get all Amazon EventBridge sources. operationId: ListAWSEventBridgeSources parameters: [] @@ -27959,6 +27961,7 @@ paths: operator: OPEN permissions: [] post: + deprecated: true description: Create an Amazon EventBridge source. operationId: CreateAWSEventBridgeSource requestBody: diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c31c76079a..e44adfced6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1428,7 +1428,9 @@ components: AWSAccountConfigID: description: 'Unique Datadog ID of the AWS Account Integration Config. - To get the config ID for an account, use the [List all AWS integrations](https://docs.datadoghq.com/api/latest/aws-integration/#list-all-aws-integrations) + To get the config ID for an account, use the + + [List all AWS integrations](https://docs.datadoghq.com/api/latest/aws-integration/#list-all-aws-integrations) endpoint and query by AWS Account ID.' example: 00000000-abcd-0001-0000-000000000000 @@ -1486,6 +1488,7 @@ components: description: 'AWS partition your AWS account is scoped to. Defaults to `aws`. See [Partitions](https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/partitions.html) + in the AWS documentation for more information.' enum: - aws @@ -1730,6 +1733,269 @@ components: description: The definition of `AWSCredentialsUpdate` object. oneOf: - $ref: '#/components/schemas/AWSAssumeRoleUpdate' + AWSEventBridgeAccountConfiguration: + description: The EventBridge configuration for one AWS account. + properties: + account_id: + description: Your AWS Account ID without dashes. + example: '123456789012' + type: string + event_hubs: + description: Array of AWS event sources associated with this account. + items: + $ref: '#/components/schemas/AWSEventBridgeSource' + type: array + tags: + description: 'Array of tags (in the form `key:value`) which are added to + all hosts + + and metrics reporting through the main AWS integration.' + example: + - $KEY:$VALUE + items: + description: The list of the host_tags. + type: string + type: array + type: object + AWSEventBridgeCreateRequest: + description: Amazon EventBridge create request body. + properties: + data: + $ref: '#/components/schemas/AWSEventBridgeCreateRequestData' + required: + - data + type: object + AWSEventBridgeCreateRequestAttributes: + description: The EventBridge source to be created. + properties: + account_id: + $ref: '#/components/schemas/AWSAccountID' + create_event_bus: + description: 'Set to true if Datadog should create the event bus in addition + to the event + + source. Requires the `events:CreateEventBus` permission.' + example: true + type: boolean + event_generator_name: + description: 'The given part of the event source name, which is then combined + with an + + assigned suffix to form the full name.' + example: app-alerts + type: string + region: + description: 'The event source''s + + [AWS region](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints).' + example: us-east-1 + type: string + required: + - account_id + - event_generator_name + - region + type: object + AWSEventBridgeCreateRequestData: + description: Amazon EventBridge create request data. + properties: + attributes: + $ref: '#/components/schemas/AWSEventBridgeCreateRequestAttributes' + type: + $ref: '#/components/schemas/AWSEventBridgeType' + required: + - attributes + - type + type: object + AWSEventBridgeCreateResponse: + description: Amazon EventBridge create response body. + properties: + data: + $ref: '#/components/schemas/AWSEventBridgeCreateResponseData' + required: + - data + type: object + AWSEventBridgeCreateResponseAttributes: + description: A created EventBridge source. + properties: + event_source_name: + description: The event source name. + example: app-alerts-zyxw3210 + type: string + has_bus: + description: True if the event bus was created in addition to the source. + example: true + type: boolean + region: + description: 'The event source''s + + [AWS region](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints).' + example: us-east-1 + type: string + status: + $ref: '#/components/schemas/AWSEventBridgeCreateStatus' + type: object + AWSEventBridgeCreateResponseData: + description: Amazon EventBridge create response data. + properties: + attributes: + $ref: '#/components/schemas/AWSEventBridgeCreateResponseAttributes' + id: + default: create_event_bridge + description: The ID of the Amazon EventBridge create response data. + example: create_event_bridge + type: string + type: + $ref: '#/components/schemas/AWSEventBridgeType' + required: + - attributes + - type + type: object + AWSEventBridgeCreateStatus: + description: The event source status "created". + enum: + - created + example: created + type: string + x-enum-varnames: + - CREATED + AWSEventBridgeDeleteRequest: + description: Amazon EventBridge delete request body. + properties: + data: + $ref: '#/components/schemas/AWSEventBridgeDeleteRequestData' + required: + - data + type: object + AWSEventBridgeDeleteRequestAttributes: + description: The EventBridge source to be deleted. + properties: + account_id: + $ref: '#/components/schemas/AWSAccountID' + event_generator_name: + description: The event source name. + example: app-alerts-zyxw3210 + type: string + region: + description: 'The event source''s + + [AWS region](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints).' + example: us-east-1 + type: string + required: + - account_id + - event_generator_name + - region + type: object + AWSEventBridgeDeleteRequestData: + description: Amazon EventBridge delete request data. + properties: + attributes: + $ref: '#/components/schemas/AWSEventBridgeDeleteRequestAttributes' + type: + $ref: '#/components/schemas/AWSEventBridgeType' + required: + - attributes + - type + type: object + AWSEventBridgeDeleteResponse: + description: Amazon EventBridge delete response body. + properties: + data: + $ref: '#/components/schemas/AWSEventBridgeDeleteResponseData' + required: + - data + type: object + AWSEventBridgeDeleteResponseAttributes: + description: The EventBridge source delete response attributes. + properties: + status: + $ref: '#/components/schemas/AWSEventBridgeDeleteStatus' + type: object + AWSEventBridgeDeleteResponseData: + description: Amazon EventBridge delete response data. + properties: + attributes: + $ref: '#/components/schemas/AWSEventBridgeDeleteResponseAttributes' + id: + default: delete_event_bridge + description: The ID of the Amazon EventBridge list response data. + example: delete_event_bridge + type: string + type: + $ref: '#/components/schemas/AWSEventBridgeType' + required: + - attributes + - type + type: object + AWSEventBridgeDeleteStatus: + description: The event source status "empty". + enum: + - empty + example: empty + type: string + x-enum-varnames: + - EMPTY + AWSEventBridgeListResponse: + description: Amazon EventBridge list response body. + properties: + data: + $ref: '#/components/schemas/AWSEventBridgeListResponseData' + required: + - data + type: object + AWSEventBridgeListResponseAttributes: + description: An object describing the EventBridge configuration for multiple + accounts. + properties: + accounts: + description: List of accounts with their event sources. + items: + $ref: '#/components/schemas/AWSEventBridgeAccountConfiguration' + type: array + is_installed: + description: True if the EventBridge integration is enabled for your organization. + type: boolean + type: object + AWSEventBridgeListResponseData: + description: Amazon EventBridge list response data. + properties: + attributes: + $ref: '#/components/schemas/AWSEventBridgeListResponseAttributes' + id: + default: get_event_bridge + description: The ID of the Amazon EventBridge list response data. + example: get_event_bridge + type: string + type: + $ref: '#/components/schemas/AWSEventBridgeType' + required: + - attributes + - id + - type + type: object + AWSEventBridgeSource: + description: An EventBridge source. + properties: + name: + description: The event source name. + example: app-alerts-zyxw3210 + type: string + region: + description: 'The event source''s + + [AWS region](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints).' + example: us-east-1 + type: string + type: object + AWSEventBridgeType: + default: event_bridge + description: Amazon EventBridge resource type. + enum: + - event_bridge + example: event_bridge + type: string + x-enum-varnames: + - EVENT_BRIDGE AWSIntegration: description: The definition of `AWSIntegration` object. properties: @@ -1809,10 +2075,12 @@ components: type: object AWSLambdaForwarderConfig: description: 'Log Autosubscription configuration for Datadog Forwarder Lambda - functions. Automatically set up triggers for existing + functions. - and new logs for some services, ensuring no logs from new resources are missed - and saving time spent on manual configuration.' + Automatically set up triggers for existing and new logs for some services, + + ensuring no logs from new resources are missed and saving time spent on manual + configuration.' properties: lambdas: description: List of Datadog Lambda Log Forwarder ARNs in your AWS account. @@ -1825,9 +2093,11 @@ components: $ref: '#/components/schemas/AWSLambdaForwarderConfigLogSourceConfig' sources: description: 'List of service IDs set to enable automatic log collection. + Discover the list of available services with the [Get list of AWS log ready services](https://docs.datadoghq.com/api/latest/aws-logs-integration/#get-list-of-aws-log-ready-services) + endpoint.' items: example: s3 @@ -1847,14 +2117,20 @@ components: description: 'AWS log source tag filter list. Defaults to `[]`. Array of log source to AWS resource tag mappings. Each mapping contains a - log source and its associated AWS resource tags (in `key:value` format) used - to filter logs submitted to Datadog. + log source and its + + associated AWS resource tags (in `key:value` format) used to filter logs submitted + to Datadog. Tag filters are applied for tags on the AWS resource emitting logs; tags associated - with the log storage entity (such as a CloudWatch Log Group or S3 Bucket) - are not considered. + with the + + log storage entity (such as a CloudWatch Log Group or S3 Bucket) are not considered. + + For more information on resource tag filter syntax, + + [see AWS resource exclusion](https://docs.datadoghq.com/account_management/billing/aws/#aws-resource-exclusion) - For more information on resource tag filter syntax, [see AWS resource exclusion](https://docs.datadoghq.com/account_management/billing/aws/#aws-resource-exclusion) in the AWS integration billing page.' properties: source: @@ -1958,17 +2234,21 @@ components: - $ref: '#/components/schemas/AWSNamespaceFiltersExcludeOnly' - $ref: '#/components/schemas/AWSNamespaceFiltersIncludeOnly' AWSNamespaceFiltersExcludeOnly: - description: 'Exclude only these namespaces from metrics collection. Defaults - to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. + description: 'Exclude only these namespaces from metrics collection. + + Defaults to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. `AWS/SQS`, `AWS/ElasticMapReduce`, and `AWS/Usage` are excluded by default + to reduce your AWS CloudWatch costs from `GetMetricData` API calls.' properties: exclude_only: - description: 'Exclude only these namespaces from metrics collection. Defaults - to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. + description: 'Exclude only these namespaces from metrics collection. + + Defaults to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. `AWS/SQS`, `AWS/ElasticMapReduce`, and `AWS/Usage` are excluded by default + to reduce your AWS CloudWatch costs from `GetMetricData` API calls.' example: - AWS/SQS @@ -1999,15 +2279,18 @@ components: description: 'AWS Metrics Collection tag filters list. Defaults to `[]`. The array of custom AWS resource tags (in the form `key:value`) defines a - filter that Datadog uses when collecting metrics from a specified service. + filter that Datadog uses + + when collecting metrics from a specified service. Wildcards, such as `?` (match a single character) and `*` (match multiple - characters), and exclusion using `!` before the tag are supported. + characters), + + and exclusion using `!` before the tag are supported. - For EC2, only hosts that match one of the defined tags will be imported into - Datadog. The rest will be ignored. + For EC2, only hosts that match one of the defined tags are imported into Datadog. - For example, `env:production,instance-type:c?.*,!region:us-east-1`.' + The rest are ignored. For example, `env:production,instance-type:c?.*,!region:us-east-1`.' properties: namespace: description: The AWS service for which the tag filters defined in `tags` @@ -2147,15 +2430,19 @@ components: description: AWS Resources Collection config. properties: cloud_security_posture_management_collection: - description: Enable Cloud Security Management to scan AWS resources for - vulnerabilities, misconfigurations, identity risks, and compliance violations. - Defaults to `false`. Requires `extended_collection` to be set to `true`. + description: 'Enable Cloud Security Management to scan AWS resources for + vulnerabilities, misconfigurations, + + identity risks, and compliance violations. Defaults to `false`. + + Requires `extended_collection` to be set to `true`.' example: false type: boolean extended_collection: - description: Whether Datadog collects additional attributes and configuration - information about the resources in your AWS account. Defaults to `true`. - Required for `cloud_security_posture_management_collection`. + description: 'Whether Datadog collects additional attributes and configuration + information about the resources + + in your AWS account. Defaults to `true`. Required for `cloud_security_posture_management_collection`.' example: true type: boolean type: object @@ -63553,8 +63840,9 @@ paths: description: Get a list of AWS Account Integration Configs. operationId: ListAWSAccounts parameters: - - description: Optional query parameter to filter accounts by AWS Account ID. - If not provided, all accounts are returned. + - description: 'Optional query parameter to filter accounts by AWS Account ID. + + If not provided, all accounts are returned.' example: '123456789012' in: query name: aws_account_id @@ -63719,6 +64007,96 @@ paths: operator: OR permissions: - aws_configuration_read + /api/v2/integration/aws/event_bridge: + delete: + description: Delete an Amazon EventBridge source. + operationId: DeleteAWSEventBridgeSource + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeDeleteRequest' + description: Delete the Amazon EventBridge source with the given name, region, + and associated AWS account. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeDeleteResponse' + description: Amazon EventBridge source deleted. + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete an Amazon EventBridge source + tags: + - AWS Integration + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - manage_integrations + get: + description: Get all Amazon EventBridge sources. + operationId: ListAWSEventBridgeSources + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeListResponse' + description: Amazon EventBridge sources list. + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all Amazon EventBridge sources + tags: + - AWS Integration + x-permission: + operator: OR + permissions: + - integrations_read + post: + description: Create an Amazon EventBridge source. + operationId: CreateAWSEventBridgeSource + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeCreateRequest' + description: Create an Amazon EventBridge source for an AWS account with a + given name and region. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeCreateResponse' + description: Amazon EventBridge source created. + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create an Amazon EventBridge source + tags: + - AWS Integration + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - manage_integrations /api/v2/integration/aws/generate_new_external_id: post: description: Generate a new external ID for AWS role-based authentication. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 28df3405c2..91d9ca0b46 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -1726,6 +1726,146 @@ datadog\_api\_client.v2.model.aws\_cur\_configs\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.aws\_event\_bridge\_account\_configuration module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_account_configuration + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_create\_request module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_create_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_create\_request\_attributes module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_create_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_create\_request\_data module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_create_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_create\_response module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_create_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_create\_response\_attributes module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_create_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_create\_response\_data module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_create_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_create\_status module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_create_status + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_delete\_request module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_delete_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_delete\_request\_attributes module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_delete_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_delete\_request\_data module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_delete_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_delete\_response module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_delete_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_delete\_response\_attributes module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_delete_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_delete\_response\_data module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_delete_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_delete\_status module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_delete_status + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_list\_response module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_list_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_list\_response\_attributes module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_list_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_list\_response\_data module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_list_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_source module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_source + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.aws\_event\_bridge\_type module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.aws_event_bridge_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.aws\_integration module ----------------------------------------------------- diff --git a/examples/v2/aws-integration/CreateAWSEventBridgeSource.py b/examples/v2/aws-integration/CreateAWSEventBridgeSource.py new file mode 100644 index 0000000000..8b2daf9701 --- /dev/null +++ b/examples/v2/aws-integration/CreateAWSEventBridgeSource.py @@ -0,0 +1,29 @@ +""" +Create an Amazon EventBridge source returns "Amazon EventBridge source created." response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi +from datadog_api_client.v2.model.aws_event_bridge_create_request import AWSEventBridgeCreateRequest +from datadog_api_client.v2.model.aws_event_bridge_create_request_attributes import AWSEventBridgeCreateRequestAttributes +from datadog_api_client.v2.model.aws_event_bridge_create_request_data import AWSEventBridgeCreateRequestData +from datadog_api_client.v2.model.aws_event_bridge_type import AWSEventBridgeType + +body = AWSEventBridgeCreateRequest( + data=AWSEventBridgeCreateRequestData( + attributes=AWSEventBridgeCreateRequestAttributes( + account_id="123456789012", + create_event_bus=True, + event_generator_name="app-alerts", + region="us-east-1", + ), + type=AWSEventBridgeType.EVENT_BRIDGE, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = AWSIntegrationApi(api_client) + response = api_instance.create_aws_event_bridge_source(body=body) + + print(response) diff --git a/examples/v2/aws-integration/DeleteAWSEventBridgeSource.py b/examples/v2/aws-integration/DeleteAWSEventBridgeSource.py new file mode 100644 index 0000000000..16deb18bc8 --- /dev/null +++ b/examples/v2/aws-integration/DeleteAWSEventBridgeSource.py @@ -0,0 +1,28 @@ +""" +Delete an Amazon EventBridge source returns "Amazon EventBridge source deleted." response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi +from datadog_api_client.v2.model.aws_event_bridge_delete_request import AWSEventBridgeDeleteRequest +from datadog_api_client.v2.model.aws_event_bridge_delete_request_attributes import AWSEventBridgeDeleteRequestAttributes +from datadog_api_client.v2.model.aws_event_bridge_delete_request_data import AWSEventBridgeDeleteRequestData +from datadog_api_client.v2.model.aws_event_bridge_type import AWSEventBridgeType + +body = AWSEventBridgeDeleteRequest( + data=AWSEventBridgeDeleteRequestData( + attributes=AWSEventBridgeDeleteRequestAttributes( + account_id="123456789012", + event_generator_name="app-alerts-zyxw3210", + region="us-east-1", + ), + type=AWSEventBridgeType.EVENT_BRIDGE, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = AWSIntegrationApi(api_client) + response = api_instance.delete_aws_event_bridge_source(body=body) + + print(response) diff --git a/examples/v2/aws-integration/ListAWSEventBridgeSources.py b/examples/v2/aws-integration/ListAWSEventBridgeSources.py new file mode 100644 index 0000000000..0550aab076 --- /dev/null +++ b/examples/v2/aws-integration/ListAWSEventBridgeSources.py @@ -0,0 +1,13 @@ +""" +Get all Amazon EventBridge sources returns "Amazon EventBridge sources list." response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = AWSIntegrationApi(api_client) + response = api_instance.list_aws_event_bridge_sources() + + print(response) diff --git a/src/datadog_api_client/v1/api/aws_integration_api.py b/src/datadog_api_client/v1/api/aws_integration_api.py index 292ae992c0..de3663998b 100644 --- a/src/datadog_api_client/v1/api/aws_integration_api.py +++ b/src/datadog_api_client/v1/api/aws_integration_api.py @@ -324,7 +324,7 @@ def create_aws_event_bridge_source( self, body: AWSEventBridgeCreateRequest, ) -> AWSEventBridgeCreateResponse: - """Create an Amazon EventBridge source. + """Create an Amazon EventBridge source. **Deprecated**. Create an Amazon EventBridge source. @@ -335,6 +335,7 @@ def create_aws_event_bridge_source( kwargs: Dict[str, Any] = {} kwargs["body"] = body + warnings.warn("create_aws_event_bridge_source is deprecated", DeprecationWarning, stacklevel=2) return self._create_aws_event_bridge_source_endpoint.call_with_http_info(**kwargs) def create_aws_tag_filter( @@ -398,7 +399,7 @@ def delete_aws_event_bridge_source( self, body: AWSEventBridgeDeleteRequest, ) -> AWSEventBridgeDeleteResponse: - """Delete an Amazon EventBridge source. + """Delete an Amazon EventBridge source. **Deprecated**. Delete an Amazon EventBridge source. @@ -409,6 +410,7 @@ def delete_aws_event_bridge_source( kwargs: Dict[str, Any] = {} kwargs["body"] = body + warnings.warn("delete_aws_event_bridge_source is deprecated", DeprecationWarning, stacklevel=2) return self._delete_aws_event_bridge_source_endpoint.call_with_http_info(**kwargs) def delete_aws_tag_filter( @@ -477,13 +479,14 @@ def list_aws_accounts( def list_aws_event_bridge_sources( self, ) -> AWSEventBridgeListResponse: - """Get all Amazon EventBridge sources. + """Get all Amazon EventBridge sources. **Deprecated**. Get all Amazon EventBridge sources. :rtype: AWSEventBridgeListResponse """ kwargs: Dict[str, Any] = {} + warnings.warn("list_aws_event_bridge_sources is deprecated", DeprecationWarning, stacklevel=2) return self._list_aws_event_bridge_sources_endpoint.call_with_http_info(**kwargs) def list_aws_tag_filters( diff --git a/src/datadog_api_client/v2/api/aws_integration_api.py b/src/datadog_api_client/v2/api/aws_integration_api.py index 9a74e0558f..44f4eb58f9 100644 --- a/src/datadog_api_client/v2/api/aws_integration_api.py +++ b/src/datadog_api_client/v2/api/aws_integration_api.py @@ -16,6 +16,11 @@ from datadog_api_client.v2.model.aws_account_create_request import AWSAccountCreateRequest from datadog_api_client.v2.model.aws_account_update_request import AWSAccountUpdateRequest from datadog_api_client.v2.model.aws_namespaces_response import AWSNamespacesResponse +from datadog_api_client.v2.model.aws_event_bridge_delete_response import AWSEventBridgeDeleteResponse +from datadog_api_client.v2.model.aws_event_bridge_delete_request import AWSEventBridgeDeleteRequest +from datadog_api_client.v2.model.aws_event_bridge_list_response import AWSEventBridgeListResponse +from datadog_api_client.v2.model.aws_event_bridge_create_response import AWSEventBridgeCreateResponse +from datadog_api_client.v2.model.aws_event_bridge_create_request import AWSEventBridgeCreateRequest from datadog_api_client.v2.model.aws_new_external_id_response import AWSNewExternalIDResponse from datadog_api_client.v2.model.aws_integration_iam_permissions_response import AWSIntegrationIamPermissionsResponse @@ -51,6 +56,26 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._create_aws_event_bridge_source_endpoint = _Endpoint( + settings={ + "response_type": (AWSEventBridgeCreateResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/aws/event_bridge", + "operation_id": "create_aws_event_bridge_source", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (AWSEventBridgeCreateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._create_new_aws_external_id_endpoint = _Endpoint( settings={ "response_type": (AWSNewExternalIDResponse,), @@ -90,6 +115,26 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._delete_aws_event_bridge_source_endpoint = _Endpoint( + settings={ + "response_type": (AWSEventBridgeDeleteResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/aws/event_bridge", + "operation_id": "delete_aws_event_bridge_source", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (AWSEventBridgeDeleteRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._get_aws_account_endpoint = _Endpoint( settings={ "response_type": (AWSAccountResponse,), @@ -183,6 +228,22 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_aws_event_bridge_sources_endpoint = _Endpoint( + settings={ + "response_type": (AWSEventBridgeListResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/aws/event_bridge", + "operation_id": "list_aws_event_bridge_sources", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_aws_namespaces_endpoint = _Endpoint( settings={ "response_type": (AWSNamespacesResponse,), @@ -241,6 +302,23 @@ def create_aws_account( return self._create_aws_account_endpoint.call_with_http_info(**kwargs) + def create_aws_event_bridge_source( + self, + body: AWSEventBridgeCreateRequest, + ) -> AWSEventBridgeCreateResponse: + """Create an Amazon EventBridge source. + + Create an Amazon EventBridge source. + + :param body: Create an Amazon EventBridge source for an AWS account with a given name and region. + :type body: AWSEventBridgeCreateRequest + :rtype: AWSEventBridgeCreateResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_aws_event_bridge_source_endpoint.call_with_http_info(**kwargs) + def create_new_aws_external_id( self, ) -> AWSNewExternalIDResponse: @@ -271,6 +349,23 @@ def delete_aws_account( return self._delete_aws_account_endpoint.call_with_http_info(**kwargs) + def delete_aws_event_bridge_source( + self, + body: AWSEventBridgeDeleteRequest, + ) -> AWSEventBridgeDeleteResponse: + """Delete an Amazon EventBridge source. + + Delete an Amazon EventBridge source. + + :param body: Delete the Amazon EventBridge source with the given name, region, and associated AWS account. + :type body: AWSEventBridgeDeleteRequest + :rtype: AWSEventBridgeDeleteResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._delete_aws_event_bridge_source_endpoint.call_with_http_info(**kwargs) + def get_aws_account( self, aws_account_config_id: str, @@ -334,7 +429,8 @@ def list_aws_accounts( Get a list of AWS Account Integration Configs. - :param aws_account_id: Optional query parameter to filter accounts by AWS Account ID. If not provided, all accounts are returned. + :param aws_account_id: Optional query parameter to filter accounts by AWS Account ID. + If not provided, all accounts are returned. :type aws_account_id: str, optional :rtype: AWSAccountsResponse """ @@ -344,6 +440,18 @@ def list_aws_accounts( return self._list_aws_accounts_endpoint.call_with_http_info(**kwargs) + def list_aws_event_bridge_sources( + self, + ) -> AWSEventBridgeListResponse: + """Get all Amazon EventBridge sources. + + Get all Amazon EventBridge sources. + + :rtype: AWSEventBridgeListResponse + """ + kwargs: Dict[str, Any] = {} + return self._list_aws_event_bridge_sources_endpoint.call_with_http_info(**kwargs) + def list_aws_namespaces( self, ) -> AWSNamespacesResponse: diff --git a/src/datadog_api_client/v2/model/aws_account_create_request_attributes.py b/src/datadog_api_client/v2/model/aws_account_create_request_attributes.py index 100ad49859..9f781edf15 100644 --- a/src/datadog_api_client/v2/model/aws_account_create_request_attributes.py +++ b/src/datadog_api_client/v2/model/aws_account_create_request_attributes.py @@ -89,7 +89,8 @@ def __init__( :type aws_account_id: str :param aws_partition: AWS partition your AWS account is scoped to. Defaults to ``aws``. - See `Partitions `_ in the AWS documentation for more information. + See `Partitions `_ + in the AWS documentation for more information. :type aws_partition: AWSAccountPartition :param aws_regions: AWS Regions to collect data from. Defaults to ``include_all``. diff --git a/src/datadog_api_client/v2/model/aws_account_partition.py b/src/datadog_api_client/v2/model/aws_account_partition.py index d18e1a5628..c420010e64 100644 --- a/src/datadog_api_client/v2/model/aws_account_partition.py +++ b/src/datadog_api_client/v2/model/aws_account_partition.py @@ -15,7 +15,8 @@ class AWSAccountPartition(ModelSimple): """ AWS partition your AWS account is scoped to. Defaults to `aws`. - See [Partitions](https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/partitions.html) in the AWS documentation for more information. + See [Partitions](https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/partitions.html) + in the AWS documentation for more information. :param value: Must be one of ["aws", "aws-cn", "aws-us-gov"]. :type value: str diff --git a/src/datadog_api_client/v2/model/aws_account_response_attributes.py b/src/datadog_api_client/v2/model/aws_account_response_attributes.py index 559c5f9c0f..5f2bd6db6e 100644 --- a/src/datadog_api_client/v2/model/aws_account_response_attributes.py +++ b/src/datadog_api_client/v2/model/aws_account_response_attributes.py @@ -100,7 +100,8 @@ def __init__( :type aws_account_id: str :param aws_partition: AWS partition your AWS account is scoped to. Defaults to ``aws``. - See `Partitions `_ in the AWS documentation for more information. + See `Partitions `_ + in the AWS documentation for more information. :type aws_partition: AWSAccountPartition, optional :param aws_regions: AWS Regions to collect data from. Defaults to ``include_all``. diff --git a/src/datadog_api_client/v2/model/aws_account_response_data.py b/src/datadog_api_client/v2/model/aws_account_response_data.py index c7391584e3..1576627a7d 100644 --- a/src/datadog_api_client/v2/model/aws_account_response_data.py +++ b/src/datadog_api_client/v2/model/aws_account_response_data.py @@ -50,7 +50,8 @@ def __init__( :type attributes: AWSAccountResponseAttributes, optional :param id: Unique Datadog ID of the AWS Account Integration Config. - To get the config ID for an account, use the `List all AWS integrations `_ + To get the config ID for an account, use the + `List all AWS integrations `_ endpoint and query by AWS Account ID. :type id: str diff --git a/src/datadog_api_client/v2/model/aws_account_update_request_attributes.py b/src/datadog_api_client/v2/model/aws_account_update_request_attributes.py index f9aa99fa3b..af71621a06 100644 --- a/src/datadog_api_client/v2/model/aws_account_update_request_attributes.py +++ b/src/datadog_api_client/v2/model/aws_account_update_request_attributes.py @@ -89,7 +89,8 @@ def __init__( :type aws_account_id: str :param aws_partition: AWS partition your AWS account is scoped to. Defaults to ``aws``. - See `Partitions `_ in the AWS documentation for more information. + See `Partitions `_ + in the AWS documentation for more information. :type aws_partition: AWSAccountPartition, optional :param aws_regions: AWS Regions to collect data from. Defaults to ``include_all``. diff --git a/src/datadog_api_client/v2/model/aws_account_update_request_data.py b/src/datadog_api_client/v2/model/aws_account_update_request_data.py index 743a7a5988..3bbe17411b 100644 --- a/src/datadog_api_client/v2/model/aws_account_update_request_data.py +++ b/src/datadog_api_client/v2/model/aws_account_update_request_data.py @@ -50,7 +50,8 @@ def __init__( :type attributes: AWSAccountUpdateRequestAttributes :param id: Unique Datadog ID of the AWS Account Integration Config. - To get the config ID for an account, use the `List all AWS integrations `_ + To get the config ID for an account, use the + `List all AWS integrations `_ endpoint and query by AWS Account ID. :type id: str, optional diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_account_configuration.py b/src/datadog_api_client/v2/model/aws_event_bridge_account_configuration.py new file mode 100644 index 0000000000..0771f34a4d --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_account_configuration.py @@ -0,0 +1,63 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_source import AWSEventBridgeSource + + +class AWSEventBridgeAccountConfiguration(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_source import AWSEventBridgeSource + + return { + "account_id": (str,), + "event_hubs": ([AWSEventBridgeSource],), + "tags": ([str],), + } + + attribute_map = { + "account_id": "account_id", + "event_hubs": "event_hubs", + "tags": "tags", + } + + def __init__( + self_, + account_id: Union[str, UnsetType] = unset, + event_hubs: Union[List[AWSEventBridgeSource], UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + The EventBridge configuration for one AWS account. + + :param account_id: Your AWS Account ID without dashes. + :type account_id: str, optional + + :param event_hubs: Array of AWS event sources associated with this account. + :type event_hubs: [AWSEventBridgeSource], optional + + :param tags: Array of tags (in the form ``key:value`` ) which are added to all hosts + and metrics reporting through the main AWS integration. + :type tags: [str], optional + """ + if account_id is not unset: + kwargs["account_id"] = account_id + if event_hubs is not unset: + kwargs["event_hubs"] = event_hubs + if tags is not unset: + kwargs["tags"] = tags + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_create_request.py b/src/datadog_api_client/v2/model/aws_event_bridge_create_request.py new file mode 100644 index 0000000000..055a65bb24 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_create_request.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_create_request_data import AWSEventBridgeCreateRequestData + + +class AWSEventBridgeCreateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_create_request_data import AWSEventBridgeCreateRequestData + + return { + "data": (AWSEventBridgeCreateRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: AWSEventBridgeCreateRequestData, **kwargs): + """ + Amazon EventBridge create request body. + + :param data: Amazon EventBridge create request data. + :type data: AWSEventBridgeCreateRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_create_request_attributes.py b/src/datadog_api_client/v2/model/aws_event_bridge_create_request_attributes.py new file mode 100644 index 0000000000..3a8c34c038 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_create_request_attributes.py @@ -0,0 +1,65 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class AWSEventBridgeCreateRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "account_id": (str,), + "create_event_bus": (bool,), + "event_generator_name": (str,), + "region": (str,), + } + + attribute_map = { + "account_id": "account_id", + "create_event_bus": "create_event_bus", + "event_generator_name": "event_generator_name", + "region": "region", + } + + def __init__( + self_, + account_id: str, + event_generator_name: str, + region: str, + create_event_bus: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + The EventBridge source to be created. + + :param account_id: AWS Account ID. + :type account_id: str + + :param create_event_bus: Set to true if Datadog should create the event bus in addition to the event + source. Requires the ``events:CreateEventBus`` permission. + :type create_event_bus: bool, optional + + :param event_generator_name: The given part of the event source name, which is then combined with an + assigned suffix to form the full name. + :type event_generator_name: str + + :param region: The event source's + `AWS region `_. + :type region: str + """ + if create_event_bus is not unset: + kwargs["create_event_bus"] = create_event_bus + super().__init__(kwargs) + + self_.account_id = account_id + self_.event_generator_name = event_generator_name + self_.region = region diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_create_request_data.py b/src/datadog_api_client/v2/model/aws_event_bridge_create_request_data.py new file mode 100644 index 0000000000..4b0a2c9fbc --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_create_request_data.py @@ -0,0 +1,52 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_create_request_attributes import ( + AWSEventBridgeCreateRequestAttributes, + ) + from datadog_api_client.v2.model.aws_event_bridge_type import AWSEventBridgeType + + +class AWSEventBridgeCreateRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_create_request_attributes import ( + AWSEventBridgeCreateRequestAttributes, + ) + from datadog_api_client.v2.model.aws_event_bridge_type import AWSEventBridgeType + + return { + "attributes": (AWSEventBridgeCreateRequestAttributes,), + "type": (AWSEventBridgeType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: AWSEventBridgeCreateRequestAttributes, type: AWSEventBridgeType, **kwargs): + """ + Amazon EventBridge create request data. + + :param attributes: The EventBridge source to be created. + :type attributes: AWSEventBridgeCreateRequestAttributes + + :param type: Amazon EventBridge resource type. + :type type: AWSEventBridgeType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_create_response.py b/src/datadog_api_client/v2/model/aws_event_bridge_create_response.py new file mode 100644 index 0000000000..3d79c16990 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_create_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_create_response_data import AWSEventBridgeCreateResponseData + + +class AWSEventBridgeCreateResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_create_response_data import AWSEventBridgeCreateResponseData + + return { + "data": (AWSEventBridgeCreateResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: AWSEventBridgeCreateResponseData, **kwargs): + """ + Amazon EventBridge create response body. + + :param data: Amazon EventBridge create response data. + :type data: AWSEventBridgeCreateResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_create_response_attributes.py b/src/datadog_api_client/v2/model/aws_event_bridge_create_response_attributes.py new file mode 100644 index 0000000000..c090f0ec64 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_create_response_attributes.py @@ -0,0 +1,71 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_create_status import AWSEventBridgeCreateStatus + + +class AWSEventBridgeCreateResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_create_status import AWSEventBridgeCreateStatus + + return { + "event_source_name": (str,), + "has_bus": (bool,), + "region": (str,), + "status": (AWSEventBridgeCreateStatus,), + } + + attribute_map = { + "event_source_name": "event_source_name", + "has_bus": "has_bus", + "region": "region", + "status": "status", + } + + def __init__( + self_, + event_source_name: Union[str, UnsetType] = unset, + has_bus: Union[bool, UnsetType] = unset, + region: Union[str, UnsetType] = unset, + status: Union[AWSEventBridgeCreateStatus, UnsetType] = unset, + **kwargs, + ): + """ + A created EventBridge source. + + :param event_source_name: The event source name. + :type event_source_name: str, optional + + :param has_bus: True if the event bus was created in addition to the source. + :type has_bus: bool, optional + + :param region: The event source's + `AWS region `_. + :type region: str, optional + + :param status: The event source status "created". + :type status: AWSEventBridgeCreateStatus, optional + """ + if event_source_name is not unset: + kwargs["event_source_name"] = event_source_name + if has_bus is not unset: + kwargs["has_bus"] = has_bus + if region is not unset: + kwargs["region"] = region + if status is not unset: + kwargs["status"] = status + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_create_response_data.py b/src/datadog_api_client/v2/model/aws_event_bridge_create_response_data.py new file mode 100644 index 0000000000..bb08664658 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_create_response_data.py @@ -0,0 +1,67 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_create_response_attributes import ( + AWSEventBridgeCreateResponseAttributes, + ) + from datadog_api_client.v2.model.aws_event_bridge_type import AWSEventBridgeType + + +class AWSEventBridgeCreateResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_create_response_attributes import ( + AWSEventBridgeCreateResponseAttributes, + ) + from datadog_api_client.v2.model.aws_event_bridge_type import AWSEventBridgeType + + return { + "attributes": (AWSEventBridgeCreateResponseAttributes,), + "id": (str,), + "type": (AWSEventBridgeType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: AWSEventBridgeCreateResponseAttributes, + type: AWSEventBridgeType, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Amazon EventBridge create response data. + + :param attributes: A created EventBridge source. + :type attributes: AWSEventBridgeCreateResponseAttributes + + :param id: The ID of the Amazon EventBridge create response data. + :type id: str, optional + + :param type: Amazon EventBridge resource type. + :type type: AWSEventBridgeType + """ + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_create_status.py b/src/datadog_api_client/v2/model/aws_event_bridge_create_status.py new file mode 100644 index 0000000000..1a1b92edfc --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_create_status.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AWSEventBridgeCreateStatus(ModelSimple): + """ + The event source status "created". + + :param value: If omitted defaults to "created". Must be one of ["created"]. + :type value: str + """ + + allowed_values = { + "created", + } + CREATED: ClassVar["AWSEventBridgeCreateStatus"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AWSEventBridgeCreateStatus.CREATED = AWSEventBridgeCreateStatus("created") diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_delete_request.py b/src/datadog_api_client/v2/model/aws_event_bridge_delete_request.py new file mode 100644 index 0000000000..9227b8dfa0 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_delete_request.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_delete_request_data import AWSEventBridgeDeleteRequestData + + +class AWSEventBridgeDeleteRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_delete_request_data import AWSEventBridgeDeleteRequestData + + return { + "data": (AWSEventBridgeDeleteRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: AWSEventBridgeDeleteRequestData, **kwargs): + """ + Amazon EventBridge delete request body. + + :param data: Amazon EventBridge delete request data. + :type data: AWSEventBridgeDeleteRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_delete_request_attributes.py b/src/datadog_api_client/v2/model/aws_event_bridge_delete_request_attributes.py new file mode 100644 index 0000000000..3b164fff0a --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_delete_request_attributes.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class AWSEventBridgeDeleteRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "account_id": (str,), + "event_generator_name": (str,), + "region": (str,), + } + + attribute_map = { + "account_id": "account_id", + "event_generator_name": "event_generator_name", + "region": "region", + } + + def __init__(self_, account_id: str, event_generator_name: str, region: str, **kwargs): + """ + The EventBridge source to be deleted. + + :param account_id: AWS Account ID. + :type account_id: str + + :param event_generator_name: The event source name. + :type event_generator_name: str + + :param region: The event source's + `AWS region `_. + :type region: str + """ + super().__init__(kwargs) + + self_.account_id = account_id + self_.event_generator_name = event_generator_name + self_.region = region diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_delete_request_data.py b/src/datadog_api_client/v2/model/aws_event_bridge_delete_request_data.py new file mode 100644 index 0000000000..22ea558c71 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_delete_request_data.py @@ -0,0 +1,52 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_delete_request_attributes import ( + AWSEventBridgeDeleteRequestAttributes, + ) + from datadog_api_client.v2.model.aws_event_bridge_type import AWSEventBridgeType + + +class AWSEventBridgeDeleteRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_delete_request_attributes import ( + AWSEventBridgeDeleteRequestAttributes, + ) + from datadog_api_client.v2.model.aws_event_bridge_type import AWSEventBridgeType + + return { + "attributes": (AWSEventBridgeDeleteRequestAttributes,), + "type": (AWSEventBridgeType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: AWSEventBridgeDeleteRequestAttributes, type: AWSEventBridgeType, **kwargs): + """ + Amazon EventBridge delete request data. + + :param attributes: The EventBridge source to be deleted. + :type attributes: AWSEventBridgeDeleteRequestAttributes + + :param type: Amazon EventBridge resource type. + :type type: AWSEventBridgeType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_delete_response.py b/src/datadog_api_client/v2/model/aws_event_bridge_delete_response.py new file mode 100644 index 0000000000..243651ff2e --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_delete_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_delete_response_data import AWSEventBridgeDeleteResponseData + + +class AWSEventBridgeDeleteResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_delete_response_data import AWSEventBridgeDeleteResponseData + + return { + "data": (AWSEventBridgeDeleteResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: AWSEventBridgeDeleteResponseData, **kwargs): + """ + Amazon EventBridge delete response body. + + :param data: Amazon EventBridge delete response data. + :type data: AWSEventBridgeDeleteResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_delete_response_attributes.py b/src/datadog_api_client/v2/model/aws_event_bridge_delete_response_attributes.py new file mode 100644 index 0000000000..c32c748227 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_delete_response_attributes.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_delete_status import AWSEventBridgeDeleteStatus + + +class AWSEventBridgeDeleteResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_delete_status import AWSEventBridgeDeleteStatus + + return { + "status": (AWSEventBridgeDeleteStatus,), + } + + attribute_map = { + "status": "status", + } + + def __init__(self_, status: Union[AWSEventBridgeDeleteStatus, UnsetType] = unset, **kwargs): + """ + The EventBridge source delete response attributes. + + :param status: The event source status "empty". + :type status: AWSEventBridgeDeleteStatus, optional + """ + if status is not unset: + kwargs["status"] = status + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_delete_response_data.py b/src/datadog_api_client/v2/model/aws_event_bridge_delete_response_data.py new file mode 100644 index 0000000000..a9aef424a8 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_delete_response_data.py @@ -0,0 +1,67 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_delete_response_attributes import ( + AWSEventBridgeDeleteResponseAttributes, + ) + from datadog_api_client.v2.model.aws_event_bridge_type import AWSEventBridgeType + + +class AWSEventBridgeDeleteResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_delete_response_attributes import ( + AWSEventBridgeDeleteResponseAttributes, + ) + from datadog_api_client.v2.model.aws_event_bridge_type import AWSEventBridgeType + + return { + "attributes": (AWSEventBridgeDeleteResponseAttributes,), + "id": (str,), + "type": (AWSEventBridgeType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: AWSEventBridgeDeleteResponseAttributes, + type: AWSEventBridgeType, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Amazon EventBridge delete response data. + + :param attributes: The EventBridge source delete response attributes. + :type attributes: AWSEventBridgeDeleteResponseAttributes + + :param id: The ID of the Amazon EventBridge list response data. + :type id: str, optional + + :param type: Amazon EventBridge resource type. + :type type: AWSEventBridgeType + """ + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_delete_status.py b/src/datadog_api_client/v2/model/aws_event_bridge_delete_status.py new file mode 100644 index 0000000000..705ef5512b --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_delete_status.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AWSEventBridgeDeleteStatus(ModelSimple): + """ + The event source status "empty". + + :param value: If omitted defaults to "empty". Must be one of ["empty"]. + :type value: str + """ + + allowed_values = { + "empty", + } + EMPTY: ClassVar["AWSEventBridgeDeleteStatus"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AWSEventBridgeDeleteStatus.EMPTY = AWSEventBridgeDeleteStatus("empty") diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_list_response.py b/src/datadog_api_client/v2/model/aws_event_bridge_list_response.py new file mode 100644 index 0000000000..b8919062b4 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_list_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_list_response_data import AWSEventBridgeListResponseData + + +class AWSEventBridgeListResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_list_response_data import AWSEventBridgeListResponseData + + return { + "data": (AWSEventBridgeListResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: AWSEventBridgeListResponseData, **kwargs): + """ + Amazon EventBridge list response body. + + :param data: Amazon EventBridge list response data. + :type data: AWSEventBridgeListResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_list_response_attributes.py b/src/datadog_api_client/v2/model/aws_event_bridge_list_response_attributes.py new file mode 100644 index 0000000000..957ed08b37 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_list_response_attributes.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_account_configuration import AWSEventBridgeAccountConfiguration + + +class AWSEventBridgeListResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_account_configuration import ( + AWSEventBridgeAccountConfiguration, + ) + + return { + "accounts": ([AWSEventBridgeAccountConfiguration],), + "is_installed": (bool,), + } + + attribute_map = { + "accounts": "accounts", + "is_installed": "is_installed", + } + + def __init__( + self_, + accounts: Union[List[AWSEventBridgeAccountConfiguration], UnsetType] = unset, + is_installed: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + An object describing the EventBridge configuration for multiple accounts. + + :param accounts: List of accounts with their event sources. + :type accounts: [AWSEventBridgeAccountConfiguration], optional + + :param is_installed: True if the EventBridge integration is enabled for your organization. + :type is_installed: bool, optional + """ + if accounts is not unset: + kwargs["accounts"] = accounts + if is_installed is not unset: + kwargs["is_installed"] = is_installed + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_list_response_data.py b/src/datadog_api_client/v2/model/aws_event_bridge_list_response_data.py new file mode 100644 index 0000000000..73b2550e04 --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_list_response_data.py @@ -0,0 +1,59 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.aws_event_bridge_list_response_attributes import ( + AWSEventBridgeListResponseAttributes, + ) + from datadog_api_client.v2.model.aws_event_bridge_type import AWSEventBridgeType + + +class AWSEventBridgeListResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.aws_event_bridge_list_response_attributes import ( + AWSEventBridgeListResponseAttributes, + ) + from datadog_api_client.v2.model.aws_event_bridge_type import AWSEventBridgeType + + return { + "attributes": (AWSEventBridgeListResponseAttributes,), + "id": (str,), + "type": (AWSEventBridgeType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: AWSEventBridgeListResponseAttributes, type: AWSEventBridgeType, **kwargs): + """ + Amazon EventBridge list response data. + + :param attributes: An object describing the EventBridge configuration for multiple accounts. + :type attributes: AWSEventBridgeListResponseAttributes + + :param id: The ID of the Amazon EventBridge list response data. + :type id: str + + :param type: Amazon EventBridge resource type. + :type type: AWSEventBridgeType + """ + super().__init__(kwargs) + id = kwargs.get("id", "get_event_bridge") + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_source.py b/src/datadog_api_client/v2/model/aws_event_bridge_source.py new file mode 100644 index 0000000000..cf66ebc49e --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_source.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class AWSEventBridgeSource(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + "region": (str,), + } + + attribute_map = { + "name": "name", + "region": "region", + } + + def __init__(self_, name: Union[str, UnsetType] = unset, region: Union[str, UnsetType] = unset, **kwargs): + """ + An EventBridge source. + + :param name: The event source name. + :type name: str, optional + + :param region: The event source's + `AWS region `_. + :type region: str, optional + """ + if name is not unset: + kwargs["name"] = name + if region is not unset: + kwargs["region"] = region + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/aws_event_bridge_type.py b/src/datadog_api_client/v2/model/aws_event_bridge_type.py new file mode 100644 index 0000000000..acc8a872da --- /dev/null +++ b/src/datadog_api_client/v2/model/aws_event_bridge_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AWSEventBridgeType(ModelSimple): + """ + Amazon EventBridge resource type. + + :param value: If omitted defaults to "event_bridge". Must be one of ["event_bridge"]. + :type value: str + """ + + allowed_values = { + "event_bridge", + } + EVENT_BRIDGE: ClassVar["AWSEventBridgeType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AWSEventBridgeType.EVENT_BRIDGE = AWSEventBridgeType("event_bridge") diff --git a/src/datadog_api_client/v2/model/aws_lambda_forwarder_config.py b/src/datadog_api_client/v2/model/aws_lambda_forwarder_config.py index 13f84be2bf..40dcc2ebff 100644 --- a/src/datadog_api_client/v2/model/aws_lambda_forwarder_config.py +++ b/src/datadog_api_client/v2/model/aws_lambda_forwarder_config.py @@ -46,8 +46,9 @@ def __init__( **kwargs, ): """ - Log Autosubscription configuration for Datadog Forwarder Lambda functions. Automatically set up triggers for existing - and new logs for some services, ensuring no logs from new resources are missed and saving time spent on manual configuration. + Log Autosubscription configuration for Datadog Forwarder Lambda functions. + Automatically set up triggers for existing and new logs for some services, + ensuring no logs from new resources are missed and saving time spent on manual configuration. :param lambdas: List of Datadog Lambda Log Forwarder ARNs in your AWS account. Defaults to ``[]``. :type lambdas: [str], optional @@ -55,8 +56,10 @@ def __init__( :param log_source_config: Log source configuration. :type log_source_config: AWSLambdaForwarderConfigLogSourceConfig, optional - :param sources: List of service IDs set to enable automatic log collection. Discover the list of available services with the - `Get list of AWS log ready services `_ endpoint. + :param sources: List of service IDs set to enable automatic log collection. + Discover the list of available services with the + `Get list of AWS log ready services `_ + endpoint. :type sources: [str], optional """ if lambdas is not unset: diff --git a/src/datadog_api_client/v2/model/aws_log_source_tag_filter.py b/src/datadog_api_client/v2/model/aws_log_source_tag_filter.py index 200ae8c9ba..07e3d833c8 100644 --- a/src/datadog_api_client/v2/model/aws_log_source_tag_filter.py +++ b/src/datadog_api_client/v2/model/aws_log_source_tag_filter.py @@ -32,9 +32,13 @@ def __init__( ): """ AWS log source tag filter list. Defaults to ``[]``. - Array of log source to AWS resource tag mappings. Each mapping contains a log source and its associated AWS resource tags (in ``key:value`` format) used to filter logs submitted to Datadog. - Tag filters are applied for tags on the AWS resource emitting logs; tags associated with the log storage entity (such as a CloudWatch Log Group or S3 Bucket) are not considered. - For more information on resource tag filter syntax, `see AWS resource exclusion `_ in the AWS integration billing page. + Array of log source to AWS resource tag mappings. Each mapping contains a log source and its + associated AWS resource tags (in ``key:value`` format) used to filter logs submitted to Datadog. + Tag filters are applied for tags on the AWS resource emitting logs; tags associated with the + log storage entity (such as a CloudWatch Log Group or S3 Bucket) are not considered. + For more information on resource tag filter syntax, + `see AWS resource exclusion `_ + in the AWS integration billing page. :param source: The AWS log source to which the tag filters defined in ``tags`` are applied. :type source: str, optional diff --git a/src/datadog_api_client/v2/model/aws_logs_config.py b/src/datadog_api_client/v2/model/aws_logs_config.py index 569c02cec6..a56d79453d 100644 --- a/src/datadog_api_client/v2/model/aws_logs_config.py +++ b/src/datadog_api_client/v2/model/aws_logs_config.py @@ -34,8 +34,9 @@ def __init__(self_, lambda_forwarder: Union[AWSLambdaForwarderConfig, UnsetType] """ AWS Logs Collection config. - :param lambda_forwarder: Log Autosubscription configuration for Datadog Forwarder Lambda functions. Automatically set up triggers for existing - and new logs for some services, ensuring no logs from new resources are missed and saving time spent on manual configuration. + :param lambda_forwarder: Log Autosubscription configuration for Datadog Forwarder Lambda functions. + Automatically set up triggers for existing and new logs for some services, + ensuring no logs from new resources are missed and saving time spent on manual configuration. :type lambda_forwarder: AWSLambdaForwarderConfig, optional """ if lambda_forwarder is not unset: diff --git a/src/datadog_api_client/v2/model/aws_namespace_filters.py b/src/datadog_api_client/v2/model/aws_namespace_filters.py index e3477d1ff1..f1ebc103dc 100644 --- a/src/datadog_api_client/v2/model/aws_namespace_filters.py +++ b/src/datadog_api_client/v2/model/aws_namespace_filters.py @@ -15,8 +15,10 @@ def __init__(self, **kwargs): """ AWS Metrics namespace filters. Defaults to ``exclude_only``. - :param exclude_only: Exclude only these namespaces from metrics collection. Defaults to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. - `AWS/SQS`, `AWS/ElasticMapReduce`, and `AWS/Usage` are excluded by default to reduce your AWS CloudWatch costs from `GetMetricData` API calls. + :param exclude_only: Exclude only these namespaces from metrics collection. + Defaults to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. + `AWS/SQS`, `AWS/ElasticMapReduce`, and `AWS/Usage` are excluded by default + to reduce your AWS CloudWatch costs from `GetMetricData` API calls. :type exclude_only: [str] :param include_only: Include only these namespaces. diff --git a/src/datadog_api_client/v2/model/aws_namespace_filters_exclude_only.py b/src/datadog_api_client/v2/model/aws_namespace_filters_exclude_only.py index 59b444bf7c..4cfc03b65e 100644 --- a/src/datadog_api_client/v2/model/aws_namespace_filters_exclude_only.py +++ b/src/datadog_api_client/v2/model/aws_namespace_filters_exclude_only.py @@ -24,11 +24,15 @@ def openapi_types(_): def __init__(self_, exclude_only: List[str], **kwargs): """ - Exclude only these namespaces from metrics collection. Defaults to ``["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]``. - ``AWS/SQS`` , ``AWS/ElasticMapReduce`` , and ``AWS/Usage`` are excluded by default to reduce your AWS CloudWatch costs from ``GetMetricData`` API calls. - - :param exclude_only: Exclude only these namespaces from metrics collection. Defaults to ``["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]``. - ``AWS/SQS`` , ``AWS/ElasticMapReduce`` , and ``AWS/Usage`` are excluded by default to reduce your AWS CloudWatch costs from ``GetMetricData`` API calls. + Exclude only these namespaces from metrics collection. + Defaults to ``["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]``. + ``AWS/SQS`` , ``AWS/ElasticMapReduce`` , and ``AWS/Usage`` are excluded by default + to reduce your AWS CloudWatch costs from ``GetMetricData`` API calls. + + :param exclude_only: Exclude only these namespaces from metrics collection. + Defaults to ``["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]``. + ``AWS/SQS`` , ``AWS/ElasticMapReduce`` , and ``AWS/Usage`` are excluded by default + to reduce your AWS CloudWatch costs from ``GetMetricData`` API calls. :type exclude_only: [str] """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/aws_namespace_tag_filter.py b/src/datadog_api_client/v2/model/aws_namespace_tag_filter.py index 727fcb0a78..8c80d08883 100644 --- a/src/datadog_api_client/v2/model/aws_namespace_tag_filter.py +++ b/src/datadog_api_client/v2/model/aws_namespace_tag_filter.py @@ -32,10 +32,12 @@ def __init__( ): """ AWS Metrics Collection tag filters list. Defaults to ``[]``. - The array of custom AWS resource tags (in the form ``key:value`` ) defines a filter that Datadog uses when collecting metrics from a specified service. - Wildcards, such as ``?`` (match a single character) and ``*`` (match multiple characters), and exclusion using ``!`` before the tag are supported. - For EC2, only hosts that match one of the defined tags will be imported into Datadog. The rest will be ignored. - For example, ``env:production,instance-type:c?.*,!region:us-east-1``. + The array of custom AWS resource tags (in the form ``key:value`` ) defines a filter that Datadog uses + when collecting metrics from a specified service. + Wildcards, such as ``?`` (match a single character) and ``*`` (match multiple characters), + and exclusion using ``!`` before the tag are supported. + For EC2, only hosts that match one of the defined tags are imported into Datadog. + The rest are ignored. For example, ``env:production,instance-type:c?.*,!region:us-east-1``. :param namespace: The AWS service for which the tag filters defined in ``tags`` will be applied. :type namespace: str, optional diff --git a/src/datadog_api_client/v2/model/aws_resources_config.py b/src/datadog_api_client/v2/model/aws_resources_config.py index 929f4b2a22..ffb5057395 100644 --- a/src/datadog_api_client/v2/model/aws_resources_config.py +++ b/src/datadog_api_client/v2/model/aws_resources_config.py @@ -35,10 +35,13 @@ def __init__( """ AWS Resources Collection config. - :param cloud_security_posture_management_collection: Enable Cloud Security Management to scan AWS resources for vulnerabilities, misconfigurations, identity risks, and compliance violations. Defaults to ``false``. Requires ``extended_collection`` to be set to ``true``. + :param cloud_security_posture_management_collection: Enable Cloud Security Management to scan AWS resources for vulnerabilities, misconfigurations, + identity risks, and compliance violations. Defaults to ``false``. + Requires ``extended_collection`` to be set to ``true``. :type cloud_security_posture_management_collection: bool, optional - :param extended_collection: Whether Datadog collects additional attributes and configuration information about the resources in your AWS account. Defaults to ``true``. Required for ``cloud_security_posture_management_collection``. + :param extended_collection: Whether Datadog collects additional attributes and configuration information about the resources + in your AWS account. Defaults to ``true``. Required for ``cloud_security_posture_management_collection``. :type extended_collection: bool, optional """ if cloud_security_posture_management_collection is not unset: diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index b34ed37bbd..1cc56b0de1 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -35,6 +35,30 @@ from datadog_api_client.v2.model.aws_auth_config_role import AWSAuthConfigRole from datadog_api_client.v2.model.aws_credentials import AWSCredentials from datadog_api_client.v2.model.aws_credentials_update import AWSCredentialsUpdate +from datadog_api_client.v2.model.aws_event_bridge_account_configuration import AWSEventBridgeAccountConfiguration +from datadog_api_client.v2.model.aws_event_bridge_create_request import AWSEventBridgeCreateRequest +from datadog_api_client.v2.model.aws_event_bridge_create_request_attributes import AWSEventBridgeCreateRequestAttributes +from datadog_api_client.v2.model.aws_event_bridge_create_request_data import AWSEventBridgeCreateRequestData +from datadog_api_client.v2.model.aws_event_bridge_create_response import AWSEventBridgeCreateResponse +from datadog_api_client.v2.model.aws_event_bridge_create_response_attributes import ( + AWSEventBridgeCreateResponseAttributes, +) +from datadog_api_client.v2.model.aws_event_bridge_create_response_data import AWSEventBridgeCreateResponseData +from datadog_api_client.v2.model.aws_event_bridge_create_status import AWSEventBridgeCreateStatus +from datadog_api_client.v2.model.aws_event_bridge_delete_request import AWSEventBridgeDeleteRequest +from datadog_api_client.v2.model.aws_event_bridge_delete_request_attributes import AWSEventBridgeDeleteRequestAttributes +from datadog_api_client.v2.model.aws_event_bridge_delete_request_data import AWSEventBridgeDeleteRequestData +from datadog_api_client.v2.model.aws_event_bridge_delete_response import AWSEventBridgeDeleteResponse +from datadog_api_client.v2.model.aws_event_bridge_delete_response_attributes import ( + AWSEventBridgeDeleteResponseAttributes, +) +from datadog_api_client.v2.model.aws_event_bridge_delete_response_data import AWSEventBridgeDeleteResponseData +from datadog_api_client.v2.model.aws_event_bridge_delete_status import AWSEventBridgeDeleteStatus +from datadog_api_client.v2.model.aws_event_bridge_list_response import AWSEventBridgeListResponse +from datadog_api_client.v2.model.aws_event_bridge_list_response_attributes import AWSEventBridgeListResponseAttributes +from datadog_api_client.v2.model.aws_event_bridge_list_response_data import AWSEventBridgeListResponseData +from datadog_api_client.v2.model.aws_event_bridge_source import AWSEventBridgeSource +from datadog_api_client.v2.model.aws_event_bridge_type import AWSEventBridgeType from datadog_api_client.v2.model.aws_integration import AWSIntegration from datadog_api_client.v2.model.aws_integration_iam_permissions_response import AWSIntegrationIamPermissionsResponse from datadog_api_client.v2.model.aws_integration_iam_permissions_response_attributes import ( @@ -4691,6 +4715,26 @@ "AWSAuthConfigRole", "AWSCredentials", "AWSCredentialsUpdate", + "AWSEventBridgeAccountConfiguration", + "AWSEventBridgeCreateRequest", + "AWSEventBridgeCreateRequestAttributes", + "AWSEventBridgeCreateRequestData", + "AWSEventBridgeCreateResponse", + "AWSEventBridgeCreateResponseAttributes", + "AWSEventBridgeCreateResponseData", + "AWSEventBridgeCreateStatus", + "AWSEventBridgeDeleteRequest", + "AWSEventBridgeDeleteRequestAttributes", + "AWSEventBridgeDeleteRequestData", + "AWSEventBridgeDeleteResponse", + "AWSEventBridgeDeleteResponseAttributes", + "AWSEventBridgeDeleteResponseData", + "AWSEventBridgeDeleteStatus", + "AWSEventBridgeListResponse", + "AWSEventBridgeListResponseAttributes", + "AWSEventBridgeListResponseData", + "AWSEventBridgeSource", + "AWSEventBridgeType", "AWSIntegration", "AWSIntegrationIamPermissionsResponse", "AWSIntegrationIamPermissionsResponseAttributes", diff --git a/tests/v2/features/aws_integration.feature b/tests/v2/features/aws_integration.feature index 16522a97cf..30ded64d73 100644 --- a/tests/v2/features/aws_integration.feature +++ b/tests/v2/features/aws_integration.feature @@ -38,6 +38,27 @@ Feature: AWS Integration When the request is sent Then the response status is 409 Conflict + @generated @skip @team:DataDog/aws-integrations + Scenario: Create an Amazon EventBridge source returns "Amazon EventBridge source created." response + Given new "CreateAWSEventBridgeSource" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "create_event_bus": true, "event_generator_name": "app-alerts", "region": "us-east-1"}, "type": "event_bridge"}} + When the request is sent + Then the response status is 200 Amazon EventBridge source created. + + @generated @skip @team:DataDog/aws-integrations + Scenario: Create an Amazon EventBridge source returns "Bad Request" response + Given new "CreateAWSEventBridgeSource" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "create_event_bus": true, "event_generator_name": "app-alerts", "region": "us-east-1"}, "type": "event_bridge"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aws-integrations + Scenario: Create an Amazon EventBridge source returns "Conflict" response + Given new "CreateAWSEventBridgeSource" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "create_event_bus": true, "event_generator_name": "app-alerts", "region": "us-east-1"}, "type": "event_bridge"}} + When the request is sent + Then the response status is 409 Conflict + @team:DataDog/aws-integrations Scenario: Delete an AWS integration returns "Bad Request" response Given new "DeleteAWSAccount" request @@ -61,6 +82,20 @@ Feature: AWS Integration When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/aws-integrations + Scenario: Delete an Amazon EventBridge source returns "Amazon EventBridge source deleted." response + Given new "DeleteAWSEventBridgeSource" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "event_generator_name": "app-alerts-zyxw3210", "region": "us-east-1"}, "type": "event_bridge"}} + When the request is sent + Then the response status is 200 Amazon EventBridge source deleted. + + @generated @skip @team:DataDog/aws-integrations + Scenario: Delete an Amazon EventBridge source returns "Bad Request" response + Given new "DeleteAWSEventBridgeSource" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "event_generator_name": "app-alerts-zyxw3210", "region": "us-east-1"}, "type": "event_bridge"}} + When the request is sent + Then the response status is 400 Bad Request + @team:DataDog/aws-integrations Scenario: Generate a new external ID returns "AWS External ID object" response Given new "CreateNewAWSExternalID" request @@ -91,6 +126,18 @@ Feature: AWS Integration When the request is sent Then the response status is 200 AWS integration standard IAM permissions. + @generated @skip @team:DataDog/aws-integrations + Scenario: Get all Amazon EventBridge sources returns "Amazon EventBridge sources list." response + Given new "ListAWSEventBridgeSources" request + When the request is sent + Then the response status is 200 Amazon EventBridge sources list. + + @generated @skip @team:DataDog/aws-integrations + Scenario: Get all Amazon EventBridge sources returns "Bad Request" response + Given new "ListAWSEventBridgeSources" request + When the request is sent + Then the response status is 400 Bad Request + @team:DataDog/aws-integrations Scenario: Get an AWS integration by config ID returns "AWS Account object" response Given there is a valid "aws_account_v2" in the system diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index eb1380ab6b..ec7eca2cfd 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -1712,6 +1712,26 @@ "type": "safe" } }, + "DeleteAWSEventBridgeSource": { + "tag": "AWS Integration", + "undo": { + "type": "idempotent" + } + }, + "ListAWSEventBridgeSources": { + "tag": "AWS Integration", + "undo": { + "type": "safe" + } + }, + "CreateAWSEventBridgeSource": { + "tag": "AWS Integration", + "undo": { + "operationId": "DeleteAWSEventBridgeSource", + "parameters": [], + "type": "unsafe" + } + }, "CreateNewAWSExternalID": { "tag": "AWS Integration", "undo": {