Class CfnAssociation

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

@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)", date="2025-12-12T17:54:11.037Z") @Stability(Stable) public class CfnAssociation extends CfnResource implements IInspectable, IAssociationRef
Resource Type definition for AWS::DevOpsAgent::Association defining how the AgentSpace interacts with external services like GitHub, Slack, AWS accounts, and others.

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 resourceMetadata;
 CfnAssociation cfnAssociation = CfnAssociation.Builder.create(this, "MyCfnAssociation")
         .agentSpaceId("agentSpaceId")
         .configuration(ServiceConfigurationProperty.builder()
                 .aws(AWSConfigurationProperty.builder()
                         .accountId("accountId")
                         .accountType("accountType")
                         .assumableRoleArn("assumableRoleArn")
                         // the properties below are optional
                         .resources(List.of(AWSResourceProperty.builder()
                                 .resourceArn("resourceArn")
                                 // the properties below are optional
                                 .resourceMetadata(resourceMetadata)
                                 .resourceType("resourceType")
                                 .build()))
                         .tags(List.of(KeyValuePairProperty.builder()
                                 .key("key")
                                 .value("value")
                                 .build()))
                         .build())
                 .dynatrace(DynatraceConfigurationProperty.builder()
                         .envId("envId")
                         // the properties below are optional
                         .enableWebhookUpdates(false)
                         .resources(List.of("resources"))
                         .build())
                 .eventChannel(EventChannelConfigurationProperty.builder()
                         .enableWebhookUpdates(false)
                         .build())
                 .gitHub(GitHubConfigurationProperty.builder()
                         .owner("owner")
                         .ownerType("ownerType")
                         .repoId("repoId")
                         .repoName("repoName")
                         .build())
                 .gitLab(GitLabConfigurationProperty.builder()
                         .projectId("projectId")
                         .projectPath("projectPath")
                         // the properties below are optional
                         .enableWebhookUpdates(false)
                         .instanceIdentifier("instanceIdentifier")
                         .build())
                 .mcpServer(MCPServerConfigurationProperty.builder()
                         .endpoint("endpoint")
                         .name("name")
                         .tools(List.of("tools"))
                         // the properties below are optional
                         .description("description")
                         .enableWebhookUpdates(false)
                         .build())
                 .mcpServerDatadog(MCPServerDatadogConfigurationProperty.builder()
                         .endpoint("endpoint")
                         .name("name")
                         // the properties below are optional
                         .description("description")
                         .enableWebhookUpdates(false)
                         .build())
                 .mcpServerNewRelic(MCPServerNewRelicConfigurationProperty.builder()
                         .accountId("accountId")
                         .endpoint("endpoint")
                         .build())
                 .mcpServerSplunk(MCPServerSplunkConfigurationProperty.builder()
                         .endpoint("endpoint")
                         .name("name")
                         // the properties below are optional
                         .description("description")
                         .enableWebhookUpdates(false)
                         .build())
                 .serviceNow(ServiceNowConfigurationProperty.builder()
                         .enableWebhookUpdates(false)
                         .instanceId("instanceId")
                         .build())
                 .slack(SlackConfigurationProperty.builder()
                         .transmissionTarget(SlackTransmissionTargetProperty.builder()
                                 .incidentResponseTarget(SlackChannelProperty.builder()
                                         .channelId("channelId")
                                         // the properties below are optional
                                         .channelName("channelName")
                                         .build())
                                 .build())
                         .workspaceId("workspaceId")
                         .workspaceName("workspaceName")
                         .build())
                 .sourceAws(SourceAwsConfigurationProperty.builder()
                         .accountId("accountId")
                         .accountType("accountType")
                         .assumableRoleArn("assumableRoleArn")
                         // the properties below are optional
                         .resources(List.of(AWSResourceProperty.builder()
                                 .resourceArn("resourceArn")
                                 // the properties below are optional
                                 .resourceMetadata(resourceMetadata)
                                 .resourceType("resourceType")
                                 .build()))
                         .tags(List.of(KeyValuePairProperty.builder()
                                 .key("key")
                                 .value("value")
                                 .build()))
                         .build())
                 .build())
         .serviceId("serviceId")
         .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

    • CfnAssociation

      protected CfnAssociation(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnAssociation

      protected CfnAssociation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnAssociation

      @Stability(Stable) public CfnAssociation(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAssociationProps props)
      Create a new AWS::DevOpsAgent::Association.

      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

    • isCfnAssociation

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

      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.
    • getAssociationRef

      @Stability(Stable) @NotNull public AssociationReference getAssociationRef()
      A reference to a Association resource.
      Specified by:
      getAssociationRef in interface IAssociationRef
    • getAttrAssociationId

      @Stability(Stable) @NotNull public String getAttrAssociationId()
      The unique identifier of the association.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The timestamp when the association was created.
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The timestamp when the association was last updated.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public String getAgentSpaceId()
      The unique identifier of the AgentSpace.
    • setAgentSpaceId

      @Stability(Stable) public void setAgentSpaceId(@NotNull String value)
      The unique identifier of the AgentSpace.
    • getConfiguration

      @Stability(Stable) @NotNull public Object getConfiguration()
      The configuration that directs how AgentSpace interacts with the given service.

      Returns union: either IResolvable or CfnAssociation.ServiceConfigurationProperty

    • setConfiguration

      @Stability(Stable) public void setConfiguration(@NotNull IResolvable value)
      The configuration that directs how AgentSpace interacts with the given service.
    • setConfiguration

      @Stability(Stable) public void setConfiguration(@NotNull CfnAssociation.ServiceConfigurationProperty value)
      The configuration that directs how AgentSpace interacts with the given service.
    • getServiceId

      @Stability(Stable) @NotNull public String getServiceId()
      The identifier for the associated service.
    • setServiceId

      @Stability(Stable) public void setServiceId(@NotNull String value)
      The identifier for the associated service.