diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index f505173333..0f6baca424 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -27347,6 +27347,7 @@ paths: - hosts_read /api/v1/integration/aws: delete: + deprecated: true description: Delete a Datadog-AWS integration matching the specified `account_id` and `role_name parameters`. operationId: DeleteAWSAccount @@ -27393,6 +27394,7 @@ paths: permissions: - aws_configurations_manage get: + deprecated: true description: List all Datadog-AWS integrations available in your Datadog organization. operationId: ListAWSAccounts parameters: @@ -27443,6 +27445,7 @@ paths: permissions: - aws_configuration_read post: + deprecated: true description: 'Create a Datadog-Amazon Web Services integration. Using the `POST` method updates your integration configuration @@ -27494,6 +27497,7 @@ paths: permissions: - aws_configurations_manage put: + deprecated: true description: Update a Datadog-Amazon Web Services integration. operationId: UpdateAWSAccount parameters: @@ -27563,6 +27567,7 @@ paths: - aws_configuration_edit /api/v1/integration/aws/available_namespace_rules: get: + deprecated: true description: List all namespace rules for a given Datadog-AWS integration. This endpoint takes no arguments. operationId: ListAvailableAWSNamespaces @@ -27708,6 +27713,7 @@ paths: - manage_integrations /api/v1/integration/aws/filtering: delete: + deprecated: true description: Delete a tag filtering entry. operationId: DeleteAWSTagFilter requestBody: @@ -27749,6 +27755,7 @@ paths: permissions: - aws_configuration_edit get: + deprecated: true description: Get all AWS tag filters. operationId: ListAWSTagFilters parameters: @@ -27787,6 +27794,7 @@ paths: permissions: - aws_configuration_read post: + deprecated: true description: Set an AWS tag filter. operationId: CreateAWSTagFilter requestBody: @@ -27832,6 +27840,7 @@ paths: - aws_configuration_edit /api/v1/integration/aws/generate_new_external_id: put: + deprecated: true description: Generate a new AWS external ID for a given AWS account ID and role name pair. operationId: CreateNewAWSExternalID @@ -27917,6 +27926,7 @@ paths: permissions: - aws_configuration_edit get: + deprecated: true description: List all Datadog-AWS Logs integrations configured in your Datadog account. operationId: ListAWSLogsIntegrations @@ -28058,6 +28068,7 @@ paths: - aws_configuration_read /api/v1/integration/aws/logs/services: get: + deprecated: true description: Get the list of current AWS services that Datadog offers automatic log collection. Use returned service IDs with the services parameter for the Enable an AWS service log collection API endpoint. @@ -28100,6 +28111,7 @@ paths: permissions: - aws_configuration_read post: + deprecated: true description: Enable automatic log collection for a list of services. This should be run after running `CreateAWSLambdaARN` to save the configuration. operationId: EnableAWSLogServices diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 21a2d895b2..f4b9ba788f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -55263,9 +55263,6 @@ paths: operator: OR permissions: - aws_configuration_read - x-unstable: '**Note: This endpoint is in Preview. If you have any feedback, - - contact [Datadog support](https://docs.datadoghq.com/help/).**' post: description: Create a new AWS Account Integration Config. operationId: CreateAWSAccount @@ -55298,9 +55295,6 @@ paths: operator: OR permissions: - aws_configurations_manage - x-unstable: '**Note: This endpoint is in Preview. If you have any feedback, - - contact [Datadog support](https://docs.datadoghq.com/help/).**' /api/v2/integration/aws/accounts/{aws_account_config_id}: delete: description: Delete an AWS Account Integration Config by config ID. @@ -55325,9 +55319,6 @@ paths: operator: OR permissions: - aws_configurations_manage - x-unstable: '**Note: This endpoint is in Preview. If you have any feedback, - - contact [Datadog support](https://docs.datadoghq.com/help/).**' get: description: Get an AWS Account Integration Config by config ID. operationId: GetAWSAccount @@ -55355,9 +55346,6 @@ paths: operator: OR permissions: - aws_configuration_read - x-unstable: '**Note: This endpoint is in Preview. If you have any feedback, - - contact [Datadog support](https://docs.datadoghq.com/help/).**' patch: description: Update an AWS Account Integration Config by config ID. operationId: UpdateAWSAccount @@ -55392,9 +55380,6 @@ paths: operator: OR permissions: - aws_configuration_edit - x-unstable: '**Note: This endpoint is in Preview. If you have any feedback, - - contact [Datadog support](https://docs.datadoghq.com/help/).**' /api/v2/integration/aws/available_namespaces: get: description: Get a list of available AWS CloudWatch namespaces that can send @@ -55418,9 +55403,6 @@ paths: operator: OR permissions: - aws_configuration_read - x-unstable: '**Note: This endpoint is in Preview. If you have any feedback, - - contact [Datadog support](https://docs.datadoghq.com/help/).**' /api/v2/integration/aws/generate_new_external_id: post: description: Generate a new external ID for AWS role-based authentication. @@ -55443,9 +55425,6 @@ paths: operator: OR permissions: - aws_configuration_edit - x-unstable: '**Note: This endpoint is in Preview. If you have any feedback, - - contact [Datadog support](https://docs.datadoghq.com/help/).**' /api/v2/integration/aws/iam_permissions: get: description: Get all AWS IAM permissions required for the AWS integration. @@ -55484,9 +55463,6 @@ paths: operator: OR permissions: - aws_configuration_read - x-unstable: '**Note: This endpoint is in public beta. If you have any feedback, - - contact [Datadog support](https://docs.datadoghq.com/help/).**' /api/v2/integration/gcp/accounts: get: description: List all GCP STS-enabled service accounts configured in your Datadog diff --git a/examples/v2/aws-integration/CreateAWSAccount.py b/examples/v2/aws-integration/CreateAWSAccount.py index 0f82f9eeed..d9f1dc3093 100644 --- a/examples/v2/aws-integration/CreateAWSAccount.py +++ b/examples/v2/aws-integration/CreateAWSAccount.py @@ -78,7 +78,6 @@ ) configuration = Configuration() -configuration.unstable_operations["create_aws_account"] = True with ApiClient(configuration) as api_client: api_instance = AWSIntegrationApi(api_client) response = api_instance.create_aws_account(body=body) diff --git a/examples/v2/aws-integration/CreateAWSAccount_1716720881.py b/examples/v2/aws-integration/CreateAWSAccount_1716720881.py index 57897464e2..a69f8da768 100644 --- a/examples/v2/aws-integration/CreateAWSAccount_1716720881.py +++ b/examples/v2/aws-integration/CreateAWSAccount_1716720881.py @@ -77,7 +77,6 @@ ) configuration = Configuration() -configuration.unstable_operations["create_aws_account"] = True with ApiClient(configuration) as api_client: api_instance = AWSIntegrationApi(api_client) response = api_instance.create_aws_account(body=body) diff --git a/examples/v2/aws-integration/CreateNewAWSExternalID.py b/examples/v2/aws-integration/CreateNewAWSExternalID.py index b24fb08720..e5bdb09cc7 100644 --- a/examples/v2/aws-integration/CreateNewAWSExternalID.py +++ b/examples/v2/aws-integration/CreateNewAWSExternalID.py @@ -6,7 +6,6 @@ from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi configuration = Configuration() -configuration.unstable_operations["create_new_aws_external_id"] = True with ApiClient(configuration) as api_client: api_instance = AWSIntegrationApi(api_client) response = api_instance.create_new_aws_external_id() diff --git a/examples/v2/aws-integration/CreateNewAWSExternalID_364713854.py b/examples/v2/aws-integration/CreateNewAWSExternalID_364713854.py index 565ece561e..efb0161012 100644 --- a/examples/v2/aws-integration/CreateNewAWSExternalID_364713854.py +++ b/examples/v2/aws-integration/CreateNewAWSExternalID_364713854.py @@ -6,7 +6,6 @@ from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi configuration = Configuration() -configuration.unstable_operations["create_new_aws_external_id"] = True with ApiClient(configuration) as api_client: api_instance = AWSIntegrationApi(api_client) response = api_instance.create_new_aws_external_id() diff --git a/examples/v2/aws-integration/DeleteAWSAccount.py b/examples/v2/aws-integration/DeleteAWSAccount.py index 5ad5529007..6acc78ba7c 100644 --- a/examples/v2/aws-integration/DeleteAWSAccount.py +++ b/examples/v2/aws-integration/DeleteAWSAccount.py @@ -10,7 +10,6 @@ AWS_ACCOUNT_V2_DATA_ID = environ["AWS_ACCOUNT_V2_DATA_ID"] configuration = Configuration() -configuration.unstable_operations["delete_aws_account"] = True with ApiClient(configuration) as api_client: api_instance = AWSIntegrationApi(api_client) api_instance.delete_aws_account( diff --git a/examples/v2/aws-integration/GetAWSAccount.py b/examples/v2/aws-integration/GetAWSAccount.py index cbbbec533d..2344a1f681 100644 --- a/examples/v2/aws-integration/GetAWSAccount.py +++ b/examples/v2/aws-integration/GetAWSAccount.py @@ -10,7 +10,6 @@ AWS_ACCOUNT_V2_DATA_ID = environ["AWS_ACCOUNT_V2_DATA_ID"] configuration = Configuration() -configuration.unstable_operations["get_aws_account"] = True with ApiClient(configuration) as api_client: api_instance = AWSIntegrationApi(api_client) response = api_instance.get_aws_account( diff --git a/examples/v2/aws-integration/ListAWSAccounts.py b/examples/v2/aws-integration/ListAWSAccounts.py index 8c968b1998..6cad70b5ab 100644 --- a/examples/v2/aws-integration/ListAWSAccounts.py +++ b/examples/v2/aws-integration/ListAWSAccounts.py @@ -6,7 +6,6 @@ from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi configuration = Configuration() -configuration.unstable_operations["list_aws_accounts"] = True with ApiClient(configuration) as api_client: api_instance = AWSIntegrationApi(api_client) response = api_instance.list_aws_accounts() diff --git a/examples/v2/aws-integration/ListAWSNamespaces.py b/examples/v2/aws-integration/ListAWSNamespaces.py index 00b627294f..053b916ffc 100644 --- a/examples/v2/aws-integration/ListAWSNamespaces.py +++ b/examples/v2/aws-integration/ListAWSNamespaces.py @@ -6,7 +6,6 @@ from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi configuration = Configuration() -configuration.unstable_operations["list_aws_namespaces"] = True with ApiClient(configuration) as api_client: api_instance = AWSIntegrationApi(api_client) response = api_instance.list_aws_namespaces() diff --git a/examples/v2/aws-integration/ListAWSNamespaces_3031307873.py b/examples/v2/aws-integration/ListAWSNamespaces_3031307873.py index bd21f60b96..796f0bedd1 100644 --- a/examples/v2/aws-integration/ListAWSNamespaces_3031307873.py +++ b/examples/v2/aws-integration/ListAWSNamespaces_3031307873.py @@ -6,7 +6,6 @@ from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi configuration = Configuration() -configuration.unstable_operations["list_aws_namespaces"] = True with ApiClient(configuration) as api_client: api_instance = AWSIntegrationApi(api_client) response = api_instance.list_aws_namespaces() diff --git a/examples/v2/aws-integration/UpdateAWSAccount.py b/examples/v2/aws-integration/UpdateAWSAccount.py index 44cf0b2701..9491c725a1 100644 --- a/examples/v2/aws-integration/UpdateAWSAccount.py +++ b/examples/v2/aws-integration/UpdateAWSAccount.py @@ -81,7 +81,6 @@ ) configuration = Configuration() -configuration.unstable_operations["update_aws_account"] = True with ApiClient(configuration) as api_client: api_instance = AWSIntegrationApi(api_client) response = api_instance.update_aws_account(aws_account_config_id=AWS_ACCOUNT_V2_DATA_ID, body=body) diff --git a/examples/v2/aws-logs-integration/ListAWSLogsServices.py b/examples/v2/aws-logs-integration/ListAWSLogsServices.py index 530f82262f..6860a8bf7d 100644 --- a/examples/v2/aws-logs-integration/ListAWSLogsServices.py +++ b/examples/v2/aws-logs-integration/ListAWSLogsServices.py @@ -6,7 +6,6 @@ from datadog_api_client.v2.api.aws_logs_integration_api import AWSLogsIntegrationApi configuration = Configuration() -configuration.unstable_operations["list_aws_logs_services"] = True with ApiClient(configuration) as api_client: api_instance = AWSLogsIntegrationApi(api_client) response = api_instance.list_aws_logs_services() diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 6fff1dc6a0..0b3338d111 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -295,14 +295,6 @@ def __init__( "v2.update_incident_notification_template": False, "v2.update_incident_todo": False, "v2.update_incident_type": False, - "v2.create_aws_account": False, - "v2.create_new_aws_external_id": False, - "v2.delete_aws_account": False, - "v2.get_aws_account": False, - "v2.list_aws_accounts": False, - "v2.list_aws_namespaces": False, - "v2.update_aws_account": False, - "v2.list_aws_logs_services": False, "v2.create_monitor_user_template": False, "v2.delete_monitor_user_template": False, "v2.get_monitor_user_template": False, 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 5f957c7747..292ae992c0 100644 --- a/src/datadog_api_client/v1/api/aws_integration_api.py +++ b/src/datadog_api_client/v1/api/aws_integration_api.py @@ -4,6 +4,7 @@ from __future__ import annotations from typing import Any, Dict, List, Union +import warnings from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.configuration import Configuration @@ -302,7 +303,7 @@ def create_aws_account( self, body: AWSAccount, ) -> AWSAccountCreateResponse: - """Create an AWS integration. + """Create an AWS integration. **Deprecated**. Create a Datadog-Amazon Web Services integration. Using the ``POST`` method updates your integration configuration @@ -316,6 +317,7 @@ def create_aws_account( kwargs: Dict[str, Any] = {} kwargs["body"] = body + warnings.warn("create_aws_account is deprecated", DeprecationWarning, stacklevel=2) return self._create_aws_account_endpoint.call_with_http_info(**kwargs) def create_aws_event_bridge_source( @@ -339,7 +341,7 @@ def create_aws_tag_filter( self, body: AWSTagFilterCreateRequest, ) -> dict: - """Set an AWS tag filter. + """Set an AWS tag filter. **Deprecated**. Set an AWS tag filter. @@ -351,13 +353,14 @@ def create_aws_tag_filter( kwargs: Dict[str, Any] = {} kwargs["body"] = body + warnings.warn("create_aws_tag_filter is deprecated", DeprecationWarning, stacklevel=2) return self._create_aws_tag_filter_endpoint.call_with_http_info(**kwargs) def create_new_aws_external_id( self, body: AWSAccount, ) -> AWSAccountCreateResponse: - """Generate a new external ID. + """Generate a new external ID. **Deprecated**. Generate a new AWS external ID for a given AWS account ID and role name pair. @@ -370,13 +373,14 @@ def create_new_aws_external_id( kwargs: Dict[str, Any] = {} kwargs["body"] = body + warnings.warn("create_new_aws_external_id is deprecated", DeprecationWarning, stacklevel=2) return self._create_new_aws_external_id_endpoint.call_with_http_info(**kwargs) def delete_aws_account( self, body: AWSAccountDeleteRequest, ) -> dict: - """Delete an AWS integration. + """Delete an AWS integration. **Deprecated**. Delete a Datadog-AWS integration matching the specified ``account_id`` and ``role_name parameters``. @@ -387,6 +391,7 @@ def delete_aws_account( kwargs: Dict[str, Any] = {} kwargs["body"] = body + warnings.warn("delete_aws_account is deprecated", DeprecationWarning, stacklevel=2) return self._delete_aws_account_endpoint.call_with_http_info(**kwargs) def delete_aws_event_bridge_source( @@ -410,7 +415,7 @@ def delete_aws_tag_filter( self, body: AWSTagFilterDeleteRequest, ) -> dict: - """Delete a tag filtering entry. + """Delete a tag filtering entry. **Deprecated**. Delete a tag filtering entry. @@ -421,18 +426,20 @@ def delete_aws_tag_filter( kwargs: Dict[str, Any] = {} kwargs["body"] = body + warnings.warn("delete_aws_tag_filter is deprecated", DeprecationWarning, stacklevel=2) return self._delete_aws_tag_filter_endpoint.call_with_http_info(**kwargs) def list_available_aws_namespaces( self, ) -> List[str]: - """List namespace rules. + """List namespace rules. **Deprecated**. List all namespace rules for a given Datadog-AWS integration. This endpoint takes no arguments. :rtype: [str] """ kwargs: Dict[str, Any] = {} + warnings.warn("list_available_aws_namespaces is deprecated", DeprecationWarning, stacklevel=2) return self._list_available_aws_namespaces_endpoint.call_with_http_info(**kwargs) def list_aws_accounts( @@ -442,7 +449,7 @@ def list_aws_accounts( role_name: Union[str, UnsetType] = unset, access_key_id: Union[str, UnsetType] = unset, ) -> AWSAccountListResponse: - """List all AWS integrations. + """List all AWS integrations. **Deprecated**. List all Datadog-AWS integrations available in your Datadog organization. @@ -464,6 +471,7 @@ def list_aws_accounts( if access_key_id is not unset: kwargs["access_key_id"] = access_key_id + warnings.warn("list_aws_accounts is deprecated", DeprecationWarning, stacklevel=2) return self._list_aws_accounts_endpoint.call_with_http_info(**kwargs) def list_aws_event_bridge_sources( @@ -482,7 +490,7 @@ def list_aws_tag_filters( self, account_id: str, ) -> AWSTagFilterListResponse: - """Get all AWS tag filters. + """Get all AWS tag filters. **Deprecated**. Get all AWS tag filters. @@ -493,6 +501,7 @@ def list_aws_tag_filters( kwargs: Dict[str, Any] = {} kwargs["account_id"] = account_id + warnings.warn("list_aws_tag_filters is deprecated", DeprecationWarning, stacklevel=2) return self._list_aws_tag_filters_endpoint.call_with_http_info(**kwargs) def update_aws_account( @@ -503,7 +512,7 @@ def update_aws_account( role_name: Union[str, UnsetType] = unset, access_key_id: Union[str, UnsetType] = unset, ) -> dict: - """Update an AWS integration. + """Update an AWS integration. **Deprecated**. Update a Datadog-Amazon Web Services integration. @@ -531,4 +540,5 @@ def update_aws_account( kwargs["body"] = body + warnings.warn("update_aws_account is deprecated", DeprecationWarning, stacklevel=2) return self._update_aws_account_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v1/api/aws_logs_integration_api.py b/src/datadog_api_client/v1/api/aws_logs_integration_api.py index a01f850301..a02a3444ee 100644 --- a/src/datadog_api_client/v1/api/aws_logs_integration_api.py +++ b/src/datadog_api_client/v1/api/aws_logs_integration_api.py @@ -4,6 +4,7 @@ from __future__ import annotations from typing import Any, Dict, List +import warnings from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.configuration import Configuration @@ -245,7 +246,7 @@ def enable_aws_log_services( self, body: AWSLogsServicesRequest, ) -> dict: - """Enable an AWS Logs integration. + """Enable an AWS Logs integration. **Deprecated**. Enable automatic log collection for a list of services. This should be run after running ``CreateAWSLambdaARN`` to save the configuration. @@ -256,28 +257,31 @@ def enable_aws_log_services( kwargs: Dict[str, Any] = {} kwargs["body"] = body + warnings.warn("enable_aws_log_services is deprecated", DeprecationWarning, stacklevel=2) return self._enable_aws_log_services_endpoint.call_with_http_info(**kwargs) def list_aws_logs_integrations( self, ) -> List[AWSLogsListResponse]: - """List all AWS Logs integrations. + """List all AWS Logs integrations. **Deprecated**. List all Datadog-AWS Logs integrations configured in your Datadog account. :rtype: [AWSLogsListResponse] """ kwargs: Dict[str, Any] = {} + warnings.warn("list_aws_logs_integrations is deprecated", DeprecationWarning, stacklevel=2) return self._list_aws_logs_integrations_endpoint.call_with_http_info(**kwargs) def list_aws_logs_services( self, ) -> List[AWSLogsListServicesResponse]: - """Get list of AWS log ready services. + """Get list of AWS log ready services. **Deprecated**. Get the list of current AWS services that Datadog offers automatic log collection. Use returned service IDs with the services parameter for the Enable an AWS service log collection API endpoint. :rtype: [AWSLogsListServicesResponse] """ kwargs: Dict[str, Any] = {} + warnings.warn("list_aws_logs_services is deprecated", DeprecationWarning, stacklevel=2) return self._list_aws_logs_services_endpoint.call_with_http_info(**kwargs) diff --git a/tests/v2/features/aws_integration.feature b/tests/v2/features/aws_integration.feature index e0f1d4d726..a672cfebe7 100644 --- a/tests/v2/features/aws_integration.feature +++ b/tests/v2/features/aws_integration.feature @@ -11,32 +11,28 @@ Feature: AWS Integration @team:DataDog/aws-integrations Scenario: Create an AWS account returns "AWS Account object" response - Given operation "CreateAWSAccount" enabled - And new "CreateAWSAccount" request + Given new "CreateAWSAccount" request And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} When the request is sent Then the response status is 200 AWS Account object @team:DataDog/aws-integrations Scenario: Create an AWS integration returns "AWS Account object" response - Given operation "CreateAWSAccount" enabled - And new "CreateAWSAccount" request + Given new "CreateAWSAccount" request And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} When the request is sent Then the response status is 200 AWS Account object @team:DataDog/aws-integrations Scenario: Create an AWS integration returns "Bad Request" response - Given operation "CreateAWSAccount" enabled - And new "CreateAWSAccount" request + Given new "CreateAWSAccount" request And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws-invalid", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} When the request is sent Then the response status is 400 Bad Request @team:DataDog/aws-integrations Scenario: Create an AWS integration returns "Conflict" response - Given operation "CreateAWSAccount" enabled - And there is a valid "aws_account_v2" in the system + Given there is a valid "aws_account_v2" in the system And new "CreateAWSAccount" request And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} When the request is sent @@ -44,16 +40,14 @@ Feature: AWS Integration @team:DataDog/aws-integrations Scenario: Delete an AWS integration returns "Bad Request" response - Given operation "DeleteAWSAccount" enabled - And new "DeleteAWSAccount" request + Given new "DeleteAWSAccount" request And request contains "aws_account_config_id" parameter with value "not-a-uuid" When the request is sent Then the response status is 400 Bad Request @team:DataDog/aws-integrations Scenario: Delete an AWS integration returns "No Content" response - Given operation "DeleteAWSAccount" enabled - And there is a valid "aws_account_v2" in the system + Given there is a valid "aws_account_v2" in the system And new "DeleteAWSAccount" request And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id" When the request is sent @@ -61,8 +55,7 @@ Feature: AWS Integration @team:DataDog/aws-integrations Scenario: Delete an AWS integration returns "Not Found" response - Given operation "DeleteAWSAccount" enabled - And there is a valid "aws_account_v2" in the system + Given there is a valid "aws_account_v2" in the system And new "DeleteAWSAccount" request And request contains "aws_account_config_id" parameter with value "448169a8-251c-4344-abee-1c4edef39f7a" When the request is sent @@ -70,15 +63,13 @@ Feature: AWS Integration @team:DataDog/aws-integrations Scenario: Generate a new external ID returns "AWS External ID object" response - Given operation "CreateNewAWSExternalID" enabled - And new "CreateNewAWSExternalID" request + Given new "CreateNewAWSExternalID" request When the request is sent Then the response status is 200 AWS External ID object @team:DataDog/aws-integrations Scenario: Generate new external ID returns "AWS External ID object" response - Given operation "CreateNewAWSExternalID" enabled - And new "CreateNewAWSExternalID" request + Given new "CreateNewAWSExternalID" request When the request is sent Then the response status is 200 AWS External ID object @@ -90,8 +81,7 @@ Feature: AWS Integration @team:DataDog/aws-integrations Scenario: Get an AWS integration by config ID returns "AWS Account object" response - Given operation "GetAWSAccount" enabled - And there is a valid "aws_account_v2" in the system + Given there is a valid "aws_account_v2" in the system And new "GetAWSAccount" request And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id" When the request is sent @@ -99,45 +89,39 @@ Feature: AWS Integration @team:DataDog/aws-integrations Scenario: Get an AWS integration by config ID returns "Bad Request" response - Given operation "GetAWSAccount" enabled - And new "GetAWSAccount" request + Given new "GetAWSAccount" request And request contains "aws_account_config_id" parameter with value "not-a-uuid" 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 "Not Found" response - Given operation "GetAWSAccount" enabled - And new "GetAWSAccount" request + Given new "GetAWSAccount" request And request contains "aws_account_config_id" parameter with value "448169a8-251c-4344-abee-1c4edef39f7a" When the request is sent Then the response status is 404 Not Found @team:DataDog/aws-integrations Scenario: List all AWS integrations returns "AWS Accounts List object" response - Given operation "ListAWSAccounts" enabled - And new "ListAWSAccounts" request + Given new "ListAWSAccounts" request When the request is sent Then the response status is 200 AWS Accounts List object @team:DataDog/aws-integrations Scenario: List available namespaces returns "AWS Namespaces List object" response - Given operation "ListAWSNamespaces" enabled - And new "ListAWSNamespaces" request + Given new "ListAWSNamespaces" request When the request is sent Then the response status is 200 AWS Namespaces List object @team:DataDog/aws-integrations Scenario: List namespaces returns "AWS Namespaces List object" response - Given operation "ListAWSNamespaces" enabled - And new "ListAWSNamespaces" request + Given new "ListAWSNamespaces" request When the request is sent Then the response status is 200 AWS Namespaces List object @team:DataDog/aws-integrations Scenario: Update an AWS integration returns "AWS Account object" response - Given operation "UpdateAWSAccount" enabled - And there is a valid "aws_account_v2" in the system + Given there is a valid "aws_account_v2" in the system And new "UpdateAWSAccount" request And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id" And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} @@ -146,8 +130,7 @@ Feature: AWS Integration @team:DataDog/aws-integrations Scenario: Update an AWS integration returns "Bad Request" response - Given operation "UpdateAWSAccount" enabled - And there is a valid "aws_account_v2" in the system + Given there is a valid "aws_account_v2" in the system And new "UpdateAWSAccount" request And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id" And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} @@ -156,8 +139,7 @@ Feature: AWS Integration @team:DataDog/aws-integrations Scenario: Update an AWS integration returns "Not Found" response - Given operation "UpdateAWSAccount" enabled - And new "UpdateAWSAccount" request + Given new "UpdateAWSAccount" request And request contains "aws_account_config_id" parameter with value "448169a8-251c-4344-abee-1c4edef39f7a" And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} When the request is sent diff --git a/tests/v2/features/aws_logs_integration.feature b/tests/v2/features/aws_logs_integration.feature index 7dcfb894ae..0dc915e579 100644 --- a/tests/v2/features/aws_logs_integration.feature +++ b/tests/v2/features/aws_logs_integration.feature @@ -10,7 +10,6 @@ Feature: AWS Logs Integration Given a valid "apiKeyAuth" key in the system And a valid "appKeyAuth" key in the system And an instance of "AWSLogsIntegration" API - And operation "ListAWSLogsServices" enabled And new "ListAWSLogsServices" request When the request is sent Then the response status is 200 AWS Logs Services List object