java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IServiceRef, IEnvironmentAware, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-19T12:55:02.374Z") @Stability(Stable) public class CfnService extends CfnResource implements IInspectable, IServiceRef
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
         .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())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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 new AWS::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

      @Stability(Stable) @NotNull public static String arnForService(@NotNull IServiceRef resource)
      Parameters:
      resource - 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

      @Stability(Stable) @NotNull public static Boolean isCfnService(@NotNull Object x)
      Checks whether the given object is a CfnService.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrAccessibleResources

      @Stability(Stable) @NotNull public IResolvable getAttrAccessibleResources()
      List of accessible resources for this service.
    • getAttrAdditionalServiceDetails

      @Stability(Stable) @NotNull public IResolvable getAttrAdditionalServiceDetails()
      Additional details specific to the service type returned after registration.
    • getAttrServiceId

      @Stability(Stable) @NotNull public String getAttrServiceId()
      The unique identifier of the service.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getServiceRef

      @Stability(Stable) @NotNull public ServiceReference getServiceRef()
      A reference to a Service resource.
      Specified by:
      getServiceRef in interface IServiceRef
    • getServiceType

      @Stability(Stable) @NotNull public String getServiceType()
      The type of service being registered.
    • setServiceType

      @Stability(Stable) public void setServiceType(@NotNull String value)
      The type of service being registered.
    • getServiceDetails

      @Stability(Stable) @Nullable public Object getServiceDetails()
      Service-specific configuration details.

      Returns union: either IResolvable or CfnService.ServiceDetailsProperty

    • setServiceDetails

      @Stability(Stable) public void setServiceDetails(@Nullable IResolvable value)
      Service-specific configuration details.
    • setServiceDetails

      @Stability(Stable) public void setServiceDetails(@Nullable CfnService.ServiceDetailsProperty value)
      Service-specific configuration details.