Class CfnDataSource

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

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:14.606Z") @Stability(Stable) public class CfnDataSource extends CfnResource implements IInspectable, IDataSourceRef
Creates a data source for an Amazon OpenSearch Service domain.

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.opensearch.*;
 CfnDataSource cfnDataSource = CfnDataSource.Builder.create(this, "MyCfnDataSource")
         .dataSourceType(DataSourceTypeProperty.builder()
                 .s3GlueDataCatalog(S3GlueDataCatalogProperty.builder()
                         .roleArn("roleArn")
                         .build())
                 .build())
         .domainName("domainName")
         .name("name")
         // the properties below are optional
         .description("description")
         .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

    • CfnDataSource

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

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

      @Stability(Stable) public CfnDataSource(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDataSourceProps props)
      Create a new AWS::OpenSearch::DataSource.

      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

    • arnForDataSource

      @Stability(Stable) @NotNull public static String arnForDataSource(@NotNull IDataSourceRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnDataSource

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

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

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the data source.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The status of the data source.
    • getCfnProperties

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

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getDataSourceRef

      @Stability(Stable) @NotNull public DataSourceReference getDataSourceRef()
      A reference to a DataSource resource.
      Specified by:
      getDataSourceRef in interface IDataSourceRef
    • getDataSourceType

      @Stability(Stable) @NotNull public Object getDataSourceType()
      The type of data source.

      Returns union: either IResolvable or CfnDataSource.DataSourceTypeProperty

    • setDataSourceType

      @Stability(Stable) public void setDataSourceType(@NotNull IResolvable value)
      The type of data source.
    • setDataSourceType

      @Stability(Stable) public void setDataSourceType(@NotNull CfnDataSource.DataSourceTypeProperty value)
      The type of data source.
    • getDomainName

      @Stability(Stable) @NotNull public String getDomainName()
      The name of the OpenSearch Service domain.
    • setDomainName

      @Stability(Stable) public void setDomainName(@NotNull String value)
      The name of the OpenSearch Service domain.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the data source.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the data source.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description of the data source.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description of the data source.