Class CreateConnectionRequest
- All Implemented Interfaces:
SdkPojo,ToCopyableBuilder<CreateConnectionRequest.Builder,CreateConnectionRequest>
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal AccessConfigThe access configuration for the data source, which names the AWS Identity and Access Management (IAM) role for data access.The conditions that you acknowledge AWS Context can't honor.builder()final StringA client idempotency token.final DataSourceReferenceThe external data source that this connection binds to: itstypeandlocation.arn.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) Used to retrieve the value of a field from any class that extendsSdkRequest.final List<GlueConnectionMapping> The AWS Glue connection to use for eachredshiftNamespace, eachrdsInstanceandrdsDatabasepair, or eachsnowflakeDatabaseinscope, keyed bypath.final booleanFor responses, this returns true if the service returned a value for the Acknowledgements property.final booleanFor responses, this returns true if the service returned a value for the GlueConnectionMappings property.final inthashCode()final booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.final IngestionConfigThe ingestion configuration: the IAM role that a data producer (AWS Glue Data Catalog or Amazon Bedrock knowledge base) assumes to push data into this connection's agent contexts.final Stringname()The name of the connection.final Booleanpublish()Specifies whether to configure catalog synchronization and wait for it to be provisioned during this call.final DataSourceScopescope()Optional hierarchical subset of the data source to ingest.static Class<? extends CreateConnectionRequest.Builder> final SyncScheduleHow often AWS Context re-syncs aDATABRICKSorSNOWFLAKEsource.tags()Tags to add to the connection when you create it: up to 200 in the request, of which at most 50 can be user tags.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
clientToken
A client idempotency token. It is optional, so the AWS SDKs can generate it automatically and reuse it on retries. A retry with an identical request returns the original connection. A different request returns
ValidationException.acknowledgements,tagsand, once the connection isACTIVE,publishare not compared with the original request. A create refused for a missing acknowledgement records no token.- Returns:
- A client idempotency token. It is optional, so the AWS SDKs can generate it automatically and reuse it on
retries. A retry with an identical request returns the original connection. A different request returns
ValidationException.acknowledgements,tagsand, once the connection isACTIVE,publishare not compared with the original request. A create refused for a missing acknowledgement records no token.
-
name
The name of the connection. Required. You can change it later with UpdateConnection. Starts with a letter and contains 3–63 ASCII letters, digits, and hyphens.
- Returns:
- The name of the connection. Required. You can change it later with UpdateConnection. Starts with a letter and contains 3–63 ASCII letters, digits, and hyphens.
-
dataSource
The external data source that this connection binds to: its
typeandlocation.arn. The ARN must be in your account, except forGLUE_DATA_CATALOG, where it can name a catalog or an AWS Glue connection in another account.-
GLUE_DATA_CATALOG- An AWS Glue Data Catalog ARN (:catalogor:catalog/<path>), or the ARN of an existing AWS Glue connection (:connection/<name>) for a federated AWS data source such as Amazon Redshift or Amazon RDS. The AWS Glue connection must be a unified connection (ConnectionSchemaVersion 2) in your partition and Region that you can read. You can't specifyscopewith an AWS Glue connection ARN. While AWS Glue is still validating the connection, the request fails withConflictException. If its validation failed, the request fails withAccessDeniedException. -
DATABRICKSorSNOWFLAKE- The ARN of an existing AWS Glue connection whose AWS Glue ConnectionType matchestype. AWS Context validates its Credential Broker settings, if present, and doesn't store them.
- Returns:
- The external data source that this connection binds to: its
typeandlocation.arn. The ARN must be in your account, except forGLUE_DATA_CATALOG, where it can name a catalog or an AWS Glue connection in another account.-
GLUE_DATA_CATALOG- An AWS Glue Data Catalog ARN (:catalogor:catalog/<path>), or the ARN of an existing AWS Glue connection (:connection/<name>) for a federated AWS data source such as Amazon Redshift or Amazon RDS. The AWS Glue connection must be a unified connection (ConnectionSchemaVersion 2) in your partition and Region that you can read. You can't specifyscopewith an AWS Glue connection ARN. While AWS Glue is still validating the connection, the request fails withConflictException. If its validation failed, the request fails withAccessDeniedException. -
DATABRICKSorSNOWFLAKE- The ARN of an existing AWS Glue connection whose AWS Glue ConnectionType matchestype. AWS Context validates its Credential Broker settings, if present, and doesn't store them.
-
-
-
scope
Optional hierarchical subset of the data source to ingest. Absent means the whole source. A DATABRICKS scope names at most one
databricksCatalog, and a SNOWFLAKE scope onesnowflakeDatabase. A GLUE_DATA_CATALOG scope can select by service with aglueServicesegment (seeDataSourceScope). An unknown service name, a repeated or misplacedglueServicesegment, a later level of another service, orglueServiceon another connection type returns ValidationException.- Returns:
- Optional hierarchical subset of the data source to ingest. Absent means the whole source. A DATABRICKS
scope names at most one
databricksCatalog, and a SNOWFLAKE scope onesnowflakeDatabase. A GLUE_DATA_CATALOG scope can select by service with aglueServicesegment (seeDataSourceScope). An unknown service name, a repeated or misplacedglueServicesegment, a later level of another service, orglueServiceon another connection type returns ValidationException.
-
accessConfig
The access configuration for the data source, which names the AWS Identity and Access Management (IAM) role for data access. Optional.
For
GLUE_DATA_CATALOGandBEDROCK_KNOWLEDGE_BASE,iamRoleis the IAM role that AWS Context assumes to read the source and the AWS Glue connections inglueConnectionMappings. If you omitaccessConfigor set no variant, AWS Context reads them with your own credentials. This applies whether the source is in your account or another account. For a source in another account, AWS Context checks when it creates the connection thatiamRolecan read the source, and the request fails if it can't. A source in another account with noiamRoleisn't checked when the connection is created. AnaccessConfigwith no variant is stored as absent and is not returned on the connection.For
DATABRICKSandSNOWFLAKE, AWS Glue reads the source with theROLE_ARNof the AWS Glue connection indataSource, not withaccessConfig. For these types,accessConfigis reserved for other roles.- Returns:
- The access configuration for the data source, which names the AWS Identity and Access Management (IAM)
role for data access. Optional.
For
GLUE_DATA_CATALOGandBEDROCK_KNOWLEDGE_BASE,iamRoleis the IAM role that AWS Context assumes to read the source and the AWS Glue connections inglueConnectionMappings. If you omitaccessConfigor set no variant, AWS Context reads them with your own credentials. This applies whether the source is in your account or another account. For a source in another account, AWS Context checks when it creates the connection thatiamRolecan read the source, and the request fails if it can't. A source in another account with noiamRoleisn't checked when the connection is created. AnaccessConfigwith no variant is stored as absent and is not returned on the connection.For
DATABRICKSandSNOWFLAKE, AWS Glue reads the source with theROLE_ARNof the AWS Glue connection indataSource, not withaccessConfig. For these types,accessConfigis reserved for other roles.
-
syncSchedule
How often AWS Context re-syncs a
DATABRICKSorSNOWFLAKEsource. If you omit it, the default isDAILY. Not accepted forGLUE_DATA_CATALOGandBEDROCK_KNOWLEDGE_BASEconnections. You can change it with UpdateConnection.- Returns:
- How often AWS Context re-syncs a
DATABRICKSorSNOWFLAKEsource. If you omit it, the default isDAILY. Not accepted forGLUE_DATA_CATALOGandBEDROCK_KNOWLEDGE_BASEconnections. You can change it with UpdateConnection.
-
ingestionConfig
The ingestion configuration: the IAM role that a data producer (AWS Glue Data Catalog or Amazon Bedrock knowledge base) assumes to push data into this connection's agent contexts. It is separate from
accessConfig, which names the role that AWS Context assumes to read the source. Required, because a connection can't ingest data without a role that its data producer can assume. You must haveiam:PassRolepermission to pass this role to the data producer, and the role must be in your account.- Returns:
- The ingestion configuration: the IAM role that a data producer (AWS Glue Data Catalog or Amazon Bedrock
knowledge base) assumes to push data into this connection's agent contexts. It is separate from
accessConfig, which names the role that AWS Context assumes to read the source. Required, because a connection can't ingest data without a role that its data producer can assume. You must haveiam:PassRolepermission to pass this role to the data producer, and the role must be in your account.
-
hasGlueConnectionMappings
public final boolean hasGlueConnectionMappings()For responses, this returns true if the service returned a value for the GlueConnectionMappings property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
glueConnectionMappings
The AWS Glue connection to use for each
redshiftNamespace, eachrdsInstanceandrdsDatabasepair, or eachsnowflakeDatabaseinscope, keyed bypath. Optional. You can specify 0–20 entries. The following rules apply:-
Once an entry names a level, every resource of that level in
scopeneeds an entry. While an entry namesrdsInstance, every selector that names anrdsInstancemust also name itsrdsDatabase. -
redshiftNamespaceandrdsInstanceentries requiredataSourceto be an AWS Glue Data Catalog ARN.accessConfig.iamRoleis optional. -
snowflakeDatabaseentries requiredataSourceto be an AWS Glue connection ARN. -
While any entry is present,
scopecannot contain a selector that names only a catalog or aglueService, because such a selector covers every resource of the catalog or service. Otherwise, a selector with aglueServicesegment follows these rules as it would without that segment. An entry'spathnever namesglueService. -
A selector that names only
glueServiceREDSHIFTorRDS, with no namespace or instance, cannot be combined with any entry. Such a connection reads only the service's metadata, and you cannot query its data.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasGlueConnectionMappings()method.- Returns:
- The AWS Glue connection to use for each
redshiftNamespace, eachrdsInstanceandrdsDatabasepair, or eachsnowflakeDatabaseinscope, keyed bypath. Optional. You can specify 0–20 entries. The following rules apply:-
Once an entry names a level, every resource of that level in
scopeneeds an entry. While an entry namesrdsInstance, every selector that names anrdsInstancemust also name itsrdsDatabase. -
redshiftNamespaceandrdsInstanceentries requiredataSourceto be an AWS Glue Data Catalog ARN.accessConfig.iamRoleis optional. -
snowflakeDatabaseentries requiredataSourceto be an AWS Glue connection ARN. -
While any entry is present,
scopecannot contain a selector that names only a catalog or aglueService, because such a selector covers every resource of the catalog or service. Otherwise, a selector with aglueServicesegment follows these rules as it would without that segment. An entry'spathnever namesglueService. -
A selector that names only
glueServiceREDSHIFTorRDS, with no namespace or instance, cannot be combined with any entry. Such a connection reads only the service's metadata, and you cannot query its data.
-
-
-
publish
Specifies whether to configure catalog synchronization and wait for it to be provisioned during this call. If you omit it, the default is
true. For aDATABRICKSorSNOWFLAKEconnection,falsevalidates only the AWS Glue connection. The connection is returned asCREATINGwithsubStatusGLUE_CONNECTION_VALIDATED, and you publish it later by calling UpdateConnection withpublishset totrue. Ignored forGLUE_DATA_CATALOGandBEDROCK_KNOWLEDGE_BASEconnections, which have no sync job.- Returns:
- Specifies whether to configure catalog synchronization and wait for it to be provisioned during this
call. If you omit it, the default is
true. For aDATABRICKSorSNOWFLAKEconnection,falsevalidates only the AWS Glue connection. The connection is returned asCREATINGwithsubStatusGLUE_CONNECTION_VALIDATED, and you publish it later by calling UpdateConnection withpublishset totrue. Ignored forGLUE_DATA_CATALOGandBEDROCK_KNOWLEDGE_BASEconnections, which have no sync job.
-
hasAcknowledgements
public final boolean hasAcknowledgements()For responses, this returns true if the service returned a value for the Acknowledgements property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
acknowledgements
The conditions that you acknowledge AWS Context can't honor. Specify
CUSTOMER_MANAGED_KEYwhen the knowledge base is encrypted with an AWS KMS customer managed key and you accept that AWS Context stores the ingested data under AWS owned keys. If you omit it, creating a connection to such a knowledge base fails withValidationException. An unknown or repeated value also fails withValidationException.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAcknowledgements()method.- Returns:
- The conditions that you acknowledge AWS Context can't honor. Specify
CUSTOMER_MANAGED_KEYwhen the knowledge base is encrypted with an AWS KMS customer managed key and you accept that AWS Context stores the ingested data under AWS owned keys. If you omit it, creating a connection to such a knowledge base fails withValidationException. An unknown or repeated value also fails withValidationException.
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
tags
Tags to add to the connection when you create it: up to 200 in the request, of which at most 50 can be user tags. Keys can't start with
aws:. To add tags, you also needcontext:TagResourcepermission on the new connection. If you specify more than 50 user tags, the request fails withServiceQuotaExceededException, as on TagResource. If an AWS Organizations tag policy refuses a tag, the request fails withValidationException.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()method.- Returns:
- Tags to add to the connection when you create it: up to 200 in the request, of which at most 50 can be
user tags. Keys can't start with
aws:. To add tags, you also needcontext:TagResourcepermission on the new connection. If you specify more than 50 user tags, the request fails withServiceQuotaExceededException, as on TagResource. If an AWS Organizations tag policy refuses a tag, the request fails withValidationException.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<CreateConnectionRequest.Builder,CreateConnectionRequest> - Specified by:
toBuilderin classContextRequest- Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode()- Overrides:
hashCodein classAwsRequest
-
equals
- Overrides:
equalsin classAwsRequest
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
Description copied from class:SdkRequestUsed to retrieve the value of a field from any class that extendsSdkRequest. The field name specified should match the member name from the corresponding service-2.json model specified in the codegen-resources folder for a given service. The class specifies what class to cast the returned value to. If the returned value is also a modeled class, theSdkRequest.getValueForField(String, Class)method will again be available.- Overrides:
getValueForFieldin classSdkRequest- Parameters:
fieldName- The name of the member to be retrieved.clazz- The class to cast the returned object to.- Returns:
- Optional containing the casted return value
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-