diff --git a/.generated-info b/.generated-info index c0aee112f2..5c77867437 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "8001cbb", - "generated": "2025-08-13 20:27:33.480" + "spec_repo_commit": "8d438ee", + "generated": "2025-08-14 20:28:48.521" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5ab5923ba8..7683114879 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1431,26 +1431,29 @@ components: - data type: object AWSAssumeRole: - description: The definition of `AWSAssumeRole` object. + description: The definition of the `AWSAssumeRole` object. properties: account_id: - description: AWS account the connection is created for + description: AWS account the connection is created for. example: '111222333444' pattern: ^\d{12}$ type: string external_id: description: External ID used to scope which connection can be used to assume - the role + the role. example: 33a1011635c44b38a064cf14e82e1d8f readOnly: true type: string + generate_new_external_id: + description: Pass true if the `external_id` should be regenerated. + type: boolean principal_id: - description: AWS account that will assume the role + description: AWS account that will assume the role. example: '123456789012' readOnly: true type: string role: - description: Role to assume + description: Role to assume. example: my-role type: string type: @@ -1461,7 +1464,7 @@ components: - role type: object AWSAssumeRoleType: - description: The definition of `AWSAssumeRoleType` object. + description: The definition of the `AWSAssumeRole` object. enum: - AWSAssumeRole example: AWSAssumeRole @@ -1469,18 +1472,18 @@ components: x-enum-varnames: - AWSASSUMEROLE AWSAssumeRoleUpdate: - description: The definition of `AWSAssumeRoleUpdate` object. + description: The definition of the `AWSAssumeRole` object. properties: account_id: - description: AWS account the connection is created for + description: AWS account the connection is created for. example: '111222333444' pattern: ^\d{12}$ type: string generate_new_external_id: - description: The `AWSAssumeRoleUpdate` `generate_new_external_id`. + description: Pass true if the `external_id` should be regenerated. type: boolean role: - description: Role to assume + description: Role to assume. example: my-role type: string type: @@ -1527,15 +1530,15 @@ components: - role_name type: object AWSCredentials: - description: The definition of `AWSCredentials` object. + description: The definition of the `AWSCredentials` object. oneOf: - $ref: '#/components/schemas/AWSAssumeRole' AWSCredentialsUpdate: - description: The definition of `AWSCredentialsUpdate` object. + description: The definition of the `AWSCredentialsUpdate` object. oneOf: - $ref: '#/components/schemas/AWSAssumeRoleUpdate' AWSIntegration: - description: The definition of `AWSIntegration` object. + description: The definition of the `AWSIntegration` object. properties: credentials: $ref: '#/components/schemas/AWSCredentials' @@ -1594,7 +1597,7 @@ components: x-enum-varnames: - PERMISSIONS AWSIntegrationType: - description: The definition of `AWSIntegrationType` object. + description: The definition of the `AWSIntegrationType` object. enum: - AWS example: AWS @@ -1602,7 +1605,7 @@ components: x-enum-varnames: - AWS AWSIntegrationUpdate: - description: The definition of `AWSIntegrationUpdate` object. + description: The definition of the `AWSIntegrationUpdate` object. properties: credentials: $ref: '#/components/schemas/AWSCredentialsUpdate' @@ -18478,6 +18481,46 @@ components: example: env:production type: string type: array + HTTPBasicAuth: + description: The definition of the `HTTPBasicAuth` object. + properties: + password: + description: Password used for authentication. Saved in a secret store + example: '' + type: string + type: + $ref: '#/components/schemas/HTTPBasicAuthType' + username: + description: Username used for authentication. + example: '' + type: string + required: + - type + - username + - password + type: object + HTTPBasicAuthType: + description: The definition of the `HTTPBasicAuth` object. + enum: + - HTTPBasicAuth + example: HTTPBasicAuth + type: string + x-enum-varnames: + - HTTPBASICAUTH + HTTPBasicAuthUpdate: + description: The definition of the `HTTPBasicAuth` object. + properties: + password: + description: Password used for authentication. Saved in a secret store + type: string + type: + $ref: '#/components/schemas/HTTPBasicAuthType' + username: + description: Username used for authentication. + type: string + required: + - type + type: object HTTPBody: description: The definition of `HTTPBody` object. properties: @@ -18516,13 +18559,17 @@ components: type: array type: object HTTPCredentials: - description: The definition of `HTTPCredentials` object. + description: The definition of the `HTTPCredentials` object. oneOf: - $ref: '#/components/schemas/HTTPTokenAuth' + - $ref: '#/components/schemas/HTTPBasicAuth' + - $ref: '#/components/schemas/HTTPMtlsAuth' HTTPCredentialsUpdate: - description: The definition of `HTTPCredentialsUpdate` object. + description: The definition of the `HTTPCredentialsUpdate` object. oneOf: - $ref: '#/components/schemas/HTTPTokenAuthUpdate' + - $ref: '#/components/schemas/HTTPBasicAuthUpdate' + - $ref: '#/components/schemas/HTTPMtlsAuthUpdate' HTTPHeader: description: The definition of `HTTPHeader` object. properties: @@ -18558,10 +18605,10 @@ components: - name type: object HTTPIntegration: - description: The definition of `HTTPIntegration` object. + description: The definition of the `HTTPIntegration` object. properties: base_url: - description: Base HTTP url for the integration + description: Base HTTP url for the integration. example: http://datadoghq.com type: string credentials: @@ -18574,7 +18621,7 @@ components: - credentials type: object HTTPIntegrationType: - description: The definition of `HTTPIntegrationType` object. + description: The definition of the `HTTPIntegrationType` object. enum: - HTTP example: HTTP @@ -18582,10 +18629,10 @@ components: x-enum-varnames: - HTTP HTTPIntegrationUpdate: - description: The definition of `HTTPIntegrationUpdate` object. + description: The definition of the `HTTPIntegrationUpdate` object. properties: base_url: - description: Base HTTP url for the integration + description: Base HTTP url for the integration. example: http://datadoghq.com type: string credentials: @@ -18671,6 +18718,46 @@ components: required: - message type: object + HTTPMtlsAuth: + description: The definition of the `HTTPMtlsAuth` object. + properties: + certificate: + description: Certificate of authority used to sign the request. + example: '' + type: string + private_key: + description: Private key used for the MTLS handshake + example: '' + type: string + type: + $ref: '#/components/schemas/HTTPMtlsAuthType' + required: + - type + - certificate + - private_key + type: object + HTTPMtlsAuthType: + description: The definition of the `HTTPMtlsAuth` object. + enum: + - HTTPMtlsAuth + example: HTTPMtlsAuth + type: string + x-enum-varnames: + - HTTPMTLSAUTH + HTTPMtlsAuthUpdate: + description: The definition of the `HTTPMtlsAuth` object. + properties: + certificate: + description: Certificate of authority used to sign the request. + type: string + private_key: + description: Private key used for the MTLS handshake + type: string + type: + $ref: '#/components/schemas/HTTPMtlsAuthType' + required: + - type + type: object HTTPToken: description: The definition of `HTTPToken` object. properties: @@ -18716,7 +18803,7 @@ components: - type type: object HTTPTokenAuthType: - description: The definition of `HTTPTokenAuthType` object. + description: The definition of the `HTTPTokenAuth` object. enum: - HTTPTokenAuth example: HTTPTokenAuth diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index babda6e4f0..601ea95cc1 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -8026,6 +8026,27 @@ datadog\_api\_client.v2.model.hourly\_usage\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.http\_basic\_auth module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.http_basic_auth + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.http\_basic\_auth\_type module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.http_basic_auth_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.http\_basic\_auth\_update module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.http_basic_auth_update + :members: + :show-inheritance: + datadog\_api\_client.v2.model.http\_body module ----------------------------------------------- @@ -8110,6 +8131,27 @@ datadog\_api\_client.v2.model.http\_log\_item module :members: :show-inheritance: +datadog\_api\_client.v2.model.http\_mtls\_auth module +----------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.http_mtls_auth + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.http\_mtls\_auth\_type module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.http_mtls_auth_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.http\_mtls\_auth\_update module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.http_mtls_auth_update + :members: + :show-inheritance: + datadog\_api\_client.v2.model.http\_token module ------------------------------------------------ diff --git a/examples/v2/action-connection/CreateActionConnection_247736109.py b/examples/v2/action-connection/CreateActionConnection_247736109.py new file mode 100644 index 0000000000..939f593fd1 --- /dev/null +++ b/examples/v2/action-connection/CreateActionConnection_247736109.py @@ -0,0 +1,39 @@ +""" +Create a new Action Connection with HTTPMtlsAuth returns "Successfully created Action Connection" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.action_connection_api import ActionConnectionApi +from datadog_api_client.v2.model.action_connection_attributes import ActionConnectionAttributes +from datadog_api_client.v2.model.action_connection_data import ActionConnectionData +from datadog_api_client.v2.model.action_connection_data_type import ActionConnectionDataType +from datadog_api_client.v2.model.create_action_connection_request import CreateActionConnectionRequest +from datadog_api_client.v2.model.http_integration import HTTPIntegration +from datadog_api_client.v2.model.http_integration_type import HTTPIntegrationType +from datadog_api_client.v2.model.http_mtls_auth import HTTPMtlsAuth +from datadog_api_client.v2.model.http_mtls_auth_type import HTTPMtlsAuthType + +body = CreateActionConnectionRequest( + data=ActionConnectionData( + type=ActionConnectionDataType.ACTION_CONNECTION, + attributes=ActionConnectionAttributes( + name="HTTP mTLS Connection exampleactionconnection", + integration=HTTPIntegration( + type=HTTPIntegrationType.HTTP, + base_url="https://api.example.com", + credentials=HTTPMtlsAuth( + type=HTTPMtlsAuthType.HTTPMTLSAUTH, + certificate="-----BEGIN CERTIFICATE-----\nMIICXjCCAUYCCQDOGcCfCHfhPzANBgkqhkiG9w0BAQsFADAzMQswCQYDVQQGEwJV\nUzELMAkGA1UECAwCQ0ExFTATBgNVBAoMDERhdGFkb2cgSW5jLjAeFw0yNDA1MTQw\nMDA1NThaFw0yNTA1MTQwMDA1NThaMDMxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJD\nQTEVMBMGA1UECgwMRGF0YWRvZyBJbmMuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A\nMIIBCgKCAQEAwQDTmLqWv2L6YhzBcjKgPEzd3kE+9dZ4hBXBCjK6HgF/3aOKOSYq\nM9KPFHgJj6SjUJ+8TqX4sV6yW5xGX8dKjOpTYQfExEjGYcVrqKoOGg2k6dGkHyGm\n2VzL4zKyK1C3zJ4KpJnMYK8dPPcgzJvO7jGxGKMgLVU3VNdxKGTrqKmC6RbZLQOz\nM3fLp7bF2VcJ6VkGKW+yBK6vVMbQKMvjTbGqr3vIRd8SZzKRTsyIzXQDKgOv2vPn\nSqYJjKFJ8vJ7JeH6zGyLjQ1cGVy9jJ3+TjJoJhCGOyGzJpBGIcXfYjFDLcSRh7KE\nQIDAQABo1MwUTAdBgNVHQ4EFgQU/V8vJkPJ8b9yQnC/9bJ2kJGJ5MjoyEwHwYDVR0j\nBBgwFoAU/V8vJkPJ8b9yQnC/9bJ2kJGJ5Mjo\n-----END CERTIFICATE-----", + private_key="-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDBaNOMV7V8T7gR\nOmNcNfqGHxPrLLo1w2J7J8h6S8bVD9yCH2JKV8J5G2J8J0V8J3Jg8b3Jg8LxJgV\nV8J6JgV8J9JgJg8LJg8VJgV5JgLLJgVVJg8V4Jg8VLJg8V6JgV8JqJgVV8J3JgV\nV8J7JgVV8J5JgVV8J8JgVVJg8LJgJVLJgLVJgVVJgLJgVVJgVVJgVVJgLVJgVV\nJgVVJgVVJgLJgVVJgLVJgLLJgVVJgVLJgVVJgVLJgVVJgVVJgVVJgVVJgVVJg\nVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJ\nAgMBAAECggEBAKoJkJJJJkJJkJ\n-----END PRIVATE KEY-----", + ), + ), + ), + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ActionConnectionApi(api_client) + response = api_instance.create_action_connection(body=body) + + print(response) diff --git a/examples/v2/action-connection/CreateActionConnection_778774383.py b/examples/v2/action-connection/CreateActionConnection_778774383.py new file mode 100644 index 0000000000..021f60ff02 --- /dev/null +++ b/examples/v2/action-connection/CreateActionConnection_778774383.py @@ -0,0 +1,39 @@ +""" +Create a new Action Connection with HTTPBasicAuth returns "Successfully created Action Connection" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.action_connection_api import ActionConnectionApi +from datadog_api_client.v2.model.action_connection_attributes import ActionConnectionAttributes +from datadog_api_client.v2.model.action_connection_data import ActionConnectionData +from datadog_api_client.v2.model.action_connection_data_type import ActionConnectionDataType +from datadog_api_client.v2.model.create_action_connection_request import CreateActionConnectionRequest +from datadog_api_client.v2.model.http_basic_auth import HTTPBasicAuth +from datadog_api_client.v2.model.http_basic_auth_type import HTTPBasicAuthType +from datadog_api_client.v2.model.http_integration import HTTPIntegration +from datadog_api_client.v2.model.http_integration_type import HTTPIntegrationType + +body = CreateActionConnectionRequest( + data=ActionConnectionData( + type=ActionConnectionDataType.ACTION_CONNECTION, + attributes=ActionConnectionAttributes( + name="HTTP Basic Auth Connection exampleactionconnection", + integration=HTTPIntegration( + type=HTTPIntegrationType.HTTP, + base_url="https://api.example.com", + credentials=HTTPBasicAuth( + type=HTTPBasicAuthType.HTTPBASICAUTH, + username="test-user", + password="test-password", + ), + ), + ), + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ActionConnectionApi(api_client) + response = api_instance.create_action_connection(body=body) + + print(response) diff --git a/examples/v2/action-connection/CreateActionConnection_912926606.py b/examples/v2/action-connection/CreateActionConnection_912926606.py new file mode 100644 index 0000000000..8c644a88b4 --- /dev/null +++ b/examples/v2/action-connection/CreateActionConnection_912926606.py @@ -0,0 +1,53 @@ +""" +Create a new Action Connection with HTTPTokenAuth returns "Successfully created Action Connection" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.action_connection_api import ActionConnectionApi +from datadog_api_client.v2.model.action_connection_attributes import ActionConnectionAttributes +from datadog_api_client.v2.model.action_connection_data import ActionConnectionData +from datadog_api_client.v2.model.action_connection_data_type import ActionConnectionDataType +from datadog_api_client.v2.model.create_action_connection_request import CreateActionConnectionRequest +from datadog_api_client.v2.model.http_header import HTTPHeader +from datadog_api_client.v2.model.http_integration import HTTPIntegration +from datadog_api_client.v2.model.http_integration_type import HTTPIntegrationType +from datadog_api_client.v2.model.http_token import HTTPToken +from datadog_api_client.v2.model.http_token_auth import HTTPTokenAuth +from datadog_api_client.v2.model.http_token_auth_type import HTTPTokenAuthType +from datadog_api_client.v2.model.token_type import TokenType + +body = CreateActionConnectionRequest( + data=ActionConnectionData( + type=ActionConnectionDataType.ACTION_CONNECTION, + attributes=ActionConnectionAttributes( + name="HTTP Token Connection exampleactionconnection", + integration=HTTPIntegration( + type=HTTPIntegrationType.HTTP, + base_url="https://api.example.com", + credentials=HTTPTokenAuth( + type=HTTPTokenAuthType.HTTPTOKENAUTH, + tokens=[ + HTTPToken( + name="ApiKey", + type=TokenType.SECRET, + value="secret-token-value", + ), + ], + headers=[ + HTTPHeader( + name="Authorization", + value="Bearer token-value", + ), + ], + ), + ), + ), + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ActionConnectionApi(api_client) + response = api_instance.create_action_connection(body=body) + + print(response) diff --git a/examples/v2/action-connection/UpdateActionConnection_1293363740.py b/examples/v2/action-connection/UpdateActionConnection_1293363740.py new file mode 100644 index 0000000000..ea7927e3f7 --- /dev/null +++ b/examples/v2/action-connection/UpdateActionConnection_1293363740.py @@ -0,0 +1,39 @@ +""" +Update an existing Action Connection with HTTPBasicAuth returns "Successfully updated Action Connection" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.action_connection_api import ActionConnectionApi +from datadog_api_client.v2.model.action_connection_attributes_update import ActionConnectionAttributesUpdate +from datadog_api_client.v2.model.action_connection_data_type import ActionConnectionDataType +from datadog_api_client.v2.model.action_connection_data_update import ActionConnectionDataUpdate +from datadog_api_client.v2.model.http_basic_auth_type import HTTPBasicAuthType +from datadog_api_client.v2.model.http_basic_auth_update import HTTPBasicAuthUpdate +from datadog_api_client.v2.model.http_integration_type import HTTPIntegrationType +from datadog_api_client.v2.model.http_integration_update import HTTPIntegrationUpdate +from datadog_api_client.v2.model.update_action_connection_request import UpdateActionConnectionRequest + +body = UpdateActionConnectionRequest( + data=ActionConnectionDataUpdate( + type=ActionConnectionDataType.ACTION_CONNECTION, + attributes=ActionConnectionAttributesUpdate( + name="HTTP Basic Auth Updated", + integration=HTTPIntegrationUpdate( + type=HTTPIntegrationType.HTTP, + base_url="https://api.updated.com", + credentials=HTTPBasicAuthUpdate( + type=HTTPBasicAuthType.HTTPBASICAUTH, + username="updated-user", + password="updated-password", + ), + ), + ), + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ActionConnectionApi(api_client) + response = api_instance.update_action_connection(connection_id="cb460d51-3c88-4e87-adac-d47131d0423d", body=body) + + print(response) diff --git a/src/datadog_api_client/v2/model/action_connection_integration.py b/src/datadog_api_client/v2/model/action_connection_integration.py index f96529de5b..f2c2ffba08 100644 --- a/src/datadog_api_client/v2/model/action_connection_integration.py +++ b/src/datadog_api_client/v2/model/action_connection_integration.py @@ -15,13 +15,13 @@ def __init__(self, **kwargs): """ The definition of ``ActionConnectionIntegration`` object. - :param credentials: The definition of `AWSCredentials` object. + :param credentials: The definition of the `AWSCredentials` object. :type credentials: AWSCredentials - :param type: The definition of `AWSIntegrationType` object. + :param type: The definition of the `AWSIntegrationType` object. :type type: AWSIntegrationType - :param base_url: Base HTTP url for the integration + :param base_url: Base HTTP url for the integration. :type base_url: str """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/action_connection_integration_update.py b/src/datadog_api_client/v2/model/action_connection_integration_update.py index 7a1edc1332..d07358b381 100644 --- a/src/datadog_api_client/v2/model/action_connection_integration_update.py +++ b/src/datadog_api_client/v2/model/action_connection_integration_update.py @@ -15,13 +15,13 @@ def __init__(self, **kwargs): """ The definition of ``ActionConnectionIntegrationUpdate`` object. - :param credentials: The definition of `AWSCredentialsUpdate` object. + :param credentials: The definition of the `AWSCredentialsUpdate` object. :type credentials: AWSCredentialsUpdate, optional - :param type: The definition of `AWSIntegrationType` object. + :param type: The definition of the `AWSIntegrationType` object. :type type: AWSIntegrationType - :param base_url: Base HTTP url for the integration + :param base_url: Base HTTP url for the integration. :type base_url: str, optional """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/aws_assume_role.py b/src/datadog_api_client/v2/model/aws_assume_role.py index 7b5aa9e80f..7b43d88a6f 100644 --- a/src/datadog_api_client/v2/model/aws_assume_role.py +++ b/src/datadog_api_client/v2/model/aws_assume_role.py @@ -29,6 +29,7 @@ def openapi_types(_): return { "account_id": (str,), "external_id": (str,), + "generate_new_external_id": (bool,), "principal_id": (str,), "role": (str,), "type": (AWSAssumeRoleType,), @@ -37,6 +38,7 @@ def openapi_types(_): attribute_map = { "account_id": "account_id", "external_id": "external_id", + "generate_new_external_id": "generate_new_external_id", "principal_id": "principal_id", "role": "role", "type": "type", @@ -52,29 +54,35 @@ def __init__( role: str, type: AWSAssumeRoleType, external_id: Union[str, UnsetType] = unset, + generate_new_external_id: Union[bool, UnsetType] = unset, principal_id: Union[str, UnsetType] = unset, **kwargs, ): """ - The definition of ``AWSAssumeRole`` object. + The definition of the ``AWSAssumeRole`` object. - :param account_id: AWS account the connection is created for + :param account_id: AWS account the connection is created for. :type account_id: str - :param external_id: External ID used to scope which connection can be used to assume the role + :param external_id: External ID used to scope which connection can be used to assume the role. :type external_id: str, optional - :param principal_id: AWS account that will assume the role + :param generate_new_external_id: Pass true if the ``external_id`` should be regenerated. + :type generate_new_external_id: bool, optional + + :param principal_id: AWS account that will assume the role. :type principal_id: str, optional - :param role: Role to assume + :param role: Role to assume. :type role: str - :param type: The definition of ``AWSAssumeRoleType`` object. + :param type: The definition of the ``AWSAssumeRole`` object. :type type: AWSAssumeRoleType """ if external_id is not unset: kwargs["external_id"] = external_id + if generate_new_external_id is not unset: + kwargs["generate_new_external_id"] = generate_new_external_id if principal_id is not unset: kwargs["principal_id"] = principal_id super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/aws_assume_role_type.py b/src/datadog_api_client/v2/model/aws_assume_role_type.py index 251026c553..a1f21c2016 100644 --- a/src/datadog_api_client/v2/model/aws_assume_role_type.py +++ b/src/datadog_api_client/v2/model/aws_assume_role_type.py @@ -14,7 +14,7 @@ class AWSAssumeRoleType(ModelSimple): """ - The definition of `AWSAssumeRoleType` object. + The definition of the `AWSAssumeRole` object. :param value: If omitted defaults to "AWSAssumeRole". Must be one of ["AWSAssumeRole"]. :type value: str diff --git a/src/datadog_api_client/v2/model/aws_assume_role_update.py b/src/datadog_api_client/v2/model/aws_assume_role_update.py index fa9fd395a5..b9b8e441b8 100644 --- a/src/datadog_api_client/v2/model/aws_assume_role_update.py +++ b/src/datadog_api_client/v2/model/aws_assume_role_update.py @@ -49,18 +49,18 @@ def __init__( **kwargs, ): """ - The definition of ``AWSAssumeRoleUpdate`` object. + The definition of the ``AWSAssumeRole`` object. - :param account_id: AWS account the connection is created for + :param account_id: AWS account the connection is created for. :type account_id: str, optional - :param generate_new_external_id: The ``AWSAssumeRoleUpdate`` ``generate_new_external_id``. + :param generate_new_external_id: Pass true if the ``external_id`` should be regenerated. :type generate_new_external_id: bool, optional - :param role: Role to assume + :param role: Role to assume. :type role: str, optional - :param type: The definition of ``AWSAssumeRoleType`` object. + :param type: The definition of the ``AWSAssumeRole`` object. :type type: AWSAssumeRoleType """ if account_id is not unset: diff --git a/src/datadog_api_client/v2/model/aws_credentials.py b/src/datadog_api_client/v2/model/aws_credentials.py index 533c46f0b1..e9ad6deffe 100644 --- a/src/datadog_api_client/v2/model/aws_credentials.py +++ b/src/datadog_api_client/v2/model/aws_credentials.py @@ -13,21 +13,24 @@ class AWSCredentials(ModelComposed): def __init__(self, **kwargs): """ - The definition of ``AWSCredentials`` object. + The definition of the ``AWSCredentials`` object. - :param account_id: AWS account the connection is created for + :param account_id: AWS account the connection is created for. :type account_id: str - :param external_id: External ID used to scope which connection can be used to assume the role + :param external_id: External ID used to scope which connection can be used to assume the role. :type external_id: str, optional - :param principal_id: AWS account that will assume the role + :param generate_new_external_id: Pass true if the `external_id` should be regenerated. + :type generate_new_external_id: bool, optional + + :param principal_id: AWS account that will assume the role. :type principal_id: str, optional - :param role: Role to assume + :param role: Role to assume. :type role: str - :param type: The definition of `AWSAssumeRoleType` object. + :param type: The definition of the `AWSAssumeRole` object. :type type: AWSAssumeRoleType """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/aws_credentials_update.py b/src/datadog_api_client/v2/model/aws_credentials_update.py index 1339823687..97b32b2537 100644 --- a/src/datadog_api_client/v2/model/aws_credentials_update.py +++ b/src/datadog_api_client/v2/model/aws_credentials_update.py @@ -13,18 +13,18 @@ class AWSCredentialsUpdate(ModelComposed): def __init__(self, **kwargs): """ - The definition of ``AWSCredentialsUpdate`` object. + The definition of the ``AWSCredentialsUpdate`` object. - :param account_id: AWS account the connection is created for + :param account_id: AWS account the connection is created for. :type account_id: str, optional - :param generate_new_external_id: The `AWSAssumeRoleUpdate` `generate_new_external_id`. + :param generate_new_external_id: Pass true if the `external_id` should be regenerated. :type generate_new_external_id: bool, optional - :param role: Role to assume + :param role: Role to assume. :type role: str, optional - :param type: The definition of `AWSAssumeRoleType` object. + :param type: The definition of the `AWSAssumeRole` object. :type type: AWSAssumeRoleType """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/aws_integration.py b/src/datadog_api_client/v2/model/aws_integration.py index 0ebac5e091..3cfe2e4cdf 100644 --- a/src/datadog_api_client/v2/model/aws_integration.py +++ b/src/datadog_api_client/v2/model/aws_integration.py @@ -35,12 +35,12 @@ def openapi_types(_): def __init__(self_, credentials: Union[AWSCredentials, AWSAssumeRole], type: AWSIntegrationType, **kwargs): """ - The definition of ``AWSIntegration`` object. + The definition of the ``AWSIntegration`` object. - :param credentials: The definition of ``AWSCredentials`` object. + :param credentials: The definition of the ``AWSCredentials`` object. :type credentials: AWSCredentials - :param type: The definition of ``AWSIntegrationType`` object. + :param type: The definition of the ``AWSIntegrationType`` object. :type type: AWSIntegrationType """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/aws_integration_type.py b/src/datadog_api_client/v2/model/aws_integration_type.py index 35f8078a85..a5458f8a23 100644 --- a/src/datadog_api_client/v2/model/aws_integration_type.py +++ b/src/datadog_api_client/v2/model/aws_integration_type.py @@ -14,7 +14,7 @@ class AWSIntegrationType(ModelSimple): """ - The definition of `AWSIntegrationType` object. + The definition of the `AWSIntegrationType` object. :param value: If omitted defaults to "AWS". Must be one of ["AWS"]. :type value: str diff --git a/src/datadog_api_client/v2/model/aws_integration_update.py b/src/datadog_api_client/v2/model/aws_integration_update.py index ccb2ab20fb..e5288c9237 100644 --- a/src/datadog_api_client/v2/model/aws_integration_update.py +++ b/src/datadog_api_client/v2/model/aws_integration_update.py @@ -42,12 +42,12 @@ def __init__( **kwargs, ): """ - The definition of ``AWSIntegrationUpdate`` object. + The definition of the ``AWSIntegrationUpdate`` object. - :param credentials: The definition of ``AWSCredentialsUpdate`` object. + :param credentials: The definition of the ``AWSCredentialsUpdate`` object. :type credentials: AWSCredentialsUpdate, optional - :param type: The definition of ``AWSIntegrationType`` object. + :param type: The definition of the ``AWSIntegrationType`` object. :type type: AWSIntegrationType """ if credentials is not unset: diff --git a/src/datadog_api_client/v2/model/http_basic_auth.py b/src/datadog_api_client/v2/model/http_basic_auth.py new file mode 100644 index 0000000000..1c4e8e0191 --- /dev/null +++ b/src/datadog_api_client/v2/model/http_basic_auth.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.http_basic_auth_type import HTTPBasicAuthType + + +class HTTPBasicAuth(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.http_basic_auth_type import HTTPBasicAuthType + + return { + "password": (str,), + "type": (HTTPBasicAuthType,), + "username": (str,), + } + + attribute_map = { + "password": "password", + "type": "type", + "username": "username", + } + + def __init__(self_, password: str, type: HTTPBasicAuthType, username: str, **kwargs): + """ + The definition of the ``HTTPBasicAuth`` object. + + :param password: Password used for authentication. Saved in a secret store + :type password: str + + :param type: The definition of the ``HTTPBasicAuth`` object. + :type type: HTTPBasicAuthType + + :param username: Username used for authentication. + :type username: str + """ + super().__init__(kwargs) + + self_.password = password + self_.type = type + self_.username = username diff --git a/src/datadog_api_client/v2/model/http_basic_auth_type.py b/src/datadog_api_client/v2/model/http_basic_auth_type.py new file mode 100644 index 0000000000..8dda3c0ebc --- /dev/null +++ b/src/datadog_api_client/v2/model/http_basic_auth_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 HTTPBasicAuthType(ModelSimple): + """ + The definition of the `HTTPBasicAuth` object. + + :param value: If omitted defaults to "HTTPBasicAuth". Must be one of ["HTTPBasicAuth"]. + :type value: str + """ + + allowed_values = { + "HTTPBasicAuth", + } + HTTPBASICAUTH: ClassVar["HTTPBasicAuthType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +HTTPBasicAuthType.HTTPBASICAUTH = HTTPBasicAuthType("HTTPBasicAuth") diff --git a/src/datadog_api_client/v2/model/http_basic_auth_update.py b/src/datadog_api_client/v2/model/http_basic_auth_update.py new file mode 100644 index 0000000000..fde8c4b3f7 --- /dev/null +++ b/src/datadog_api_client/v2/model/http_basic_auth_update.py @@ -0,0 +1,62 @@ +# 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.http_basic_auth_type import HTTPBasicAuthType + + +class HTTPBasicAuthUpdate(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.http_basic_auth_type import HTTPBasicAuthType + + return { + "password": (str,), + "type": (HTTPBasicAuthType,), + "username": (str,), + } + + attribute_map = { + "password": "password", + "type": "type", + "username": "username", + } + + def __init__( + self_, + type: HTTPBasicAuthType, + password: Union[str, UnsetType] = unset, + username: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of the ``HTTPBasicAuth`` object. + + :param password: Password used for authentication. Saved in a secret store + :type password: str, optional + + :param type: The definition of the ``HTTPBasicAuth`` object. + :type type: HTTPBasicAuthType + + :param username: Username used for authentication. + :type username: str, optional + """ + if password is not unset: + kwargs["password"] = password + if username is not unset: + kwargs["username"] = username + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/http_credentials.py b/src/datadog_api_client/v2/model/http_credentials.py index 9fc4ef6fb0..a6f77aeeac 100644 --- a/src/datadog_api_client/v2/model/http_credentials.py +++ b/src/datadog_api_client/v2/model/http_credentials.py @@ -13,7 +13,7 @@ class HTTPCredentials(ModelComposed): def __init__(self, **kwargs): """ - The definition of ``HTTPCredentials`` object. + The definition of the ``HTTPCredentials`` object. :param body: The definition of `HTTPBody` object. :type body: HTTPBody, optional @@ -24,11 +24,23 @@ def __init__(self, **kwargs): :param tokens: The `HTTPTokenAuth` `tokens`. :type tokens: [HTTPToken], optional - :param type: The definition of `HTTPTokenAuthType` object. + :param type: The definition of the `HTTPTokenAuth` object. :type type: HTTPTokenAuthType :param url_parameters: The `HTTPTokenAuth` `url_parameters`. :type url_parameters: [UrlParam], optional + + :param password: Password used for authentication. Saved in a secret store + :type password: str + + :param username: Username used for authentication. + :type username: str + + :param certificate: Certificate of authority used to sign the request. + :type certificate: str + + :param private_key: Private key used for the MTLS handshake + :type private_key: str """ super().__init__(kwargs) @@ -42,9 +54,13 @@ def _composed_schemas(_): # classes don't exist yet because their module has not finished # loading from datadog_api_client.v2.model.http_token_auth import HTTPTokenAuth + from datadog_api_client.v2.model.http_basic_auth import HTTPBasicAuth + from datadog_api_client.v2.model.http_mtls_auth import HTTPMtlsAuth return { "oneOf": [ HTTPTokenAuth, + HTTPBasicAuth, + HTTPMtlsAuth, ], } diff --git a/src/datadog_api_client/v2/model/http_credentials_update.py b/src/datadog_api_client/v2/model/http_credentials_update.py index 66a37071ee..5693c35829 100644 --- a/src/datadog_api_client/v2/model/http_credentials_update.py +++ b/src/datadog_api_client/v2/model/http_credentials_update.py @@ -13,7 +13,7 @@ class HTTPCredentialsUpdate(ModelComposed): def __init__(self, **kwargs): """ - The definition of ``HTTPCredentialsUpdate`` object. + The definition of the ``HTTPCredentialsUpdate`` object. :param body: The definition of `HTTPBody` object. :type body: HTTPBody, optional @@ -24,11 +24,23 @@ def __init__(self, **kwargs): :param tokens: The `HTTPTokenAuthUpdate` `tokens`. :type tokens: [HTTPTokenUpdate], optional - :param type: The definition of `HTTPTokenAuthType` object. + :param type: The definition of the `HTTPTokenAuth` object. :type type: HTTPTokenAuthType :param url_parameters: The `HTTPTokenAuthUpdate` `url_parameters`. :type url_parameters: [UrlParamUpdate], optional + + :param password: Password used for authentication. Saved in a secret store + :type password: str, optional + + :param username: Username used for authentication. + :type username: str, optional + + :param certificate: Certificate of authority used to sign the request. + :type certificate: str, optional + + :param private_key: Private key used for the MTLS handshake + :type private_key: str, optional """ super().__init__(kwargs) @@ -42,9 +54,13 @@ def _composed_schemas(_): # classes don't exist yet because their module has not finished # loading from datadog_api_client.v2.model.http_token_auth_update import HTTPTokenAuthUpdate + from datadog_api_client.v2.model.http_basic_auth_update import HTTPBasicAuthUpdate + from datadog_api_client.v2.model.http_mtls_auth_update import HTTPMtlsAuthUpdate return { "oneOf": [ HTTPTokenAuthUpdate, + HTTPBasicAuthUpdate, + HTTPMtlsAuthUpdate, ], } diff --git a/src/datadog_api_client/v2/model/http_integration.py b/src/datadog_api_client/v2/model/http_integration.py index f6c0c910b3..fe4c002c2b 100644 --- a/src/datadog_api_client/v2/model/http_integration.py +++ b/src/datadog_api_client/v2/model/http_integration.py @@ -15,6 +15,8 @@ from datadog_api_client.v2.model.http_credentials import HTTPCredentials from datadog_api_client.v2.model.http_integration_type import HTTPIntegrationType from datadog_api_client.v2.model.http_token_auth import HTTPTokenAuth + from datadog_api_client.v2.model.http_basic_auth import HTTPBasicAuth + from datadog_api_client.v2.model.http_mtls_auth import HTTPMtlsAuth class HTTPIntegration(ModelNormal): @@ -36,18 +38,22 @@ def openapi_types(_): } def __init__( - self_, base_url: str, credentials: Union[HTTPCredentials, HTTPTokenAuth], type: HTTPIntegrationType, **kwargs + self_, + base_url: str, + credentials: Union[HTTPCredentials, HTTPTokenAuth, HTTPBasicAuth, HTTPMtlsAuth], + type: HTTPIntegrationType, + **kwargs, ): """ - The definition of ``HTTPIntegration`` object. + The definition of the ``HTTPIntegration`` object. - :param base_url: Base HTTP url for the integration + :param base_url: Base HTTP url for the integration. :type base_url: str - :param credentials: The definition of ``HTTPCredentials`` object. + :param credentials: The definition of the ``HTTPCredentials`` object. :type credentials: HTTPCredentials - :param type: The definition of ``HTTPIntegrationType`` object. + :param type: The definition of the ``HTTPIntegrationType`` object. :type type: HTTPIntegrationType """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/http_integration_type.py b/src/datadog_api_client/v2/model/http_integration_type.py index 3c1bdd088a..2c945cb70b 100644 --- a/src/datadog_api_client/v2/model/http_integration_type.py +++ b/src/datadog_api_client/v2/model/http_integration_type.py @@ -14,7 +14,7 @@ class HTTPIntegrationType(ModelSimple): """ - The definition of `HTTPIntegrationType` object. + The definition of the `HTTPIntegrationType` object. :param value: If omitted defaults to "HTTP". Must be one of ["HTTP"]. :type value: str diff --git a/src/datadog_api_client/v2/model/http_integration_update.py b/src/datadog_api_client/v2/model/http_integration_update.py index d6d9af85f0..0c6a1b913d 100644 --- a/src/datadog_api_client/v2/model/http_integration_update.py +++ b/src/datadog_api_client/v2/model/http_integration_update.py @@ -17,6 +17,8 @@ from datadog_api_client.v2.model.http_credentials_update import HTTPCredentialsUpdate from datadog_api_client.v2.model.http_integration_type import HTTPIntegrationType from datadog_api_client.v2.model.http_token_auth_update import HTTPTokenAuthUpdate + from datadog_api_client.v2.model.http_basic_auth_update import HTTPBasicAuthUpdate + from datadog_api_client.v2.model.http_mtls_auth_update import HTTPMtlsAuthUpdate class HTTPIntegrationUpdate(ModelNormal): @@ -41,19 +43,21 @@ def __init__( self_, type: HTTPIntegrationType, base_url: Union[str, UnsetType] = unset, - credentials: Union[HTTPCredentialsUpdate, HTTPTokenAuthUpdate, UnsetType] = unset, + credentials: Union[ + HTTPCredentialsUpdate, HTTPTokenAuthUpdate, HTTPBasicAuthUpdate, HTTPMtlsAuthUpdate, UnsetType + ] = unset, **kwargs, ): """ - The definition of ``HTTPIntegrationUpdate`` object. + The definition of the ``HTTPIntegrationUpdate`` object. - :param base_url: Base HTTP url for the integration + :param base_url: Base HTTP url for the integration. :type base_url: str, optional - :param credentials: The definition of ``HTTPCredentialsUpdate`` object. + :param credentials: The definition of the ``HTTPCredentialsUpdate`` object. :type credentials: HTTPCredentialsUpdate, optional - :param type: The definition of ``HTTPIntegrationType`` object. + :param type: The definition of the ``HTTPIntegrationType`` object. :type type: HTTPIntegrationType """ if base_url is not unset: diff --git a/src/datadog_api_client/v2/model/http_mtls_auth.py b/src/datadog_api_client/v2/model/http_mtls_auth.py new file mode 100644 index 0000000000..463dd9b735 --- /dev/null +++ b/src/datadog_api_client/v2/model/http_mtls_auth.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.http_mtls_auth_type import HTTPMtlsAuthType + + +class HTTPMtlsAuth(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.http_mtls_auth_type import HTTPMtlsAuthType + + return { + "certificate": (str,), + "private_key": (str,), + "type": (HTTPMtlsAuthType,), + } + + attribute_map = { + "certificate": "certificate", + "private_key": "private_key", + "type": "type", + } + + def __init__(self_, certificate: str, private_key: str, type: HTTPMtlsAuthType, **kwargs): + """ + The definition of the ``HTTPMtlsAuth`` object. + + :param certificate: Certificate of authority used to sign the request. + :type certificate: str + + :param private_key: Private key used for the MTLS handshake + :type private_key: str + + :param type: The definition of the ``HTTPMtlsAuth`` object. + :type type: HTTPMtlsAuthType + """ + super().__init__(kwargs) + + self_.certificate = certificate + self_.private_key = private_key + self_.type = type diff --git a/src/datadog_api_client/v2/model/http_mtls_auth_type.py b/src/datadog_api_client/v2/model/http_mtls_auth_type.py new file mode 100644 index 0000000000..27cacd123b --- /dev/null +++ b/src/datadog_api_client/v2/model/http_mtls_auth_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 HTTPMtlsAuthType(ModelSimple): + """ + The definition of the `HTTPMtlsAuth` object. + + :param value: If omitted defaults to "HTTPMtlsAuth". Must be one of ["HTTPMtlsAuth"]. + :type value: str + """ + + allowed_values = { + "HTTPMtlsAuth", + } + HTTPMTLSAUTH: ClassVar["HTTPMtlsAuthType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +HTTPMtlsAuthType.HTTPMTLSAUTH = HTTPMtlsAuthType("HTTPMtlsAuth") diff --git a/src/datadog_api_client/v2/model/http_mtls_auth_update.py b/src/datadog_api_client/v2/model/http_mtls_auth_update.py new file mode 100644 index 0000000000..26fda090e4 --- /dev/null +++ b/src/datadog_api_client/v2/model/http_mtls_auth_update.py @@ -0,0 +1,62 @@ +# 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.http_mtls_auth_type import HTTPMtlsAuthType + + +class HTTPMtlsAuthUpdate(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.http_mtls_auth_type import HTTPMtlsAuthType + + return { + "certificate": (str,), + "private_key": (str,), + "type": (HTTPMtlsAuthType,), + } + + attribute_map = { + "certificate": "certificate", + "private_key": "private_key", + "type": "type", + } + + def __init__( + self_, + type: HTTPMtlsAuthType, + certificate: Union[str, UnsetType] = unset, + private_key: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of the ``HTTPMtlsAuth`` object. + + :param certificate: Certificate of authority used to sign the request. + :type certificate: str, optional + + :param private_key: Private key used for the MTLS handshake + :type private_key: str, optional + + :param type: The definition of the ``HTTPMtlsAuth`` object. + :type type: HTTPMtlsAuthType + """ + if certificate is not unset: + kwargs["certificate"] = certificate + if private_key is not unset: + kwargs["private_key"] = private_key + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/http_token_auth.py b/src/datadog_api_client/v2/model/http_token_auth.py index 6b5a583965..7287fa43b5 100644 --- a/src/datadog_api_client/v2/model/http_token_auth.py +++ b/src/datadog_api_client/v2/model/http_token_auth.py @@ -67,7 +67,7 @@ def __init__( :param tokens: The ``HTTPTokenAuth`` ``tokens``. :type tokens: [HTTPToken], optional - :param type: The definition of ``HTTPTokenAuthType`` object. + :param type: The definition of the ``HTTPTokenAuth`` object. :type type: HTTPTokenAuthType :param url_parameters: The ``HTTPTokenAuth`` ``url_parameters``. diff --git a/src/datadog_api_client/v2/model/http_token_auth_type.py b/src/datadog_api_client/v2/model/http_token_auth_type.py index aa9292f73e..df459559ec 100644 --- a/src/datadog_api_client/v2/model/http_token_auth_type.py +++ b/src/datadog_api_client/v2/model/http_token_auth_type.py @@ -14,7 +14,7 @@ class HTTPTokenAuthType(ModelSimple): """ - The definition of `HTTPTokenAuthType` object. + The definition of the `HTTPTokenAuth` object. :param value: If omitted defaults to "HTTPTokenAuth". Must be one of ["HTTPTokenAuth"]. :type value: str diff --git a/src/datadog_api_client/v2/model/http_token_auth_update.py b/src/datadog_api_client/v2/model/http_token_auth_update.py index 6b562cac84..a31ff9ca7c 100644 --- a/src/datadog_api_client/v2/model/http_token_auth_update.py +++ b/src/datadog_api_client/v2/model/http_token_auth_update.py @@ -67,7 +67,7 @@ def __init__( :param tokens: The ``HTTPTokenAuthUpdate`` ``tokens``. :type tokens: [HTTPTokenUpdate], optional - :param type: The definition of ``HTTPTokenAuthType`` object. + :param type: The definition of the ``HTTPTokenAuth`` object. :type type: HTTPTokenAuthType :param url_parameters: The ``HTTPTokenAuthUpdate`` ``url_parameters``. diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 1a7fb45edf..6074e265fb 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1459,6 +1459,9 @@ from datadog_api_client.v2.model.grey_noise_integration_update import GreyNoiseIntegrationUpdate from datadog_api_client.v2.model.group_scalar_column import GroupScalarColumn from datadog_api_client.v2.model.group_tags import GroupTags +from datadog_api_client.v2.model.http_basic_auth import HTTPBasicAuth +from datadog_api_client.v2.model.http_basic_auth_type import HTTPBasicAuthType +from datadog_api_client.v2.model.http_basic_auth_update import HTTPBasicAuthUpdate from datadog_api_client.v2.model.http_body import HTTPBody from datadog_api_client.v2.model.httpci_app_error import HTTPCIAppError from datadog_api_client.v2.model.httpci_app_errors import HTTPCIAppErrors @@ -1473,6 +1476,9 @@ from datadog_api_client.v2.model.http_log_error import HTTPLogError from datadog_api_client.v2.model.http_log_errors import HTTPLogErrors from datadog_api_client.v2.model.http_log_item import HTTPLogItem +from datadog_api_client.v2.model.http_mtls_auth import HTTPMtlsAuth +from datadog_api_client.v2.model.http_mtls_auth_type import HTTPMtlsAuthType +from datadog_api_client.v2.model.http_mtls_auth_update import HTTPMtlsAuthUpdate from datadog_api_client.v2.model.http_token import HTTPToken from datadog_api_client.v2.model.http_token_auth import HTTPTokenAuth from datadog_api_client.v2.model.http_token_auth_type import HTTPTokenAuthType @@ -5061,6 +5067,9 @@ "GreyNoiseIntegrationUpdate", "GroupScalarColumn", "GroupTags", + "HTTPBasicAuth", + "HTTPBasicAuthType", + "HTTPBasicAuthUpdate", "HTTPBody", "HTTPCIAppError", "HTTPCIAppErrors", @@ -5075,6 +5084,9 @@ "HTTPLogError", "HTTPLogErrors", "HTTPLogItem", + "HTTPMtlsAuth", + "HTTPMtlsAuthType", + "HTTPMtlsAuthUpdate", "HTTPToken", "HTTPTokenAuth", "HTTPTokenAuthType", diff --git a/tests/v2/features/action_connection.feature b/tests/v2/features/action_connection.feature index 759615a8fd..28123b5676 100644 --- a/tests/v2/features/action_connection.feature +++ b/tests/v2/features/action_connection.feature @@ -28,6 +28,41 @@ Feature: Action Connection When the request is sent Then the response status is 201 Successfully created Action Connection + @team:DataDog/workflow-automation-dev + Scenario: Create a new Action Connection with HTTPBasicAuth returns "Successfully created Action Connection" response + Given new "CreateActionConnection" request + And body with value {"data":{"type":"action_connection","attributes":{"name":"HTTP Basic Auth Connection {{ unique_lower_alnum }}","integration":{"type":"HTTP","base_url":"https://api.example.com","credentials":{"type":"HTTPBasicAuth","username":"test-user","password":"test-password"}}}}} + When the request is sent + Then the response status is 201 Successfully created Action Connection + + @team:DataDog/workflow-automation-dev + Scenario: Create a new Action Connection with HTTPMtlsAuth returns "Successfully created Action Connection" response + Given new "CreateActionConnection" request + And body with value {"data":{"type":"action_connection","attributes":{"name":"HTTP mTLS Connection {{ unique_lower_alnum }}","integration":{"type":"HTTP","base_url":"https://api.example.com","credentials":{"type":"HTTPMtlsAuth","certificate":"-----BEGIN CERTIFICATE-----\nMIICXjCCAUYCCQDOGcCfCHfhPzANBgkqhkiG9w0BAQsFADAzMQswCQYDVQQGEwJV\nUzELMAkGA1UECAwCQ0ExFTATBgNVBAoMDERhdGFkb2cgSW5jLjAeFw0yNDA1MTQw\nMDA1NThaFw0yNTA1MTQwMDA1NThaMDMxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJD\nQTEVMBMGA1UECgwMRGF0YWRvZyBJbmMuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A\nMIIBCgKCAQEAwQDTmLqWv2L6YhzBcjKgPEzd3kE+9dZ4hBXBCjK6HgF/3aOKOSYq\nM9KPFHgJj6SjUJ+8TqX4sV6yW5xGX8dKjOpTYQfExEjGYcVrqKoOGg2k6dGkHyGm\n2VzL4zKyK1C3zJ4KpJnMYK8dPPcgzJvO7jGxGKMgLVU3VNdxKGTrqKmC6RbZLQOz\nM3fLp7bF2VcJ6VkGKW+yBK6vVMbQKMvjTbGqr3vIRd8SZzKRTsyIzXQDKgOv2vPn\nSqYJjKFJ8vJ7JeH6zGyLjQ1cGVy9jJ3+TjJoJhCGOyGzJpBGIcXfYjFDLcSRh7KE\nQIDAQABo1MwUTAdBgNVHQ4EFgQU/V8vJkPJ8b9yQnC/9bJ2kJGJ5MjoyEwHwYDVR0j\nBBgwFoAU/V8vJkPJ8b9yQnC/9bJ2kJGJ5Mjo\n-----END CERTIFICATE-----","private_key":"-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDBaNOMV7V8T7gR\nOmNcNfqGHxPrLLo1w2J7J8h6S8bVD9yCH2JKV8J5G2J8J0V8J3Jg8b3Jg8LxJgV\nV8J6JgV8J9JgJg8LJg8VJgV5JgLLJgVVJg8V4Jg8VLJg8V6JgV8JqJgVV8J3JgV\nV8J7JgVV8J5JgVV8J8JgVVJg8LJgJVLJgLVJgVVJgLJgVVJgVVJgVVJgLVJgVV\nJgVVJgVVJgLJgVVJgLVJgLLJgVVJgVLJgVVJgVLJgVVJgVVJgVVJgVVJgVVJg\nVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJ\nAgMBAAECggEBAKoJkJJJJkJJkJ\n-----END PRIVATE KEY-----"}}}}} + When the request is sent + Then the response status is 201 Successfully created Action Connection + + @team:DataDog/workflow-automation-dev + Scenario: Create a new Action Connection with HTTPTokenAuth returns "Successfully created Action Connection" response + Given new "CreateActionConnection" request + And body with value {"data":{"type":"action_connection","attributes":{"name":"HTTP Token Connection {{ unique_lower_alnum }}","integration":{"type":"HTTP","base_url":"https://api.example.com","credentials":{"type":"HTTPTokenAuth","tokens":[{"name":"ApiKey","type":"SECRET","value":"secret-token-value"}],"headers":[{"name":"Authorization","value":"Bearer token-value"}]}}}}} + When the request is sent + Then the response status is 201 Successfully created Action Connection + + @team:DataDog/workflow-automation-dev + Scenario: Create a new Action Connection with invalid HTTPCredentials returns "Bad Request" response + Given new "CreateActionConnection" request + And body with value {"data":{"type":"action_connection","attributes":{"name":"Invalid HTTP Connection","integration":{"type":"HTTP","base_url":"https://api.example.com","credentials":{"type":"HTTPBasicAuth","username":"test-user"}}}}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/workflow-automation-dev + Scenario: Create a new Action Connection with missing base_url returns "Bad Request" response + Given new "CreateActionConnection" request + And body with value {"data":{"type":"action_connection","attributes":{"name":"Missing Base URL Connection","integration":{"type":"HTTP","credentials":{"type":"HTTPBasicAuth","username":"test-user","password":"test-password"}}}}} + When the request is sent + Then the response status is 400 Bad Request + @team:DataDog/workflow-automation-dev Scenario: Delete an existing Action Connection returns "Not Found" response Given new "DeleteActionConnection" request @@ -155,3 +190,11 @@ Feature: Action Connection And body with value {"data":{"type":"action_connection","attributes":{"name":"Cassette Connection","integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRoleUpdated","account_id":"123456789123"}}}}} When the request is sent Then the response status is 200 Successfully updated Action Connection + + @team:DataDog/workflow-automation-dev + Scenario: Update an existing Action Connection with HTTPBasicAuth returns "Successfully updated Action Connection" response + Given new "UpdateActionConnection" request + And request contains "connection_id" parameter with value "cb460d51-3c88-4e87-adac-d47131d0423d" + And body with value {"data":{"type":"action_connection","attributes":{"name":"HTTP Basic Auth Updated","integration":{"type":"HTTP","base_url":"https://api.updated.com","credentials":{"type":"HTTPBasicAuth","username":"updated-user","password":"updated-password"}}}}} + When the request is sent + Then the response status is 200 Successfully updated Action Connection