Class CfnService
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.devopsagent.CfnService
- All Implemented Interfaces:
IInspectable,IServiceRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)",
date="2026-04-14T18:31:52.709Z")
@Stability(Stable)
public class CfnService
extends CfnResource
implements IInspectable, IServiceRef, ITaggableV2
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 software.amazon.awscdk.services.devopsagent.*;
Object exchangeParameters;
CfnService cfnService = CfnService.Builder.create(this, "MyCfnService")
.serviceType("serviceType")
// the properties below are optional
.kmsKeyArn("kmsKeyArn")
.serviceDetails(ServiceDetailsProperty.builder()
.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())
.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())
.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())
.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())
.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())
.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()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceExample:static interfaceAPI key authentication details.static interfaceBearer token authentication details.static final classA fluent builder forCfnService.static interfaceDynatrace OAuth authorization configuration.static interfaceDynatrace service configuration.static interfaceGitLab service configuration.static interfaceExample:static interfaceMCP server configuration.static interfaceMCP server OAuth client credentials configuration.static interfaceMCP server splunk authorization configuration.static interfaceSplunk MCP server configuration.static interfaceNew Relic API key configuration.static interfaceNew Relic authorization configuration.static interfaceNew Relic service configuration.static interfaceOAuth client credentials.static interfaceDynatrace service details returned after registration.static interfaceGitLab service details returned after registration.static interfaceMCP server details returned after registration.static interfaceNew Relic service details returned after registration.static interfaceServiceNow service details returned after registration.static interfaceExample:static interfaceServiceNow OAuth authorization configuration.static interfaceServiceNow service configuration.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.devopsagent.IServiceRef
IServiceRef.Jsii$Default, IServiceRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnService(software.amazon.jsii.JsiiObjectRef objRef) CfnService(software.constructs.Construct scope, String id, CfnServiceProps props) Create a newAWS::DevOpsAgent::Service. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForService(IServiceRef resource) static IServiceReffromServiceArn(software.constructs.Construct scope, String id, String arn) Creates a new IServiceRef from an ARN.static IServiceReffromServiceId(software.constructs.Construct scope, String id, String serviceId) Creates a new IServiceRef from a serviceId.List of accessible resources for this service.Additional details specific to the service type returned after registration.The Amazon Resource Name (ARN) of the Service.The unique identifier of the service.Tag Manager which manages the tags for this resource.The ARN of the KMS key to use for encryption.Service-specific configuration details.A reference to a Service resource.The type of service being registered.getTags()An array of key-value pairs to apply to this resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnService.renderProperties(Map<String, Object> props) voidsetKmsKeyArn(String value) The ARN of the KMS key to use for encryption.voidsetServiceDetails(IResolvable value) Service-specific configuration details.voidService-specific configuration details.voidsetServiceType(String value) The type of service being registered.voidAn array of key-value pairs to apply to this resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId, withMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnService
protected CfnService(software.amazon.jsii.JsiiObjectRef objRef) -
CfnService
protected CfnService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnService
@Stability(Stable) public CfnService(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnServiceProps props) Create a newAWS::DevOpsAgent::Service.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForService
- Parameters:
resource- This parameter is required.
-
fromServiceArn
@Stability(Stable) @NotNull public static IServiceRef fromServiceArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new IServiceRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromServiceId
@Stability(Stable) @NotNull public static IServiceRef fromServiceId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String serviceId) Creates a new IServiceRef from a serviceId.- Parameters:
scope- This parameter is required.id- This parameter is required.serviceId- This parameter is required.
-
isCfnService
Checks whether the given object is a CfnService.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrAccessibleResources
List of accessible resources for this service. -
getAttrAdditionalServiceDetails
Additional details specific to the service type returned after registration. -
getAttrArn
The Amazon Resource Name (ARN) of the Service. -
getAttrServiceId
The unique identifier of the service. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getServiceRef
A reference to a Service resource.- Specified by:
getServiceRefin interfaceIServiceRef
-
getServiceType
The type of service being registered. -
setServiceType
The type of service being registered. -
getKmsKeyArn
The ARN of the KMS key to use for encryption. -
setKmsKeyArn
The ARN of the KMS key to use for encryption. -
getServiceDetails
Service-specific configuration details.Returns union: either
IResolvableorCfnService.ServiceDetailsProperty -
setServiceDetails
Service-specific configuration details. -
setServiceDetails
Service-specific configuration details. -
getTags
An array of key-value pairs to apply to this resource. -
setTags
An array of key-value pairs to apply to this resource.
-