CfnService L1 construct
The AWS::DevOpsAgent::Service resource registers external services (like Dynatrace, MCP servers, GitLab) for integration with DevOpsAgent.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_devopsagent as devopsagent } from 'aws-cdk-lib';
declare const exchangeParameters: any;
const cfnService = new devopsagent.CfnService(this, 'MyCfnService', {
serviceType: 'serviceType',
// the properties below are optional
exchangeUrlPrivateConnectionName: 'exchangeUrlPrivateConnectionName',
kmsKeyArn: 'kmsKeyArn',
name: 'name',
privateConnectionName: 'privateConnectionName',
serviceDetails: {
azureIdentity: {
clientId: 'clientId',
tenantId: 'tenantId',
webIdentityRoleArn: 'webIdentityRoleArn',
webIdentityTokenAudiences: ['webIdentityTokenAudiences'],
},
dynatrace: {
accountUrn: 'accountUrn',
// the properties below are optional
authorizationConfig: {
oAuthClientCredentials: {
clientId: 'clientId',
clientSecret: 'clientSecret',
// the properties below are optional
clientName: 'clientName',
exchangeParameters: exchangeParameters,
},
},
},
gitHub: {
appVerification: {
appVariant: 'appVariant',
tokenValue: 'tokenValue',
// the properties below are optional
organizationName: 'organizationName',
targetUrl: 'targetUrl',
},
directAccess: {
tokenValue: 'tokenValue',
// the properties below are optional
organizationName: 'organizationName',
targetUrl: 'targetUrl',
},
},
gitLab: {
targetUrl: 'targetUrl',
tokenType: 'tokenType',
tokenValue: 'tokenValue',
// the properties below are optional
groupId: 'groupId',
},
mcpServer: {
authorizationConfig: {
apiKey: {
apiKeyHeader: 'apiKeyHeader',
apiKeyName: 'apiKeyName',
apiKeyValue: 'apiKeyValue',
},
bearerToken: {
tokenName: 'tokenName',
tokenValue: 'tokenValue',
// the properties below are optional
authorizationHeader: 'authorizationHeader',
},
oAuthClientCredentials: {
clientId: 'clientId',
clientSecret: 'clientSecret',
exchangeUrl: 'exchangeUrl',
// the properties below are optional
clientName: 'clientName',
exchangeParameters: exchangeParameters,
scopes: ['scopes'],
},
},
endpoint: 'endpoint',
name: 'name',
// the properties below are optional
description: 'description',
},
mcpServerGrafana: {
authorizationConfig: {
bearerToken: {
tokenName: 'tokenName',
tokenValue: 'tokenValue',
// the properties below are optional
authorizationHeader: 'authorizationHeader',
},
},
endpoint: 'endpoint',
name: 'name',
// the properties below are optional
description: 'description',
},
mcpServerNewRelic: {
authorizationConfig: {
apiKey: {
accountId: 'accountId',
apiKey: 'apiKey',
region: 'region',
// the properties below are optional
alertPolicyIds: ['alertPolicyIds'],
applicationIds: ['applicationIds'],
entityGuids: ['entityGuids'],
},
},
},
mcpServerSigV4: {
authorizationConfig: {
region: 'region',
service: 'service',
// the properties below are optional
customHeaders: {
customHeadersKey: 'customHeaders',
},
mcpRoleArn: 'mcpRoleArn',
roleArn: 'roleArn',
},
endpoint: 'endpoint',
name: 'name',
// the properties below are optional
description: 'description',
},
mcpServerSplunk: {
authorizationConfig: {
bearerToken: {
tokenName: 'tokenName',
tokenValue: 'tokenValue',
// the properties below are optional
authorizationHeader: 'authorizationHeader',
},
},
endpoint: 'endpoint',
name: 'name',
// the properties below are optional
description: 'description',
},
pagerDuty: {
authorizationConfig: {
oAuthClientCredentials: {
clientId: 'clientId',
clientSecret: 'clientSecret',
// the properties below are optional
clientName: 'clientName',
exchangeParameters: exchangeParameters,
},
},
scopes: ['scopes'],
},
serviceNow: {
instanceUrl: 'instanceUrl',
// the properties below are optional
authorizationConfig: {
oAuthClientCredentials: {
clientId: 'clientId',
clientSecret: 'clientSecret',
// the properties below are optional
clientName: 'clientName',
exchangeParameters: exchangeParameters,
},
},
},
},
tags: [{
key: 'key',
value: 'value',
}],
targetUrlPrivateConnectionName: 'targetUrlPrivateConnectionName',
});
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_devopsagent as devopsagent
# exchange_parameters: Any
cfn_service = devopsagent.CfnService(self, "MyCfnService",
service_type="serviceType",
# the properties below are optional
exchange_url_private_connection_name="exchangeUrlPrivateConnectionName",
kms_key_arn="kmsKeyArn",
name="name",
private_connection_name="privateConnectionName",
service_details=devopsagent.CfnService.ServiceDetailsProperty(
azure_identity=devopsagent.CfnService.AzureIdentityServiceDetailsProperty(
client_id="clientId",
tenant_id="tenantId",
web_identity_role_arn="webIdentityRoleArn",
web_identity_token_audiences=["webIdentityTokenAudiences"]
),
dynatrace=devopsagent.CfnService.DynatraceServiceDetailsProperty(
account_urn="accountUrn",
# the properties below are optional
authorization_config=devopsagent.CfnService.DynatraceAuthorizationConfigProperty(
o_auth_client_credentials=devopsagent.CfnService.OAuthClientDetailsProperty(
client_id="clientId",
client_secret="clientSecret",
# the properties below are optional
client_name="clientName",
exchange_parameters=exchange_parameters
)
)
),
git_hub=devopsagent.CfnService.GitHubDetailsProperty(
app_verification=devopsagent.CfnService.GitHubAppVerificationDetailsProperty(
app_variant="appVariant",
token_value="tokenValue",
# the properties below are optional
organization_name="organizationName",
target_url="targetUrl"
),
direct_access=devopsagent.CfnService.GitHubPatDetailsProperty(
token_value="tokenValue",
# the properties below are optional
organization_name="organizationName",
target_url="targetUrl"
)
),
git_lab=devopsagent.CfnService.GitLabDetailsProperty(
target_url="targetUrl",
token_type="tokenType",
token_value="tokenValue",
# the properties below are optional
group_id="groupId"
),
mcp_server=devopsagent.CfnService.MCPServerDetailsProperty(
authorization_config=devopsagent.CfnService.MCPServerAuthorizationConfigProperty(
api_key=devopsagent.CfnService.ApiKeyDetailsProperty(
api_key_header="apiKeyHeader",
api_key_name="apiKeyName",
api_key_value="apiKeyValue"
),
bearer_token=devopsagent.CfnService.BearerTokenDetailsProperty(
token_name="tokenName",
token_value="tokenValue",
# the properties below are optional
authorization_header="authorizationHeader"
),
o_auth_client_credentials=devopsagent.CfnService.MCPServerOAuthClientCredentialsConfigProperty(
client_id="clientId",
client_secret="clientSecret",
exchange_url="exchangeUrl",
# the properties below are optional
client_name="clientName",
exchange_parameters=exchange_parameters,
scopes=["scopes"]
)
),
endpoint="endpoint",
name="name",
# the properties below are optional
description="description"
),
mcp_server_grafana=devopsagent.CfnService.MCPServerGrafanaDetailsProperty(
authorization_config=devopsagent.CfnService.MCPServerGrafanaAuthorizationConfigProperty(
bearer_token=devopsagent.CfnService.BearerTokenDetailsProperty(
token_name="tokenName",
token_value="tokenValue",
# the properties below are optional
authorization_header="authorizationHeader"
)
),
endpoint="endpoint",
name="name",
# the properties below are optional
description="description"
),
mcp_server_new_relic=devopsagent.CfnService.NewRelicServiceDetailsProperty(
authorization_config=devopsagent.CfnService.NewRelicAuthorizationConfigProperty(
api_key=devopsagent.CfnService.NewRelicApiKeyConfigProperty(
account_id="accountId",
api_key="apiKey",
region="region",
# the properties below are optional
alert_policy_ids=["alertPolicyIds"],
application_ids=["applicationIds"],
entity_guids=["entityGuids"]
)
)
),
mcp_server_sig_v4=devopsagent.CfnService.MCPServerSigV4DetailsProperty(
authorization_config=devopsagent.CfnService.MCPServerSigV4AuthorizationConfigProperty(
region="region",
service="service",
# the properties below are optional
custom_headers={
"custom_headers_key": "customHeaders"
},
mcp_role_arn="mcpRoleArn",
role_arn="roleArn"
),
endpoint="endpoint",
name="name",
# the properties below are optional
description="description"
),
mcp_server_splunk=devopsagent.CfnService.MCPServerSplunkDetailsProperty(
authorization_config=devopsagent.CfnService.MCPServerSplunkAuthorizationConfigProperty(
bearer_token=devopsagent.CfnService.BearerTokenDetailsProperty(
token_name="tokenName",
token_value="tokenValue",
# the properties below are optional
authorization_header="authorizationHeader"
)
),
endpoint="endpoint",
name="name",
# the properties below are optional
description="description"
),
pager_duty=devopsagent.CfnService.PagerDutyDetailsProperty(
authorization_config=devopsagent.CfnService.PagerDutyAuthorizationConfigProperty(
o_auth_client_credentials=devopsagent.CfnService.OAuthClientDetailsProperty(
client_id="clientId",
client_secret="clientSecret",
# the properties below are optional
client_name="clientName",
exchange_parameters=exchange_parameters
)
),
scopes=["scopes"]
),
service_now=devopsagent.CfnService.ServiceNowServiceDetailsProperty(
instance_url="instanceUrl",
# the properties below are optional
authorization_config=devopsagent.CfnService.ServiceNowAuthorizationConfigProperty(
o_auth_client_credentials=devopsagent.CfnService.OAuthClientDetailsProperty(
client_id="clientId",
client_secret="clientSecret",
# the properties below are optional
client_name="clientName",
exchange_parameters=exchange_parameters
)
)
)
),
tags=[CfnTag(
key="key",
value="value"
)],
target_url_private_connection_name="targetUrlPrivateConnectionName"
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.devopsagent.*;
Object exchangeParameters;
CfnService cfnService = CfnService.Builder.create(this, "MyCfnService")
.serviceType("serviceType")
// the properties below are optional
.exchangeUrlPrivateConnectionName("exchangeUrlPrivateConnectionName")
.kmsKeyArn("kmsKeyArn")
.name("name")
.privateConnectionName("privateConnectionName")
.serviceDetails(ServiceDetailsProperty.builder()
.azureIdentity(AzureIdentityServiceDetailsProperty.builder()
.clientId("clientId")
.tenantId("tenantId")
.webIdentityRoleArn("webIdentityRoleArn")
.webIdentityTokenAudiences(List.of("webIdentityTokenAudiences"))
.build())
.dynatrace(DynatraceServiceDetailsProperty.builder()
.accountUrn("accountUrn")
// the properties below are optional
.authorizationConfig(DynatraceAuthorizationConfigProperty.builder()
.oAuthClientCredentials(OAuthClientDetailsProperty.builder()
.clientId("clientId")
.clientSecret("clientSecret")
// the properties below are optional
.clientName("clientName")
.exchangeParameters(exchangeParameters)
.build())
.build())
.build())
.gitHub(GitHubDetailsProperty.builder()
.appVerification(GitHubAppVerificationDetailsProperty.builder()
.appVariant("appVariant")
.tokenValue("tokenValue")
// the properties below are optional
.organizationName("organizationName")
.targetUrl("targetUrl")
.build())
.directAccess(GitHubPatDetailsProperty.builder()
.tokenValue("tokenValue")
// the properties below are optional
.organizationName("organizationName")
.targetUrl("targetUrl")
.build())
.build())
.gitLab(GitLabDetailsProperty.builder()
.targetUrl("targetUrl")
.tokenType("tokenType")
.tokenValue("tokenValue")
// the properties below are optional
.groupId("groupId")
.build())
.mcpServer(MCPServerDetailsProperty.builder()
.authorizationConfig(MCPServerAuthorizationConfigProperty.builder()
.apiKey(ApiKeyDetailsProperty.builder()
.apiKeyHeader("apiKeyHeader")
.apiKeyName("apiKeyName")
.apiKeyValue("apiKeyValue")
.build())
.bearerToken(BearerTokenDetailsProperty.builder()
.tokenName("tokenName")
.tokenValue("tokenValue")
// the properties below are optional
.authorizationHeader("authorizationHeader")
.build())
.oAuthClientCredentials(MCPServerOAuthClientCredentialsConfigProperty.builder()
.clientId("clientId")
.clientSecret("clientSecret")
.exchangeUrl("exchangeUrl")
// the properties below are optional
.clientName("clientName")
.exchangeParameters(exchangeParameters)
.scopes(List.of("scopes"))
.build())
.build())
.endpoint("endpoint")
.name("name")
// the properties below are optional
.description("description")
.build())
.mcpServerGrafana(MCPServerGrafanaDetailsProperty.builder()
.authorizationConfig(MCPServerGrafanaAuthorizationConfigProperty.builder()
.bearerToken(BearerTokenDetailsProperty.builder()
.tokenName("tokenName")
.tokenValue("tokenValue")
// the properties below are optional
.authorizationHeader("authorizationHeader")
.build())
.build())
.endpoint("endpoint")
.name("name")
// the properties below are optional
.description("description")
.build())
.mcpServerNewRelic(NewRelicServiceDetailsProperty.builder()
.authorizationConfig(NewRelicAuthorizationConfigProperty.builder()
.apiKey(NewRelicApiKeyConfigProperty.builder()
.accountId("accountId")
.apiKey("apiKey")
.region("region")
// the properties below are optional
.alertPolicyIds(List.of("alertPolicyIds"))
.applicationIds(List.of("applicationIds"))
.entityGuids(List.of("entityGuids"))
.build())
.build())
.build())
.mcpServerSigV4(MCPServerSigV4DetailsProperty.builder()
.authorizationConfig(MCPServerSigV4AuthorizationConfigProperty.builder()
.region("region")
.service("service")
// the properties below are optional
.customHeaders(Map.of(
"customHeadersKey", "customHeaders"))
.mcpRoleArn("mcpRoleArn")
.roleArn("roleArn")
.build())
.endpoint("endpoint")
.name("name")
// the properties below are optional
.description("description")
.build())
.mcpServerSplunk(MCPServerSplunkDetailsProperty.builder()
.authorizationConfig(MCPServerSplunkAuthorizationConfigProperty.builder()
.bearerToken(BearerTokenDetailsProperty.builder()
.tokenName("tokenName")
.tokenValue("tokenValue")
// the properties below are optional
.authorizationHeader("authorizationHeader")
.build())
.build())
.endpoint("endpoint")
.name("name")
// the properties below are optional
.description("description")
.build())
.pagerDuty(PagerDutyDetailsProperty.builder()
.authorizationConfig(PagerDutyAuthorizationConfigProperty.builder()
.oAuthClientCredentials(OAuthClientDetailsProperty.builder()
.clientId("clientId")
.clientSecret("clientSecret")
// the properties below are optional
.clientName("clientName")
.exchangeParameters(exchangeParameters)
.build())
.build())
.scopes(List.of("scopes"))
.build())
.serviceNow(ServiceNowServiceDetailsProperty.builder()
.instanceUrl("instanceUrl")
// the properties below are optional
.authorizationConfig(ServiceNowAuthorizationConfigProperty.builder()
.oAuthClientCredentials(OAuthClientDetailsProperty.builder()
.clientId("clientId")
.clientSecret("clientSecret")
// the properties below are optional
.clientName("clientName")
.exchangeParameters(exchangeParameters)
.build())
.build())
.build())
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.targetUrlPrivateConnectionName("targetUrlPrivateConnectionName")
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DevOpsAgent;
var exchangeParameters;
var cfnService = new CfnService(this, "MyCfnService", new CfnServiceProps {
ServiceType = "serviceType",
// the properties below are optional
ExchangeUrlPrivateConnectionName = "exchangeUrlPrivateConnectionName",
KmsKeyArn = "kmsKeyArn",
Name = "name",
PrivateConnectionName = "privateConnectionName",
ServiceDetails = new ServiceDetailsProperty {
AzureIdentity = new AzureIdentityServiceDetailsProperty {
ClientId = "clientId",
TenantId = "tenantId",
WebIdentityRoleArn = "webIdentityRoleArn",
WebIdentityTokenAudiences = new [] { "webIdentityTokenAudiences" }
},
Dynatrace = new DynatraceServiceDetailsProperty {
AccountUrn = "accountUrn",
// the properties below are optional
AuthorizationConfig = new DynatraceAuthorizationConfigProperty {
OAuthClientCredentials = new OAuthClientDetailsProperty {
ClientId = "clientId",
ClientSecret = "clientSecret",
// the properties below are optional
ClientName = "clientName",
ExchangeParameters = exchangeParameters
}
}
},
GitHub = new GitHubDetailsProperty {
AppVerification = new GitHubAppVerificationDetailsProperty {
AppVariant = "appVariant",
TokenValue = "tokenValue",
// the properties below are optional
OrganizationName = "organizationName",
TargetUrl = "targetUrl"
},
DirectAccess = new GitHubPatDetailsProperty {
TokenValue = "tokenValue",
// the properties below are optional
OrganizationName = "organizationName",
TargetUrl = "targetUrl"
}
},
GitLab = new GitLabDetailsProperty {
TargetUrl = "targetUrl",
TokenType = "tokenType",
TokenValue = "tokenValue",
// the properties below are optional
GroupId = "groupId"
},
McpServer = new MCPServerDetailsProperty {
AuthorizationConfig = new MCPServerAuthorizationConfigProperty {
ApiKey = new ApiKeyDetailsProperty {
ApiKeyHeader = "apiKeyHeader",
ApiKeyName = "apiKeyName",
ApiKeyValue = "apiKeyValue"
},
BearerToken = new BearerTokenDetailsProperty {
TokenName = "tokenName",
TokenValue = "tokenValue",
// the properties below are optional
AuthorizationHeader = "authorizationHeader"
},
OAuthClientCredentials = new MCPServerOAuthClientCredentialsConfigProperty {
ClientId = "clientId",
ClientSecret = "clientSecret",
ExchangeUrl = "exchangeUrl",
// the properties below are optional
ClientName = "clientName",
ExchangeParameters = exchangeParameters,
Scopes = new [] { "scopes" }
}
},
Endpoint = "endpoint",
Name = "name",
// the properties below are optional
Description = "description"
},
McpServerGrafana = new MCPServerGrafanaDetailsProperty {
AuthorizationConfig = new MCPServerGrafanaAuthorizationConfigProperty {
BearerToken = new BearerTokenDetailsProperty {
TokenName = "tokenName",
TokenValue = "tokenValue",
// the properties below are optional
AuthorizationHeader = "authorizationHeader"
}
},
Endpoint = "endpoint",
Name = "name",
// the properties below are optional
Description = "description"
},
McpServerNewRelic = new NewRelicServiceDetailsProperty {
AuthorizationConfig = new NewRelicAuthorizationConfigProperty {
ApiKey = new NewRelicApiKeyConfigProperty {
AccountId = "accountId",
ApiKey = "apiKey",
Region = "region",
// the properties below are optional
AlertPolicyIds = new [] { "alertPolicyIds" },
ApplicationIds = new [] { "applicationIds" },
EntityGuids = new [] { "entityGuids" }
}
}
},
McpServerSigV4 = new MCPServerSigV4DetailsProperty {
AuthorizationConfig = new MCPServerSigV4AuthorizationConfigProperty {
Region = "region",
Service = "service",
// the properties below are optional
CustomHeaders = new Dictionary<string, string> {
{ "customHeadersKey", "customHeaders" }
},
McpRoleArn = "mcpRoleArn",
RoleArn = "roleArn"
},
Endpoint = "endpoint",
Name = "name",
// the properties below are optional
Description = "description"
},
McpServerSplunk = new MCPServerSplunkDetailsProperty {
AuthorizationConfig = new MCPServerSplunkAuthorizationConfigProperty {
BearerToken = new BearerTokenDetailsProperty {
TokenName = "tokenName",
TokenValue = "tokenValue",
// the properties below are optional
AuthorizationHeader = "authorizationHeader"
}
},
Endpoint = "endpoint",
Name = "name",
// the properties below are optional
Description = "description"
},
PagerDuty = new PagerDutyDetailsProperty {
AuthorizationConfig = new PagerDutyAuthorizationConfigProperty {
OAuthClientCredentials = new OAuthClientDetailsProperty {
ClientId = "clientId",
ClientSecret = "clientSecret",
// the properties below are optional
ClientName = "clientName",
ExchangeParameters = exchangeParameters
}
},
Scopes = new [] { "scopes" }
},
ServiceNow = new ServiceNowServiceDetailsProperty {
InstanceUrl = "instanceUrl",
// the properties below are optional
AuthorizationConfig = new ServiceNowAuthorizationConfigProperty {
OAuthClientCredentials = new OAuthClientDetailsProperty {
ClientId = "clientId",
ClientSecret = "clientSecret",
// the properties below are optional
ClientName = "clientName",
ExchangeParameters = exchangeParameters
}
}
}
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TargetUrlPrivateConnectionName = "targetUrlPrivateConnectionName"
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var exchangeParameters interface{}
cfnService := awscdk.Aws_devopsagent.NewCfnService(this, jsii.String("MyCfnService"), &CfnServiceProps{
ServiceType: jsii.String("serviceType"),
// the properties below are optional
ExchangeUrlPrivateConnectionName: jsii.String("exchangeUrlPrivateConnectionName"),
KmsKeyArn: jsii.String("kmsKeyArn"),
Name: jsii.String("name"),
PrivateConnectionName: jsii.String("privateConnectionName"),
ServiceDetails: &ServiceDetailsProperty{
AzureIdentity: &AzureIdentityServiceDetailsProperty{
ClientId: jsii.String("clientId"),
TenantId: jsii.String("tenantId"),
WebIdentityRoleArn: jsii.String("webIdentityRoleArn"),
WebIdentityTokenAudiences: []*string{
jsii.String("webIdentityTokenAudiences"),
},
},
Dynatrace: &DynatraceServiceDetailsProperty{
AccountUrn: jsii.String("accountUrn"),
// the properties below are optional
AuthorizationConfig: &DynatraceAuthorizationConfigProperty{
OAuthClientCredentials: &OAuthClientDetailsProperty{
ClientId: jsii.String("clientId"),
ClientSecret: jsii.String("clientSecret"),
// the properties below are optional
ClientName: jsii.String("clientName"),
ExchangeParameters: exchangeParameters,
},
},
},
GitHub: &GitHubDetailsProperty{
AppVerification: &GitHubAppVerificationDetailsProperty{
AppVariant: jsii.String("appVariant"),
TokenValue: jsii.String("tokenValue"),
// the properties below are optional
OrganizationName: jsii.String("organizationName"),
TargetUrl: jsii.String("targetUrl"),
},
DirectAccess: &GitHubPatDetailsProperty{
TokenValue: jsii.String("tokenValue"),
// the properties below are optional
OrganizationName: jsii.String("organizationName"),
TargetUrl: jsii.String("targetUrl"),
},
},
GitLab: &GitLabDetailsProperty{
TargetUrl: jsii.String("targetUrl"),
TokenType: jsii.String("tokenType"),
TokenValue: jsii.String("tokenValue"),
// the properties below are optional
GroupId: jsii.String("groupId"),
},
McpServer: &MCPServerDetailsProperty{
AuthorizationConfig: &MCPServerAuthorizationConfigProperty{
ApiKey: &ApiKeyDetailsProperty{
ApiKeyHeader: jsii.String("apiKeyHeader"),
ApiKeyName: jsii.String("apiKeyName"),
ApiKeyValue: jsii.String("apiKeyValue"),
},
BearerToken: &BearerTokenDetailsProperty{
TokenName: jsii.String("tokenName"),
TokenValue: jsii.String("tokenValue"),
// the properties below are optional
AuthorizationHeader: jsii.String("authorizationHeader"),
},
OAuthClientCredentials: &MCPServerOAuthClientCredentialsConfigProperty{
ClientId: jsii.String("clientId"),
ClientSecret: jsii.String("clientSecret"),
ExchangeUrl: jsii.String("exchangeUrl"),
// the properties below are optional
ClientName: jsii.String("clientName"),
ExchangeParameters: exchangeParameters,
Scopes: []*string{
jsii.String("scopes"),
},
},
},
Endpoint: jsii.String("endpoint"),
Name: jsii.String("name"),
// the properties below are optional
Description: jsii.String("description"),
},
McpServerGrafana: &MCPServerGrafanaDetailsProperty{
AuthorizationConfig: &MCPServerGrafanaAuthorizationConfigProperty{
BearerToken: &BearerTokenDetailsProperty{
TokenName: jsii.String("tokenName"),
TokenValue: jsii.String("tokenValue"),
// the properties below are optional
AuthorizationHeader: jsii.String("authorizationHeader"),
},
},
Endpoint: jsii.String("endpoint"),
Name: jsii.String("name"),
// the properties below are optional
Description: jsii.String("description"),
},
McpServerNewRelic: &NewRelicServiceDetailsProperty{
AuthorizationConfig: &NewRelicAuthorizationConfigProperty{
ApiKey: &NewRelicApiKeyConfigProperty{
AccountId: jsii.String("accountId"),
ApiKey: jsii.String("apiKey"),
Region: jsii.String("region"),
// the properties below are optional
AlertPolicyIds: []*string{
jsii.String("alertPolicyIds"),
},
ApplicationIds: []*string{
jsii.String("applicationIds"),
},
EntityGuids: []*string{
jsii.String("entityGuids"),
},
},
},
},
McpServerSigV4: &MCPServerSigV4DetailsProperty{
AuthorizationConfig: &MCPServerSigV4AuthorizationConfigProperty{
Region: jsii.String("region"),
Service: jsii.String("service"),
// the properties below are optional
CustomHeaders: map[string]*string{
"customHeadersKey": jsii.String("customHeaders"),
},
McpRoleArn: jsii.String("mcpRoleArn"),
RoleArn: jsii.String("roleArn"),
},
Endpoint: jsii.String("endpoint"),
Name: jsii.String("name"),
// the properties below are optional
Description: jsii.String("description"),
},
McpServerSplunk: &MCPServerSplunkDetailsProperty{
AuthorizationConfig: &MCPServerSplunkAuthorizationConfigProperty{
BearerToken: &BearerTokenDetailsProperty{
TokenName: jsii.String("tokenName"),
TokenValue: jsii.String("tokenValue"),
// the properties below are optional
AuthorizationHeader: jsii.String("authorizationHeader"),
},
},
Endpoint: jsii.String("endpoint"),
Name: jsii.String("name"),
// the properties below are optional
Description: jsii.String("description"),
},
PagerDuty: &PagerDutyDetailsProperty{
AuthorizationConfig: &PagerDutyAuthorizationConfigProperty{
OAuthClientCredentials: &OAuthClientDetailsProperty{
ClientId: jsii.String("clientId"),
ClientSecret: jsii.String("clientSecret"),
// the properties below are optional
ClientName: jsii.String("clientName"),
ExchangeParameters: exchangeParameters,
},
},
Scopes: []*string{
jsii.String("scopes"),
},
},
ServiceNow: &ServiceNowServiceDetailsProperty{
InstanceUrl: jsii.String("instanceUrl"),
// the properties below are optional
AuthorizationConfig: &ServiceNowAuthorizationConfigProperty{
OAuthClientCredentials: &OAuthClientDetailsProperty{
ClientId: jsii.String("clientId"),
ClientSecret: jsii.String("clientSecret"),
// the properties below are optional
ClientName: jsii.String("clientName"),
ExchangeParameters: exchangeParameters,
},
},
},
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
TargetUrlPrivateConnectionName: jsii.String("targetUrlPrivateConnectionName"),
})
Initializer
new CfnService(scope: Construct, id: string, props: CfnServiceProps)
CfnService(scope: Construct, id: str, props: CfnServiceProps)
new CfnService(Construct scope, String id, CfnServiceProps props)
new CfnService(Construct scope, string id, CfnServiceProps props)
NewCfnService(Scope Construct, Id *string, Props CfnServiceProps)
Construct Props
exchangeUrlPrivateConnectionNameoptionalstringexchange_url_private_connection_nameoptionalstrexchangeUrlPrivateConnectionNameoptionalStringExchangeUrlPrivateConnectionNameoptionalstringExchangeUrlPrivateConnectionNameoptional*string#Cannot be specified when PrivateConnectionName is provided.
kmsKeyArnoptionalstringkms_key_arnoptionalstrkmsKeyArnoptionalStringKmsKeyArnoptionalstringKmsKeyArnoptional*string#privateConnectionNameoptionalstringprivate_connection_nameoptionalstrprivateConnectionNameoptionalStringPrivateConnectionNameoptionalstringPrivateConnectionNameoptional*string#serviceDetailsoptionalIResolvable | CfnService.ServiceDetailsPropertyservice_detailsoptionaltyping.Union[IResolvable, ServiceDetailsProperty]serviceDetailsoptionalIResolvableServiceDetailsoptionalIResolvableServiceDetailsoptionalinterface{}#notes
GitLab (TokenValue), MCPServer (ApiKey or BearerToken credential rotation), MCPServerNewRelic (ApiKey rotation), and MCPServerGrafana (BearerToken rotation) support in-place credential rotation; all other service types and fields require replacement when modified
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#targetUrlPrivateConnectionNameoptionalstringtarget_url_private_connection_nameoptionalstrtargetUrlPrivateConnectionNameoptionalStringTargetUrlPrivateConnectionNameoptionalstringTargetUrlPrivateConnectionNameoptional*string#Cannot be specified when PrivateConnectionName is provided.
Properties
attrAccessibleResourcesIResolvableattr_accessible_resourcesIResolvableattrAccessibleResourcesIResolvableAttrAccessibleResourcesIResolvableAttrAccessibleResourcesIResolvable#attrAdditionalServiceDetailsIResolvableattr_additional_service_detailsIResolvableattrAdditionalServiceDetailsIResolvableAttrAdditionalServiceDetailsIResolvableAttrAdditionalServiceDetailsIResolvable#cdkTagManagerTagManagercdk_tag_managerTagManagercdkTagManagerTagManagerCdkTagManagerTagManagerCdkTagManagerTagManager#CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringstatic#cfnOptionsICfnResourceOptionscfn_optionsICfnResourceOptionscfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptions#cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string#creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*string#exchangeUrlPrivateConnectionNamemay be undefinedstringexchange_url_private_connection_namemay be undefinedstrexchangeUrlPrivateConnectionNamemay be undefinedStringExchangeUrlPrivateConnectionNamemay be undefinedstringExchangeUrlPrivateConnectionNamemay be undefined*string#kmsKeyArnmay be undefinedstringkms_key_arnmay be undefinedstrkmsKeyArnmay be undefinedStringKmsKeyArnmay be undefinedstringKmsKeyArnmay be undefined*string#The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use overrideLogicalId(newLogicalId).
namemay be undefinedstringnamemay be undefinedstrnamemay be undefinedStringNamemay be undefinedstringNamemay be undefined*string#privateConnectionNamemay be undefinedstringprivate_connection_namemay be undefinedstrprivateConnectionNamemay be undefinedStringPrivateConnectionNamemay be undefinedstringPrivateConnectionNamemay be undefined*string#If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).
serviceDetailsmay be undefinedIResolvable | CfnService.ServiceDetailsPropertyservice_detailsmay be undefinedtyping.Union[IResolvable, ServiceDetailsProperty]serviceDetailsmay be undefinedIResolvableServiceDetailsmay be undefinedIResolvableServiceDetailsmay be undefinedinterface{}#serviceRefServiceReferenceservice_refServiceReferenceserviceRefServiceReferenceServiceRefServiceReferenceServiceRefServiceReference#CfnElements must be defined within a stack scope (directly or indirectly).
tagsmay be undefinedCfnTag[]tagsmay be undefinedtyping.List[CfnTag]tagsmay be undefinedList<CfnTag>Tagsmay be undefinedCfnTag[]Tagsmay be undefined*[]CfnTag#targetUrlPrivateConnectionNamemay be undefinedstringtarget_url_private_connection_namemay be undefinedstrtargetUrlPrivateConnectionNamemay be undefinedStringTargetUrlPrivateConnectionNamemay be undefinedstringTargetUrlPrivateConnectionNamemay be undefined*string#Methods
addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string)#1 parameter
Parameters
pathpathpathpathPath— The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource)deprecated#This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.
addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource)deprecated#notes
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.
addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{})#addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{})#notes · 2 parameters
To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).
If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.
For example,
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
would add the overrides
"Properties": {
"GlobalSecondaryIndexes": [
{
"Projection": {
"NonKeyAttributes": [ "myattribute" ]
...
}
...
},
{
"ProjectionType": "INCLUDE"
...
},
]
...
}
The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.
Parameters
pathpathpathpathPath— - The path of the property, you can use dot notation to override values in complex types.valuevaluevaluevalueValue— - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string)#1 parameter
Parameters
propertyPathproperty_pathpropertyPathpropertyPathPropertyPath— The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{})#Syntactic sugar for addOverride("Properties.<...>", value).
2 parameters
Parameters
propertyPathproperty_pathpropertyPathpropertyPathPropertyPath— The path of the property.valuevaluevaluevalueValue— The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string)#notes
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.
applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.
1 parameter
Parameters
strengthstrengthstrengthstrengthStrength— - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions)#notes
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:
arnForService(resource: IServiceRef): string@staticmethod def arn_for_service(resource: IServiceRef) -> strpublic static String arnForService(IServiceRef resource)public static string ArnForService(IServiceRef resource)func ArnForService(Resource IServiceRef) *stringstatic#cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string#fromServiceArn(scope: Construct, id: string, arn: string): IServiceRef@staticmethod def from_service_arn(scope: Construct, id: str, arn: str) -> IServiceRefpublic static IServiceRef fromServiceArn(Construct scope, String id, String arn)public static IServiceRef FromServiceArn(Construct scope, string id, string arn)func FromServiceArn(Scope Construct, Id *string, Arn *string) IServiceRefstatic#fromServiceId(scope: Construct, id: string, serviceId: string): IServiceRef@staticmethod def from_service_id(scope: Construct, id: str, service_id: str) -> IServiceRefpublic static IServiceRef fromServiceId(Construct scope, String id, String serviceId)public static IServiceRef FromServiceId(Construct scope, string id, string serviceId)func FromServiceId(Scope Construct, Id *string, ServiceId *string) IServiceRefstatic#getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference#Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.
1 parameter
Parameters
attributeNameattribute_nameattributeNameattributeNameAttributeName— The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{}#inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#1 parameter
Parameters
inspectorinspectorinspectorinspectorInspector— tree inspector to collect and process attributes.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.
returns
Returns: The construct as a stack element or undefined if it is not a stack element.
isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *boolstatic#isCfnService(x: any): boolean@staticmethod def is_cfn_service(x: Any) -> boolpublic static Boolean isCfnService(Object x)public static bool IsCfnService(object x)func IsCfnService(X interface{}) *boolstatic#isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#notes · 1 parameter · returns
Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Construct.
obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{}#For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.
overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#1 parameter
Parameters
newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId— The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource)deprecated#This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource)#This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource)#2 parameters
Parameters
targettargettargettargetTarget— The dependency to replace.newTargetnew_targetnewTargetnewTargetNewTarget— The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#returns
Returns: a string representation of this resource
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.