[ aws . context ]

get-agent-context

Description

Returns an agent context’s configuration and status.

See also: AWS API Documentation

Synopsis

  get-agent-context
--agent-context-id <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
[--help]

Options

--agent-context-id (string) [required]

The agent context to return, by its ID or ARN.

Constraints:

  • min: 1
  • max: 180
  • pattern: (arn:(aws|aws-cn|aws-us-gov):context:[a-z0-9\-]{1,32}:\d{12}:agent-context/)?[a-z0-9]+(-[a-z0-9]+)*

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

Global Options

--debug (boolean)

Turn on debug logging.

--endpoint-url (string)

Override command’s default URL with the given URL.

--no-verify-ssl (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

--no-paginate (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

--output (string)

The formatting style for command output.

  • json
  • text
  • table
  • yaml
  • yaml-stream
  • off

--query (string)

A JMESPath query to use in filtering the response data.

--profile (string)

Use a specific profile from your credential file.

--region (string)

The region to use. Overrides config/env settings.

--version (string)

Display the version of this tool.

--color (string)

Turn on/off color output.

  • on
  • off
  • auto

--no-sign-request (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

--ca-bundle (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

--cli-read-timeout (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

--cli-connect-timeout (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

--cli-binary-format (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.

  • base64
  • raw-in-base64-out

--no-cli-pager (boolean)

Disable cli pager for output.

--cli-auto-prompt (boolean)

Automatically prompt for CLI input parameters.

--no-cli-auto-prompt (boolean)

Disable automatically prompt for CLI input parameters.

--cli-error-format (string)

The formatting style for error output. By default, errors are displayed in enhanced format.

  • legacy
  • json
  • yaml
  • text
  • table
  • enhanced

--help (boolean)

Display help for the command/subcommand.

Output

id -> (string)

The agent context’s opaque ID.

Constraints:

  • min: 1
  • max: 64
  • pattern: [a-z0-9]+(-[a-z0-9]+)*

arn -> (string)

The ARN of the agent context, in the form arn:<partition>:context:<region>:<account-id>:agent-context/<id> .

Constraints:

  • min: 1
  • max: 180
  • pattern: arn:(aws|aws-cn|aws-us-gov):context:[a-z0-9\-]{1,32}:\d{12}:agent-context/[a-z0-9]+(-[a-z0-9]+)*

name -> (string)

The name of the agent context. If you didn’t specify a name when you created it, the name is default .

Constraints:

  • min: 3
  • max: 63
  • pattern: [a-zA-Z][a-zA-Z0-9-]*

description -> (string)

A human-readable description, if one was set.

Constraints:

  • min: 0
  • max: 1024
  • pattern: \P{Cc}*

status -> (string)

The agent context’s lifecycle status.

Valid values:

  • CREATING - The agent context is being created.
  • ACTIVE - The agent context is ready to use.
  • UPDATING - The agent context is being updated.
  • DELETING - The agent context is being deleted.
  • FAILED - The agent context failed.

Possible values:

  • CREATING
  • ACTIVE
  • UPDATING
  • DELETING
  • FAILED

createdAt -> (timestamp)

The date and time when the agent context was created.

updatedAt -> (timestamp)

When the resource last changed. Equal to createdAt until the first update.

connectionMappings -> (list)

The agent context’s connection mappings.

Constraints:

  • min: 0
  • max: 20

(structure)

A connection mapping entry on CreateAgentContext and UpdateAgentContext. Each entry binds a connection to one or more ontologies within the agent context, optionally scoped by a data filter, extraction depth, and path segments.

connectionId -> (string) [required]

The connection, by its ID (which starts with conn- ) or its full ARN. Required. AWS Context resolves an ID to an ARN in your account and the current Region.

Constraints:

  • min: 1
  • max: 180
  • pattern: (arn:(aws|aws-cn|aws-us-gov):context:[a-z0-9\-]{1,32}:\d{12}:connection/)?[a-z0-9]+(-[a-z0-9]+)*

ontologyMappings -> (list) [required]

The ontology mappings for this connection mapping. Each entry identifies an ontology that this mapping targets. BEDROCK_KNOWLEDGE_BASE rejects the AWS managed Data ontology. GLUE_DATA_CATALOG rejects the AWS managed Enterprise and Business Process ontologies. AWS Context accepts a new or changed mapping to a customer-owned ontology only on BEDROCK_KNOWLEDGE_BASE . An incompatible mapping, or an ontology that isn’t PUBLISHED , fails with ValidationException .

Constraints:

  • min: 1
  • max: 10

(structure)

A single ontology mapping entry within a ConnectionMapping. Contains the ontology identifier.

ontologyId -> (string) [required]

The ontology that this mapping targets, by its ID or ARN.

Constraints:

  • min: 1
  • max: 180
  • pattern: (arn:(aws|aws-cn|aws-us-gov):context:[a-z0-9\-]{1,32}:(\d{12})?:ontology/)?[a-z0-9]+(-[a-z0-9]+)*

dataFilter -> (structure)

Optional. The data filter for this connection mapping. A document matches if it matches any filter in the list. Within a filter, all conditions must match. If you omit it, every document matches.

filters -> (list)

The filters. An asset matches if it matches at least one filter in the list. If the list is absent or empty, every asset matches.

Constraints:

  • min: 0
  • max: 10

(structure)

A filter that selects documents in a connection mapping. All members are optional, and a document must match every condition in the filter. When a mapping has more than one filter, a document that matches any of them is selected. updatedAfter , includeTags , and excludeTags apply to all connection types. createdAfter applies only to BEDROCK_KNOWLEDGE_BASE connections; for other connection types it doesn’t exclude any document. fileType and maxDocumentSizeBytes apply only to BEDROCK_KNOWLEDGE_BASE connections, and specifying either for another connection type fails with ValidationException . You can’t specify both includeTags and excludeTags in one filter.

fileType -> (string)

The file type to match, for example PDF or DOCX. Applies only to BEDROCK_KNOWLEDGE_BASE connections.

Constraints:

  • min: 1
  • max: 64
  • pattern: [A-Z][A-Z0-9_]*

excludeTags -> (list)

The tags to exclude: 1–25 strings, each 1–256 characters. Applies to all connection types. You can’t specify both excludeTags and includeTags in one filter.

Constraints:

  • min: 1
  • max: 25

(string)

A single tag value within a TagSet.

Constraints:

  • min: 1
  • max: 256

includeTags -> (list)

The tags to include: 1–25 strings, each 1–256 characters. Applies to all connection types. You can’t specify both includeTags and excludeTags in one filter.

Constraints:

  • min: 1
  • max: 25

(string)

A single tag value within a TagSet.

Constraints:

  • min: 1
  • max: 256

updatedAfter -> (timestamp)

Documents updated after this time match. Applies to all connection types.

createdAfter -> (timestamp)

Documents created after this time match. Applies only to BEDROCK_KNOWLEDGE_BASE connections. For other connection types, it doesn’t exclude any document.

maxDocumentSizeBytes -> (long)

The maximum document size, in bytes. Applies only to BEDROCK_KNOWLEDGE_BASE connections. Documents larger than this are filtered out. If you omit it, there is no size limit. Range: 1 to 52,428,800 bytes (50 MiB).

Constraints:

  • min: 1
  • max: 52428800

extractionDepth -> (string)

Optional extraction depth override for BEDROCK_KNOWLEDGE_BASE connections.

Constraints:

  • min: 1
  • max: 64
  • pattern: [A-Z][A-Z0-9_]*

pathSegments -> (list)

The path segments that scope ingestion within the data source, 0–100 segments. Optional. An empty list is the same as omitting the field and matches everything. The segments name levels from one branch of the connection type’s level hierarchy. The container levels form a contiguous prefix of that branch that starts at its root, and a link can also name the table level. AWS Context rejects a link that mixes branches. The branches are the following:

  • GLUE_DATA_CATALOG - The native branch (glueDatabase, glueTable ) and one branch for each federated AWS data source: redshiftNamespace, redshiftDatabase, redshiftSchema, redshiftTable , rdsInstance, rdsDatabase, rdsSchema, rdsTable , s3TableBucket, s3Namespace, s3Table , and sagemakerModelGroup .
  • SNOWFLAKE - snowflakeDatabase, snowflakeSchema, snowflakeTable .
  • DATABRICKS - databricksCatalog, databricksSchema, databricksTable .

The connection holds the source’s identity, such as the account locator or metastore ID, so it isn’t a segment. AWS Context matches IDs as opaque strings against the source’s coordinate values.

Constraints:

  • min: 0
  • max: 100

(structure)

One segment of a resource hierarchy path: the hierarchy level , such as database or table , and the id of the resource at that level. Both are required.

In a GLUE_DATA_CATALOG connection’s scope, the level glueService names a service instead of a resource. Its id is one of the following:

  • GLUE - AWS Glue databases and tables.
  • SAGEMAKER_AI - Amazon SageMaker AI resources.
  • REDSHIFT - Amazon Redshift resources.
  • RDS - Amazon RDS resources.
  • MSK - Amazon Managed Streaming for Apache Kafka (Amazon MSK) resources.
  • KINESIS - Amazon Kinesis Data Streams resources.
  • FIREHOSE - Amazon Data Firehose resources.
  • DYNAMODB - Amazon DynamoDB resources.
  • KEYSPACES - Amazon Keyspaces (for Apache Cassandra) resources.
  • ELASTICACHE - Amazon ElastiCache resources.
  • OPENSEARCH - Amazon OpenSearch Service resources.
  • NEPTUNE - Amazon Neptune resources.
  • TIMESTREAM - Amazon Timestream resources.
  • ATHENA - Amazon Athena resources.
  • GLUE_SCHEMA_REGISTRY - AWS Glue Schema Registry resources.
  • S3 - Amazon S3 resources.
  • S3_VECTORS - Amazon S3 Vectors resources.

Every later segment of the selector must name a level of that service. Any other value, a second glueService segment, or a glueService segment in any other position returns ValidationException . A resource path never contains glueService .

level -> (string) [required]

The hierarchy level name for this segment (for example, “database”, “table”). Non-blank, no whitespace.

Constraints:

  • min: 1
  • max: 1024
  • pattern: [^\s`]+

id -> (string) [required]

The ID of the resource at this level. Non-blank. Can contain spaces, backticks, and % (it is a resource name), but no control characters. AWS Context matches it exactly.

Constraints:

  • min: 1
  • max: 1024
  • pattern: [^\p{Cc}\p{Zl}\p{Zp}]+

type -> (string)

The connection’s data source type. AWS Context sets it from the referenced connection’s data source type when you create or update the mapping. Read-only.

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.

Possible values:

  • GLUE_DATA_CATALOG
  • BEDROCK_KNOWLEDGE_BASE
  • DATABRICKS
  • SNOWFLAKE

encryptionConfig -> (structure)

The agent context’s encryption settings.

encryptionMode -> (string) [required]

How the agent context’s stored data is encrypted. Always present on the resource.

Valid values:

  • AWS_OWNED - Encrypted with an AWS owned key.
  • CUSTOMER_MANAGED - Encrypted with the AWS KMS customer managed key that keyArn specifies.

Possible values:

  • AWS_OWNED
  • CUSTOMER_MANAGED

keyArn -> (string)

The ARN of the AWS KMS customer managed key that encrypts the agent context when encryptionMode is CUSTOMER_MANAGED . Absent for AWS_OWNED .

Constraints:

  • min: 1
  • max: 2048
  • pattern: arn:(aws|aws-cn|aws-us-gov):.*

traceAnalysisConfig -> (structure)

The agent context’s trace analysis settings.

status -> (string)

Specifies whether you allow AWS Context to use traceAnalysisRole to analyze this agent context’s agent traces, and to capture its own agents’ traces as includeContextAgentTraces specifies. Defaults to ENABLED when you set traceAnalysisConfig on CreateAgentContext. Setting it to ENABLED requires traceAnalysisRole . Setting it to DISABLED removes the role. An agent context that has never set it reads ENABLED when it has a traceAnalysisRole , and DISABLED otherwise.

Possible values:

  • ENABLED
  • DISABLED

traceAnalysisRole -> (string)

The IAM role that AWS Context assumes to access the agent context’s connected source data when it analyzes agent traces. The role must be in the same account as the agent context. Its trust policy must allow the AWS Context service principal, with aws:SourceArn set to the agent context’s ARN and aws:SourceAccount set to its account. You must have iam:PassRole permission on the role to pass it to AWS Context. Otherwise, the request fails with AccessDeniedException . Required to set status to ENABLED . You can’t set it while status is DISABLED .

Constraints:

  • min: 20
  • max: 1011
  • pattern: arn:(aws|aws-cn|aws-us-gov):iam::[0-9]{12}:role/(?:[a-zA-Z0-9+=,.@_-]{1,512}/)*[a-zA-Z0-9+=,.@_-]{1,64}

includeContextAgentTraces -> (string)

Specifies whether trace analysis includes traces from the agents built into AWS Context, such as the retrieval agent. Uses traceAnalysisRole and takes effect only while status is ENABLED . An agent context that has never set it reads ENABLED .

Possible values:

  • ENABLED
  • DISABLED

workforceSignInConfig -> (structure)

How your employees sign in to this agent context’s MCP server through your identity provider (workforce sign-in). status reads ENABLED while a sign-in URL is stored, DISABLED otherwise.

status -> (string)

Whether workforce sign-in is on. Reads ENABLED while a signInUrl is stored, DISABLED otherwise. On Create, a config with a signInUrl defaults to ENABLED. On Update, DISABLED removes the stored signInUrl . ENABLED requires a signInUrl , supplied in the same request or already stored on the resource.

Possible values:

  • ENABLED
  • DISABLED

signInUrl -> (string)

The URL that starts a sign-in to your AWS application at the identity provider. For example, an Okta application link, a Microsoft Entra My Apps link, or an IAM Identity Center access portal URL. HTTPS only, a single line with no whitespace, 9 to 2048 characters. Sent alone, it replaces the stored URL and turns sign-in ENABLED. It cannot be sent together with status DISABLED in the same request.

Constraints:

  • min: 9
  • max: 2048
  • pattern: https://[^\s\p{Cc}\p{Z}\p{Cf}]+

entityResolutionConfig -> (structure)

The agent context’s entity resolution settings. Populated on every response path that returns the resource.

status -> (string)

Specifies whether entity resolution and AWS Glue Data Catalog grounding run. A resource that has never set it reads ENABLED. DISABLED stops new runs. A run already started finishes its current step, and a grounding pass that spans several steps stops at the next one.

Possible values:

  • ENABLED
  • DISABLED

mcpServerUrl -> (string)

The Model Context Protocol (MCP) server URL to give your employees while workforce sign-in is ENABLED . The URL is the agent context’s MCP endpoint, with workforceSignInConfig.signInUrl as its login_hint query parameter and the ID that AWS Context assigns to that sign-in URL as its tenantId query parameter. Absent while workforce sign-in is DISABLED .

Constraints:

  • min: 1
  • max: 4096

trustedIdentitySources -> (list)

Identity sources this agent context trusts in addition to its owner’s account. Absent or empty: only the owner’s account is trusted.

Constraints:

  • min: 0
  • max: 100

(tagged union structure)

An identity source to trust. Set exactly one member. An ARN of any other resource type is a ValidationException.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: identityStoreArn, identityProviderArn.

identityStoreArn -> (string)

An IAM Identity Center identity store ARN, for example arn:aws:identitystore::111122223333:identitystore/d-1234567890 . IAM Identity Center DescribeInstance returns it as IdentityStoreArn .

Constraints:

  • min: 62
  • max: 93
  • pattern: arn:aws(-[a-z]{1,5}){0,3}:identitystore::[0-9]{12}:identitystore/(d-[0-9a-f]{10}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})

identityProviderArn -> (string)

An IAM OIDC or SAML identity provider ARN, for example arn:aws:iam::111122223333:oidc-provider/example.com .

Constraints:

  • min: 41
  • max: 305
  • pattern: arn:aws(-[a-z]{1,5}){0,3}:iam::[0-9]{12}:(oidc-provider/[A-Za-z0-9][A-Za-z0-9._-]*(:[0-9]{1,5})?(/[!-"$->@-~]*)?|saml-provider/[A-Za-z0-9_+=,.@-]{1,128})