새 Action Connection 생성하기
https://api.datadoghq.com/api/v2/actions/connectionshttps://api.us3.datadoghq.com/api/v2/actions/connectionshttps://api.us5.datadoghq.com/api/v2/actions/connectionshttps://api.datadoghq.eu/api/v2/actions/connectionshttps://api.ap1.datadoghq.com/api/v2/actions/connectionshttps://api.ap2.datadoghq.com/api/v2/actions/connectionshttps://api.uk1.datadoghq.com/api/v2/actions/connectionshttps://api.ddog-gov.com/api/v2/actions/connectionshttps://api.us2.ddog-gov.com/api/v2/actions/connections개요
새 Action Connection을 생성합니다. 이 API에는 등록된 애플리케이션 키가 필요합니다.
요청
Body Data (required)
data [required]Action Connection을 생성하는 데 사용되는 요청입니다.
attributes [required]The definition of ActionConnectionAttributes object.
integration [required]The definition of ActionConnectionIntegration object.
<type=AWS>The definition of AWSIntegration object.
credentials [required]The definition of AWSCredentials object.
<type=AWSAssumeRole>The definition of AWSAssumeRole object.
account_id [required]AWS account the connection is created for
role [required]Role to assume
type [required]The definition of AWSAssumeRoleType object.
AWSAssumeRoletype [required]The definition of AWSIntegrationType object.
AWS<type=Anthropic>The definition of the AnthropicIntegration object.
credentials [required]The definition of the AnthropicCredentials object.
<type=AnthropicAPIKey>The definition of the AnthropicAPIKey object.
api_token [required]The AnthropicAPIKey api_token.
type [required]The definition of the AnthropicAPIKey object.
AnthropicAPIKeytype [required]The definition of the AnthropicIntegrationType object.
Anthropic<type=Asana>The definition of the AsanaIntegration object.
credentials [required]The definition of the AsanaCredentials object.
<type=AsanaAccessToken>The definition of the AsanaAccessToken object.
access_token [required]The AsanaAccessToken access_token.
type [required]The definition of the AsanaAccessToken object.
AsanaAccessTokentype [required]The definition of the AsanaIntegrationType object.
Asana<type=Azure>The definition of the AzureIntegration object.
credentials [required]The definition of the AzureCredentials object.
<type=AzureTenant>The definition of the AzureTenant object.
app_client_id [required]The Client ID, also known as the Application ID in Azure, is a unique identifier for an application. It's used to identify the application during the authentication process. Your Application (client) ID is listed in the application's overview page. You can navigate to your application via the Azure Directory.
client_secret [required]The Client Secret is a confidential piece of information known only to the application and Azure AD. It's used to prove the application's identity. Your Client Secret is available from the application’s secrets page. You can navigate to your application via the Azure Directory.
custom_scopesIf provided, the custom scope to be requested from Microsoft when acquiring an OAuth 2 access token. This custom scope is used only in conjunction with the HTTP action. A resource's scope is constructed by using the identifier URI for the resource and .default, separated by a forward slash (/) as follows:{identifierURI}/.default.
tenant_id [required]The Tenant ID, also known as the Directory ID in Azure, is a unique identifier that represents an Azure AD instance. Your Tenant ID (Directory ID) is listed in your Active Directory overview page under the 'Tenant information' section.
type [required]The definition of the AzureTenant object.
AzureTenanttype [required]The definition of the AzureIntegrationType object.
Azure<type=CircleCI>The definition of the CircleCIIntegration object.
credentials [required]The definition of the CircleCICredentials object.
<type=CircleCIAPIKey>The definition of the CircleCIAPIKey object.
api_token [required]The CircleCIAPIKey api_token.
type [required]The definition of the CircleCIAPIKey object.
CircleCIAPIKeytype [required]The definition of the CircleCIIntegrationType object.
CircleCI<type=Clickup>The definition of the ClickupIntegration object.
credentials [required]The definition of the ClickupCredentials object.
<type=ClickupAPIKey>The definition of the ClickupAPIKey object.
api_token [required]The ClickupAPIKey api_token.
type [required]The definition of the ClickupAPIKey object.
ClickupAPIKeytype [required]The definition of the ClickupIntegrationType object.
Clickup<type=Cloudflare>The definition of the CloudflareIntegration object.
credentials [required]The definition of the CloudflareCredentials object.
<type=CloudflareAPIToken>The definition of the CloudflareAPIToken object.
api_token [required]The CloudflareAPIToken api_token.
type [required]The definition of the CloudflareAPIToken object.
CloudflareAPIToken<type=CloudflareGlobalAPIToken>The definition of the CloudflareGlobalAPIToken object.
auth_email [required]The CloudflareGlobalAPIToken auth_email.
global_api_key [required]The CloudflareGlobalAPIToken global_api_key.
type [required]The definition of the CloudflareGlobalAPIToken object.
CloudflareGlobalAPITokentype [required]The definition of the CloudflareIntegrationType object.
Cloudflare<type=ConfigCat>The definition of the ConfigCatIntegration object.
credentials [required]The definition of the ConfigCatCredentials object.
<type=ConfigCatSDKKey>The definition of the ConfigCatSDKKey object.
api_password [required]The ConfigCatSDKKey api_password.
api_username [required]The ConfigCatSDKKey api_username.
sdk_key [required]The ConfigCatSDKKey sdk_key.
type [required]The definition of the ConfigCatSDKKey object.
ConfigCatSDKKeytype [required]The definition of the ConfigCatIntegrationType object.
ConfigCat<type=Datadog>The definition of the DatadogIntegration object.
credentials [required]The definition of the DatadogCredentials object.
<type=DatadogAPIKey>The definition of the DatadogAPIKey object.
api_key [required]The DatadogAPIKey api_key.
app_key [required]The DatadogAPIKey app_key.
datacenter [required]The DatadogAPIKey datacenter.
subdomainCustom subdomain used for Datadog URLs generated with this Connection. For example, if this org uses https://acme.datadoghq.com to access Datadog, set this field to acme. If this field is omitted, generated URLs will use the default site URL for its datacenter (see https://docs.datadoghq.com/getting_started/site).
type [required]The definition of the DatadogAPIKey object.
DatadogAPIKeytype [required]The definition of the DatadogIntegrationType object.
Datadog<type=Fastly>The definition of the FastlyIntegration object.
credentials [required]The definition of the FastlyCredentials object.
<type=FastlyAPIKey>The definition of the FastlyAPIKey object.
api_key [required]The FastlyAPIKey api_key.
type [required]The definition of the FastlyAPIKey object.
FastlyAPIKeytype [required]The definition of the FastlyIntegrationType object.
Fastly<type=Freshservice>The definition of the FreshserviceIntegration object.
credentials [required]The definition of the FreshserviceCredentials object.
<type=FreshserviceAPIKey>The definition of the FreshserviceAPIKey object.
api_key [required]The FreshserviceAPIKey api_key.
domain [required]The FreshserviceAPIKey domain.
type [required]The definition of the FreshserviceAPIKey object.
FreshserviceAPIKeytype [required]The definition of the FreshserviceIntegrationType object.
Freshservice<type=GCP>The definition of the GCPIntegration object.
credentials [required]The definition of the GCPCredentials object.
<type=GCPServiceAccount>The definition of the GCPServiceAccount object.
private_key [required]The GCPServiceAccount private_key.
service_account_email [required]The GCPServiceAccount service_account_email.
type [required]The definition of the GCPServiceAccount object.
GCPServiceAccounttype [required]The definition of the GCPIntegrationType object.
GCP<type=Gemini>The definition of the GeminiIntegration object.
credentials [required]The definition of the GeminiCredentials object.
<type=GeminiAPIKey>The definition of the GeminiAPIKey object.
api_key [required]The GeminiAPIKey api_key.
type [required]The definition of the GeminiAPIKey object.
GeminiAPIKeytype [required]The definition of the GeminiIntegrationType object.
Gemini<type=Gitlab>The definition of the GitlabIntegration object.
credentials [required]The definition of the GitlabCredentials object.
<type=GitlabAPIKey>The definition of the GitlabAPIKey object.
api_token [required]The GitlabAPIKey api_token.
type [required]The definition of the GitlabAPIKey object.
GitlabAPIKeytype [required]The definition of the GitlabIntegrationType object.
Gitlab<type=GreyNoise>The definition of the GreyNoiseIntegration object.
credentials [required]The definition of the GreyNoiseCredentials object.
<type=GreyNoiseAPIKey>The definition of the GreyNoiseAPIKey object.
api_key [required]The GreyNoiseAPIKey api_key.
type [required]The definition of the GreyNoiseAPIKey object.
GreyNoiseAPIKeytype [required]The definition of the GreyNoiseIntegrationType object.
GreyNoise<type=HTTP>The definition of HTTPIntegration object.
base_url [required]Base HTTP url for the integration
credentials [required]The definition of HTTPCredentials object.
<type=HTTPTokenAuth>The definition of HTTPTokenAuth object.
bodyThe definition of HTTPBody object.
contentSerialized body content
content_typeContent type of the body
headersThe HTTPTokenAuth headers.
name [required]The HTTPHeader name.
value [required]The HTTPHeader value.
tokensThe HTTPTokenAuth tokens.
name [required]The HTTPToken name.
type [required]The definition of TokenType object.
SECRETvalue [required]The HTTPToken value.
type [required]The definition of HTTPTokenAuthType object.
HTTPTokenAuthurl_parametersThe HTTPTokenAuth url_parameters.
name [required]Name for tokens.
value [required]The UrlParam value.
type [required]The definition of HTTPIntegrationType object.
HTTP<type=LaunchDarkly>The definition of the LaunchDarklyIntegration object.
credentials [required]The definition of the LaunchDarklyCredentials object.
<type=LaunchDarklyAPIKey>The definition of the LaunchDarklyAPIKey object.
api_token [required]The LaunchDarklyAPIKey api_token.
type [required]The definition of the LaunchDarklyAPIKey object.
LaunchDarklyAPIKeytype [required]The definition of the LaunchDarklyIntegrationType object.
LaunchDarkly<type=Notion>The definition of the NotionIntegration object.
credentials [required]The definition of the NotionCredentials object.
<type=NotionAPIKey>The definition of the NotionAPIKey object.
api_token [required]The NotionAPIKey api_token.
type [required]The definition of the NotionAPIKey object.
NotionAPIKeytype [required]The definition of the NotionIntegrationType object.
Notion<type=Okta>The definition of the OktaIntegration object.
credentials [required]The definition of the OktaCredentials object.
<type=OktaAPIToken>The definition of the OktaAPIToken object.
api_token [required]The OktaAPIToken api_token.
domain [required]The OktaAPIToken domain.
type [required]The definition of the OktaAPIToken object.
OktaAPITokentype [required]The definition of the OktaIntegrationType object.
Okta<type=OpenAI>The definition of the OpenAIIntegration object.
credentials [required]The definition of the OpenAICredentials object.
<type=OpenAIAPIKey>The definition of the OpenAIAPIKey object.
api_token [required]The OpenAIAPIKey api_token.
type [required]The definition of the OpenAIAPIKey object.
OpenAIAPIKeytype [required]The definition of the OpenAIIntegrationType object.
OpenAI<type=ServiceNow>The definition of the ServiceNowIntegration object.
credentials [required]The definition of the ServiceNowCredentials object.
<type=ServiceNowBasicAuth>The definition of the ServiceNowBasicAuth object.
instance [required]The ServiceNowBasicAuth instance.
password [required]The ServiceNowBasicAuth password.
type [required]The definition of the ServiceNowBasicAuth object.
ServiceNowBasicAuthusername [required]The ServiceNowBasicAuth username.
type [required]The definition of the ServiceNowIntegrationType object.
ServiceNow<type=Split>The definition of the SplitIntegration object.
credentials [required]The definition of the SplitCredentials object.
<type=SplitAPIKey>The definition of the SplitAPIKey object.
api_key [required]The SplitAPIKey api_key.
type [required]The definition of the SplitAPIKey object.
SplitAPIKeytype [required]The definition of the SplitIntegrationType object.
Split<type=Statsig>The definition of the StatsigIntegration object.
credentials [required]The definition of the StatsigCredentials object.
<type=StatsigAPIKey>The definition of the StatsigAPIKey object.
api_key [required]The StatsigAPIKey api_key.
type [required]The definition of the StatsigAPIKey object.
StatsigAPIKeytype [required]The definition of the StatsigIntegrationType object.
Statsig<type=VirusTotal>The definition of the VirusTotalIntegration object.
credentials [required]The definition of the VirusTotalCredentials object.
<type=VirusTotalAPIKey>The definition of the VirusTotalAPIKey object.
api_key [required]The VirusTotalAPIKey api_key.
type [required]The definition of the VirusTotalAPIKey object.
VirusTotalAPIKeytype [required]The definition of the VirusTotalIntegrationType object.
VirusTotalname [required]Name of the connection
tagsTags associated with the connection. Each tag must follow the key:value format.
The default tag key is reserved.
type [required]The definition of ActionConnectionDataType object.
action_connection{
"data": {
"type": "action_connection",
"attributes": {
"name": "Cassette Connection exampleactionconnection",
"integration": {
"type": "AWS",
"credentials": {
"type": "AWSAssumeRole",
"role": "MyRoleUpdated",
"account_id": "123456789123"
}
}
}
}
}응답
Successfully created Action Connection
The response for a created connection
dataData related to the connection.
attributes [required]The definition of ActionConnectionAttributes object.
integration [required]The definition of ActionConnectionIntegration object.
<type=AWS>The definition of AWSIntegration object.
credentials [required]The definition of AWSCredentials object.
<type=AWSAssumeRole>The definition of AWSAssumeRole object.
account_id [required]AWS account the connection is created for
external_idExternal ID used to scope which connection can be used to assume the role
principal_idAWS account that will assume the role
role [required]Role to assume
type [required]The definition of AWSAssumeRoleType object.
AWSAssumeRoletype [required]The definition of AWSIntegrationType object.
AWS<type=Anthropic>The definition of the AnthropicIntegration object.
credentials [required]The definition of the AnthropicCredentials object.
<type=AnthropicAPIKey>The definition of the AnthropicAPIKey object.
api_token [required]The AnthropicAPIKey api_token.
type [required]The definition of the AnthropicAPIKey object.
AnthropicAPIKeytype [required]The definition of the AnthropicIntegrationType object.
Anthropic<type=Asana>The definition of the AsanaIntegration object.
credentials [required]The definition of the AsanaCredentials object.
<type=AsanaAccessToken>The definition of the AsanaAccessToken object.
access_token [required]The AsanaAccessToken access_token.
type [required]The definition of the AsanaAccessToken object.
AsanaAccessTokentype [required]The definition of the AsanaIntegrationType object.
Asana<type=Azure>The definition of the AzureIntegration object.
credentials [required]The definition of the AzureCredentials object.
<type=AzureTenant>The definition of the AzureTenant object.
app_client_id [required]The Client ID, also known as the Application ID in Azure, is a unique identifier for an application. It's used to identify the application during the authentication process. Your Application (client) ID is listed in the application's overview page. You can navigate to your application via the Azure Directory.
client_secret [required]The Client Secret is a confidential piece of information known only to the application and Azure AD. It's used to prove the application's identity. Your Client Secret is available from the application’s secrets page. You can navigate to your application via the Azure Directory.
custom_scopesIf provided, the custom scope to be requested from Microsoft when acquiring an OAuth 2 access token. This custom scope is used only in conjunction with the HTTP action. A resource's scope is constructed by using the identifier URI for the resource and .default, separated by a forward slash (/) as follows:{identifierURI}/.default.
tenant_id [required]The Tenant ID, also known as the Directory ID in Azure, is a unique identifier that represents an Azure AD instance. Your Tenant ID (Directory ID) is listed in your Active Directory overview page under the 'Tenant information' section.
type [required]The definition of the AzureTenant object.
AzureTenanttype [required]The definition of the AzureIntegrationType object.
Azure<type=CircleCI>The definition of the CircleCIIntegration object.
credentials [required]The definition of the CircleCICredentials object.
<type=CircleCIAPIKey>The definition of the CircleCIAPIKey object.
api_token [required]The CircleCIAPIKey api_token.
type [required]The definition of the CircleCIAPIKey object.
CircleCIAPIKeytype [required]The definition of the CircleCIIntegrationType object.
CircleCI<type=Clickup>The definition of the ClickupIntegration object.
credentials [required]The definition of the ClickupCredentials object.
<type=ClickupAPIKey>The definition of the ClickupAPIKey object.
api_token [required]The ClickupAPIKey api_token.
type [required]The definition of the ClickupAPIKey object.
ClickupAPIKeytype [required]The definition of the ClickupIntegrationType object.
Clickup<type=Cloudflare>The definition of the CloudflareIntegration object.
credentials [required]The definition of the CloudflareCredentials object.
<type=CloudflareAPIToken>The definition of the CloudflareAPIToken object.
api_token [required]The CloudflareAPIToken api_token.
type [required]The definition of the CloudflareAPIToken object.
CloudflareAPIToken<type=CloudflareGlobalAPIToken>The definition of the CloudflareGlobalAPIToken object.
auth_email [required]The CloudflareGlobalAPIToken auth_email.
global_api_key [required]The CloudflareGlobalAPIToken global_api_key.
type [required]The definition of the CloudflareGlobalAPIToken object.
CloudflareGlobalAPITokentype [required]The definition of the CloudflareIntegrationType object.
Cloudflare<type=ConfigCat>The definition of the ConfigCatIntegration object.
credentials [required]The definition of the ConfigCatCredentials object.
<type=ConfigCatSDKKey>The definition of the ConfigCatSDKKey object.
api_password [required]The ConfigCatSDKKey api_password.
api_username [required]The ConfigCatSDKKey api_username.
sdk_key [required]The ConfigCatSDKKey sdk_key.
type [required]The definition of the ConfigCatSDKKey object.
ConfigCatSDKKeytype [required]The definition of the ConfigCatIntegrationType object.
ConfigCat<type=Datadog>The definition of the DatadogIntegration object.
credentials [required]The definition of the DatadogCredentials object.
<type=DatadogAPIKey>The definition of the DatadogAPIKey object.
api_key [required]The DatadogAPIKey api_key.
app_key [required]The DatadogAPIKey app_key.
datacenter [required]The DatadogAPIKey datacenter.
subdomainCustom subdomain used for Datadog URLs generated with this Connection. For example, if this org uses https://acme.datadoghq.com to access Datadog, set this field to acme. If this field is omitted, generated URLs will use the default site URL for its datacenter (see https://docs.datadoghq.com/getting_started/site).
type [required]The definition of the DatadogAPIKey object.
DatadogAPIKeytype [required]The definition of the DatadogIntegrationType object.
Datadog<type=Fastly>The definition of the FastlyIntegration object.
credentials [required]The definition of the FastlyCredentials object.
<type=FastlyAPIKey>The definition of the FastlyAPIKey object.
api_key [required]The FastlyAPIKey api_key.
type [required]The definition of the FastlyAPIKey object.
FastlyAPIKeytype [required]The definition of the FastlyIntegrationType object.
Fastly<type=Freshservice>The definition of the FreshserviceIntegration object.
credentials [required]The definition of the FreshserviceCredentials object.
<type=FreshserviceAPIKey>The definition of the FreshserviceAPIKey object.
api_key [required]The FreshserviceAPIKey api_key.
domain [required]The FreshserviceAPIKey domain.
type [required]The definition of the FreshserviceAPIKey object.
FreshserviceAPIKeytype [required]The definition of the FreshserviceIntegrationType object.
Freshservice<type=GCP>The definition of the GCPIntegration object.
credentials [required]The definition of the GCPCredentials object.
<type=GCPServiceAccount>The definition of the GCPServiceAccount object.
private_key [required]The GCPServiceAccount private_key.
service_account_email [required]The GCPServiceAccount service_account_email.
type [required]The definition of the GCPServiceAccount object.
GCPServiceAccounttype [required]The definition of the GCPIntegrationType object.
GCP<type=Gemini>The definition of the GeminiIntegration object.
credentials [required]The definition of the GeminiCredentials object.
<type=GeminiAPIKey>The definition of the GeminiAPIKey object.
api_key [required]The GeminiAPIKey api_key.
type [required]The definition of the GeminiAPIKey object.
GeminiAPIKeytype [required]The definition of the GeminiIntegrationType object.
Gemini<type=Gitlab>The definition of the GitlabIntegration object.
credentials [required]The definition of the GitlabCredentials object.
<type=GitlabAPIKey>The definition of the GitlabAPIKey object.
api_token [required]The GitlabAPIKey api_token.
type [required]The definition of the GitlabAPIKey object.
GitlabAPIKeytype [required]The definition of the GitlabIntegrationType object.
Gitlab<type=GreyNoise>The definition of the GreyNoiseIntegration object.
credentials [required]The definition of the GreyNoiseCredentials object.
<type=GreyNoiseAPIKey>The definition of the GreyNoiseAPIKey object.
api_key [required]The GreyNoiseAPIKey api_key.
type [required]The definition of the GreyNoiseAPIKey object.
GreyNoiseAPIKeytype [required]The definition of the GreyNoiseIntegrationType object.
GreyNoise<type=HTTP>The definition of HTTPIntegration object.
base_url [required]Base HTTP url for the integration
credentials [required]The definition of HTTPCredentials object.
<type=HTTPTokenAuth>The definition of HTTPTokenAuth object.
bodyThe definition of HTTPBody object.
contentSerialized body content
content_typeContent type of the body
headersThe HTTPTokenAuth headers.
name [required]The HTTPHeader name.
value [required]The HTTPHeader value.
tokensThe HTTPTokenAuth tokens.
name [required]The HTTPToken name.
type [required]The definition of TokenType object.
SECRETvalue [required]The HTTPToken value.
type [required]The definition of HTTPTokenAuthType object.
HTTPTokenAuthurl_parametersThe HTTPTokenAuth url_parameters.
name [required]Name for tokens.
value [required]The UrlParam value.
type [required]The definition of HTTPIntegrationType object.
HTTP<type=LaunchDarkly>The definition of the LaunchDarklyIntegration object.
credentials [required]The definition of the LaunchDarklyCredentials object.
<type=LaunchDarklyAPIKey>The definition of the LaunchDarklyAPIKey object.
api_token [required]The LaunchDarklyAPIKey api_token.
type [required]The definition of the LaunchDarklyAPIKey object.
LaunchDarklyAPIKeytype [required]The definition of the LaunchDarklyIntegrationType object.
LaunchDarkly<type=Notion>The definition of the NotionIntegration object.
credentials [required]The definition of the NotionCredentials object.
<type=NotionAPIKey>The definition of the NotionAPIKey object.
api_token [required]The NotionAPIKey api_token.
type [required]The definition of the NotionAPIKey object.
NotionAPIKeytype [required]The definition of the NotionIntegrationType object.
Notion<type=Okta>The definition of the OktaIntegration object.
credentials [required]The definition of the OktaCredentials object.
<type=OktaAPIToken>The definition of the OktaAPIToken object.
api_token [required]The OktaAPIToken api_token.
domain [required]The OktaAPIToken domain.
type [required]The definition of the OktaAPIToken object.
OktaAPITokentype [required]The definition of the OktaIntegrationType object.
Okta<type=OpenAI>The definition of the OpenAIIntegration object.
credentials [required]The definition of the OpenAICredentials object.
<type=OpenAIAPIKey>The definition of the OpenAIAPIKey object.
api_token [required]The OpenAIAPIKey api_token.
type [required]The definition of the OpenAIAPIKey object.
OpenAIAPIKeytype [required]The definition of the OpenAIIntegrationType object.
OpenAI<type=ServiceNow>The definition of the ServiceNowIntegration object.
credentials [required]The definition of the ServiceNowCredentials object.
<type=ServiceNowBasicAuth>The definition of the ServiceNowBasicAuth object.
instance [required]The ServiceNowBasicAuth instance.
password [required]The ServiceNowBasicAuth password.
type [required]The definition of the ServiceNowBasicAuth object.
ServiceNowBasicAuthusername [required]The ServiceNowBasicAuth username.
type [required]The definition of the ServiceNowIntegrationType object.
ServiceNow<type=Split>The definition of the SplitIntegration object.
credentials [required]The definition of the SplitCredentials object.
<type=SplitAPIKey>The definition of the SplitAPIKey object.
api_key [required]The SplitAPIKey api_key.
type [required]The definition of the SplitAPIKey object.
SplitAPIKeytype [required]The definition of the SplitIntegrationType object.
Split<type=Statsig>The definition of the StatsigIntegration object.
credentials [required]The definition of the StatsigCredentials object.
<type=StatsigAPIKey>The definition of the StatsigAPIKey object.
api_key [required]The StatsigAPIKey api_key.
type [required]The definition of the StatsigAPIKey object.
StatsigAPIKeytype [required]The definition of the StatsigIntegrationType object.
Statsig<type=VirusTotal>The definition of the VirusTotalIntegration object.
credentials [required]The definition of the VirusTotalCredentials object.
<type=VirusTotalAPIKey>The definition of the VirusTotalAPIKey object.
api_key [required]The VirusTotalAPIKey api_key.
type [required]The definition of the VirusTotalAPIKey object.
VirusTotalAPIKeytype [required]The definition of the VirusTotalIntegrationType object.
VirusTotalname [required]Name of the connection
tagsTags associated with the connection. Each tag must follow the key:value format.
The default tag key is reserved.
idThe connection identifier
type [required]The definition of ActionConnectionDataType object.
action_connection{
"data": {
"attributes": {
"integration": {
"credentials": {
"account_id": "111222333444",
"external_id": "33a1011635c44b38a064cf14e82e1d8f",
"principal_id": "123456789012",
"role": "my-role",
"type": "AWSAssumeRole"
},
"type": "AWS"
},
"name": "My AWS Connection",
"tags": [
"env:prod",
"team:action-platform"
]
},
"id": "string",
"type": "action_connection"
}
}Bad Request
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Forbidden
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Too Many Request
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}코드 예시
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/actions/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"type": "action_connection",
"attributes": {
"name": "Cassette Connection exampleactionconnection",
"integration": {
"type": "AWS",
"credentials": {
"type": "AWSAssumeRole",
"role": "MyRoleUpdated",
"account_id": "123456789123"
}
}
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/actions/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"type": "action_connection",
"attributes": {
"name": "Cassette Connection exampleactionconnection",
"integration": {
"type": "AWS",
"credentials": {
"type": "AWSAssumeRole",
"role": "MyRoleUpdated",
"account_id": "123456789123"
}
}
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/actions/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"type": "action_connection",
"attributes": {
"name": "Cassette Connection exampleactionconnection",
"integration": {
"type": "AWS",
"credentials": {
"type": "AWSAssumeRole",
"role": "MyRoleUpdated",
"account_id": "123456789123"
}
}
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/actions/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"type": "action_connection",
"attributes": {
"name": "Cassette Connection exampleactionconnection",
"integration": {
"type": "AWS",
"credentials": {
"type": "AWSAssumeRole",
"role": "MyRoleUpdated",
"account_id": "123456789123"
}
}
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/actions/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"type": "action_connection",
"attributes": {
"name": "Cassette Connection exampleactionconnection",
"integration": {
"type": "AWS",
"credentials": {
"type": "AWSAssumeRole",
"role": "MyRoleUpdated",
"account_id": "123456789123"
}
}
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/actions/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"type": "action_connection",
"attributes": {
"name": "Cassette Connection exampleactionconnection",
"integration": {
"type": "AWS",
"credentials": {
"type": "AWSAssumeRole",
"role": "MyRoleUpdated",
"account_id": "123456789123"
}
}
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/actions/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"type": "action_connection",
"attributes": {
"name": "Cassette Connection exampleactionconnection",
"integration": {
"type": "AWS",
"credentials": {
"type": "AWSAssumeRole",
"role": "MyRoleUpdated",
"account_id": "123456789123"
}
}
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/actions/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"type": "action_connection",
"attributes": {
"name": "Cassette Connection exampleactionconnection",
"integration": {
"type": "AWS",
"credentials": {
"type": "AWSAssumeRole",
"role": "MyRoleUpdated",
"account_id": "123456789123"
}
}
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/actions/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"type": "action_connection",
"attributes": {
"name": "Cassette Connection exampleactionconnection",
"integration": {
"type": "AWS",
"credentials": {
"type": "AWSAssumeRole",
"role": "MyRoleUpdated",
"account_id": "123456789123"
}
}
}
}
}
EOF// Create a new Action Connection returns "Successfully created Action Connection" response
package main
import (
"context"
"encoding/json"
"fmt"
"os"
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)
func main() {
body := datadogV2.CreateActionConnectionRequest{
Data: datadogV2.ActionConnectionData{
Type: datadogV2.ACTIONCONNECTIONDATATYPE_ACTION_CONNECTION,
Attributes: datadogV2.ActionConnectionAttributes{
Name: "Cassette Connection exampleactionconnection",
Integration: datadogV2.ActionConnectionIntegration{
AWSIntegration: &datadogV2.AWSIntegration{
Type: datadogV2.AWSINTEGRATIONTYPE_AWS,
Credentials: datadogV2.AWSCredentials{
AWSAssumeRole: &datadogV2.AWSAssumeRole{
Type: datadogV2.AWSASSUMEROLETYPE_AWSASSUMEROLE,
Role: "MyRoleUpdated",
AccountId: "123456789123",
}},
}},
},
},
}
ctx := datadog.NewDefaultContext(context.Background())
ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewActionConnectionApi(apiClient)
resp, r, err := api.CreateActionConnection(ctx, body)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ActionConnectionApi.CreateActionConnection`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `ActionConnectionApi.CreateActionConnection`:\n%s\n", responseContent)
}
Instructions
First install the library and its dependencies and then save the example to main.go and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"// Create a new Action Connection returns "Successfully created Action Connection" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.ActionConnectionApi;
import com.datadog.api.client.v2.model.AWSAssumeRole;
import com.datadog.api.client.v2.model.AWSAssumeRoleType;
import com.datadog.api.client.v2.model.AWSCredentials;
import com.datadog.api.client.v2.model.AWSIntegration;
import com.datadog.api.client.v2.model.AWSIntegrationType;
import com.datadog.api.client.v2.model.ActionConnectionAttributes;
import com.datadog.api.client.v2.model.ActionConnectionData;
import com.datadog.api.client.v2.model.ActionConnectionDataType;
import com.datadog.api.client.v2.model.ActionConnectionIntegration;
import com.datadog.api.client.v2.model.CreateActionConnectionRequest;
import com.datadog.api.client.v2.model.CreateActionConnectionResponse;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
ActionConnectionApi apiInstance = new ActionConnectionApi(defaultClient);
CreateActionConnectionRequest body =
new CreateActionConnectionRequest()
.data(
new ActionConnectionData()
.type(ActionConnectionDataType.ACTION_CONNECTION)
.attributes(
new ActionConnectionAttributes()
.name("Cassette Connection exampleactionconnection")
.integration(
new ActionConnectionIntegration(
new AWSIntegration()
.type(AWSIntegrationType.AWS)
.credentials(
new AWSCredentials(
new AWSAssumeRole()
.type(AWSAssumeRoleType.AWSASSUMEROLE)
.role("MyRoleUpdated")
.accountId("123456789123")))))));
try {
CreateActionConnectionResponse result = apiInstance.createActionConnection(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ActionConnectionApi#createActionConnection");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Instructions
First install the library and its dependencies and then save the example to Example.java and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java""""
Create a new Action Connection returns "Successfully created Action Connection" response
"""
from os import environ
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.aws_assume_role import AWSAssumeRole
from datadog_api_client.v2.model.aws_assume_role_type import AWSAssumeRoleType
from datadog_api_client.v2.model.aws_integration import AWSIntegration
from datadog_api_client.v2.model.aws_integration_type import AWSIntegrationType
from datadog_api_client.v2.model.create_action_connection_request import CreateActionConnectionRequest
body = CreateActionConnectionRequest(
data=ActionConnectionData(
type=ActionConnectionDataType.ACTION_CONNECTION,
attributes=ActionConnectionAttributes(
name="Cassette Connection exampleactionconnection",
integration=AWSIntegration(
type=AWSIntegrationType.AWS,
credentials=AWSAssumeRole(
type=AWSAssumeRoleType.AWSASSUMEROLE,
role="MyRoleUpdated",
account_id="123456789123",
),
),
),
),
)
configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
with ApiClient(configuration) as api_client:
api_instance = ActionConnectionApi(api_client)
response = api_instance.create_action_connection(body=body)
print(response)
Instructions
First install the library and its dependencies and then save the example to example.py and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"# Create a new Action Connection returns "Successfully created Action Connection" response
require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
end
api_instance = DatadogAPIClient::V2::ActionConnectionAPI.new
body = DatadogAPIClient::V2::CreateActionConnectionRequest.new({
data: DatadogAPIClient::V2::ActionConnectionData.new({
type: DatadogAPIClient::V2::ActionConnectionDataType::ACTION_CONNECTION,
attributes: DatadogAPIClient::V2::ActionConnectionAttributes.new({
name: "Cassette Connection exampleactionconnection",
integration: DatadogAPIClient::V2::AWSIntegration.new({
type: DatadogAPIClient::V2::AWSIntegrationType::AWS,
credentials: DatadogAPIClient::V2::AWSAssumeRole.new({
type: DatadogAPIClient::V2::AWSAssumeRoleType::AWSASSUMEROLE,
role: "MyRoleUpdated",
account_id: "123456789123",
}),
}),
}),
}),
})
p api_instance.create_action_connection(body)
Instructions
First install the library and its dependencies and then save the example to example.rb and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"// Create a new Action Connection returns "Successfully created Action Connection"
// response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_action_connection::ActionConnectionAPI;
use datadog_api_client::datadogV2::model::AWSAssumeRole;
use datadog_api_client::datadogV2::model::AWSAssumeRoleType;
use datadog_api_client::datadogV2::model::AWSCredentials;
use datadog_api_client::datadogV2::model::AWSIntegration;
use datadog_api_client::datadogV2::model::AWSIntegrationType;
use datadog_api_client::datadogV2::model::ActionConnectionAttributes;
use datadog_api_client::datadogV2::model::ActionConnectionData;
use datadog_api_client::datadogV2::model::ActionConnectionDataType;
use datadog_api_client::datadogV2::model::ActionConnectionIntegration;
use datadog_api_client::datadogV2::model::CreateActionConnectionRequest;
#[tokio::main]
async fn main() {
let body = CreateActionConnectionRequest::new(ActionConnectionData::new(
ActionConnectionAttributes::new(
ActionConnectionIntegration::AWSIntegration(Box::new(AWSIntegration::new(
AWSCredentials::AWSAssumeRole(Box::new(AWSAssumeRole::new(
"123456789123".to_string(),
"MyRoleUpdated".to_string(),
AWSAssumeRoleType::AWSASSUMEROLE,
))),
AWSIntegrationType::AWS,
))),
"Cassette Connection exampleactionconnection".to_string(),
),
ActionConnectionDataType::ACTION_CONNECTION,
));
let configuration = datadog::Configuration::new();
let api = ActionConnectionAPI::with_config(configuration);
let resp = api.create_action_connection(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Instructions
First install the library and its dependencies and then save the example to src/main.rs and run following commands:
DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="us3.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="us5.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="datadoghq.eu" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="ap1.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="ap2.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="uk1.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="us2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run/**
* Create a new Action Connection returns "Successfully created Action Connection" response
*/
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration({
authMethods: {
AuthZ: {
accessToken: process.env.DD_BEARER_TOKEN as string,
},
},
});
const apiInstance = new v2.ActionConnectionApi(configuration);
const params: v2.ActionConnectionApiCreateActionConnectionRequest = {
body: {
data: {
type: "action_connection",
attributes: {
name: "Cassette Connection exampleactionconnection",
integration: {
type: "AWS",
credentials: {
type: "AWSAssumeRole",
role: "MyRoleUpdated",
accountId: "123456789123",
},
},
},
},
},
};
apiInstance
.createActionConnection(params)
.then((data: v2.CreateActionConnectionResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Instructions
First install the library and its dependencies and then save the example to example.ts and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"