AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the AWS Context CreateConnection API operation.

Syntax

New-CTXConnection
-Name <String>
-Acknowledgement <String[]>
-DataSource_Location_Arn <String>
-SyncSchedule_CronExpression <String>
-SyncSchedule_Frequency <SyncFrequency>
-GlueConnectionMapping <GlueConnectionMapping[]>
-Publish <Boolean>
-AccessConfig_IamRole_RoleArn <String>
-IngestionConfig_RoleArn <String>
-Scope_Selector <ResourceSelector[]>
-Tag <Hashtable>
-DataSource_Type <ConnectionType>
-ClientToken <String>
-Select <String>
-Force <SwitchParameter>
-ClientConfig <AmazonContextConfig>

Description

Creates a connection to a data source, such as an AWS Glue Data Catalog, an Amazon Bedrock knowledge base, or a third-party data catalog through an AWS Glue connection. GetConnection returns the connection's status.

Parameters

-AccessConfig_IamRole_RoleArn <String>
The IAM role that AWS Context assumes to read this connection's data source. The role must be in your account. AWS Context rejects a role in another account. It has the same format as ingestionConfig.roleArn. You must have iam:PassRole permission on the role to pass it to AWS Context. Otherwise, CreateConnection and UpdateConnection fail with AccessDeniedException.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Acknowledgement <String[]>
The conditions that you acknowledge AWS Context can't honor. Specify CUSTOMER_MANAGED_KEY when 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 with ValidationException. An unknown or repeated value also fails with ValidationException. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAcknowledgements
-ClientConfig <AmazonContextConfig>
Amazon.PowerShell.Cmdlets.CTX.AmazonContextClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ClientToken <String>
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, tags and, once the connection is ACTIVE, publish are not compared with the original request. A create refused for a missing acknowledgement records no token.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-DataSource_Location_Arn <String>
The ARN of the data source. Its account segment must be your account when you create the connection.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-DataSource_Type <ConnectionType>
The kind of data source.Valid values:
  • GLUE_DATA_CATALOG - An AWS Glue Data Catalog, or an AWS Glue connection that fronts a federated AWS data source.
  • BEDROCK_KNOWLEDGE_BASE - An Amazon Bedrock knowledge base.
  • DATABRICKS - A Databricks third-party catalog.
  • SNOWFLAKE - A Snowflake third-party catalog.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-GlueConnectionMapping <GlueConnectionMapping[]>
The AWS Glue connection to use for each redshiftNamespace, each rdsInstance and rdsDatabase pair, or each snowflakeDatabase in scope, keyed by path. Optional. You can specify 0–20 entries. The following rules apply:
  • Once an entry names a level, every resource of that level in scope needs an entry. While an entry names rdsInstance, every selector that names an rdsInstance must also name its rdsDatabase.
  • redshiftNamespace and rdsInstance entries require dataSource to be an AWS Glue Data Catalog ARN. accessConfig.iamRole is optional.
  • snowflakeDatabase entries require dataSource to be an AWS Glue connection ARN.
  • While any entry is present, scope cannot contain a selector that names only a catalog or a glueService, because such a selector covers every resource of the catalog or service. Otherwise, a selector with a glueService segment follows these rules as it would without that segment. An entry's path never names glueService.
  • A selector that names only glueServiceREDSHIFT or RDS, 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.
Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesGlueConnectionMappings
-IngestionConfig_RoleArn <String>
The IAM role in your account that a data producer assumes to push data into this connection's agent contexts. Your account must own the role.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-Name <String>
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.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-Publish <Boolean>
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 a DATABRICKS or SNOWFLAKE connection, false validates only the AWS Glue connection. The connection is returned as CREATING with subStatusGLUE_CONNECTION_VALIDATED, and you publish it later by calling UpdateConnection with publish set to true. Ignored for GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections, which have no sync job.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Scope_Selector <ResourceSelector[]>
The selectors describing which parts of the data source are in scope. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesScope_Selectors
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is '*'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Context.Model.CreateConnectionResponse). Specifying the name of a property of type Amazon.Context.Model.CreateConnectionResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SyncSchedule_CronExpression <String>
Not supported. Catalog synchronization doesn't support cron schedules, so publishing a connection with this member returns ValidationException. Use frequency instead.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SyncSchedule_Frequency <SyncFrequency>
How often catalog synchronization runs. AWS Glue determines the schedule's start time. Valid values:
  • HOURLY - Every 60 minutes.
  • DAILY - Every 1,440 minutes.
  • WEEKLY - Not supported. You can save this value on a connection created with publish set to false, but publishing the connection with this value returns ValidationException.
  • MONTHLY - Not supported. You can save this value on a connection created with publish set to false, but publishing the connection with this value returns ValidationException.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Tag <Hashtable>
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 need context:TagResource permission on the new connection. If you specify more than 50 user tags, the request fails with ServiceQuotaExceededException, as on TagResource. If an AWS Organizations tag policy refuses a tag, the request fails with ValidationException. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.Context.Model.CreateConnectionResponse object containing multiple properties.

Supported Version

AWS Tools for PowerShell: 2.x.y.z