Class: Aws::Context::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Context::Client
- Includes:
- Aws::ClientStubs
- Defined in:
- gems/aws-sdk-context/lib/aws-sdk-context/client.rb
Overview
An API client for Context. To construct a client, you need to configure a :region and :credentials.
client = Aws::Context::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#accept_curation_proposal(params = {}) ⇒ Types::AcceptCurationProposalResponse
Accepts a curation proposal and applies its change to the agent context.
-
#agentic_retrieve(params = {}) ⇒ Types::AgenticRetrieveResponse
Retrieves ranked context from an agent context for a natural-language question, in a single response.
-
#agentic_retrieve_stream(params = {}) ⇒ Types::AgenticRetrieveStreamResponse
Answers a natural-language question against an agent context and streams the work as it happens.
-
#associate_curation_policy(params = {}) ⇒ Types::AssociateCurationPolicyResponse
Associates a curation policy with an agent context.
-
#cancel_ontology_induction(params = {}) ⇒ Types::CancelOntologyInductionResponse
Cancels an ontology induction that is still
INDUCING. -
#cancel_task(params = {}) ⇒ Types::CancelTaskResponse
Cancels a task that is
PENDINGorIN_PROGRESS. -
#create_agent_context(params = {}) ⇒ Types::CreateAgentContextResponse
Creates an agent context over one or more connections.
-
#create_change_set(params = {}) ⇒ Types::CreateChangeSetResponse
Proposes a change to an agent context, as ChangeSetOperation items (the same items that ListChangeSetOperations returns), each setting one of
put,update, ordelete. -
#create_connection(params = {}) ⇒ Types::CreateConnectionResponse
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.
-
#create_curation_policy(params = {}) ⇒ Types::CreateCurationPolicyResponse
Creates a curation policy, which decides which changes to an agent context are held for review as curation proposals instead of applied automatically.
-
#create_curation_policy_version(params = {}) ⇒ Types::CreateCurationPolicyVersionResponse
Publishes a curation policy's working copy as a new, immutable version.
-
#create_ontology(params = {}) ⇒ Types::CreateOntologyResponse
Creates an ontology from an OWL ontology document.
-
#delete_agent_context(params = {}) ⇒ Struct
Deletes an agent context.
-
#delete_connection(params = {}) ⇒ Struct
Deletes a connection.
-
#delete_curation_policy(params = {}) ⇒ Struct
Deletes a curation policy.
-
#delete_ontology(params = {}) ⇒ Struct
Deletes an ontology that you own and all of its versions.
-
#delete_ontology_induction(params = {}) ⇒ Struct
Deletes an ontology induction.
-
#delete_resource_policy(params = {}) ⇒ Struct
Removes the resource-based policy from an agent context.
-
#disassociate_curation_policy(params = {}) ⇒ Struct
Disassociates a curation policy from an agent context, so the agent context stops enforcing it.
-
#execute_sql(params = {}) ⇒ Types::ExecuteSqlResponse
Runs one read-only SQL query over the tables of a connection in an agent context, and returns the result as typed columns and rows.
-
#get_agent_context(params = {}) ⇒ Types::GetAgentContextResponse
Returns an agent context's configuration and status.
-
#get_change_set(params = {}) ⇒ Types::GetChangeSetResponse
Returns one change set's metadata: its
statusand the other fields of the change set, without its operations. -
#get_connection(params = {}) ⇒ Types::GetConnectionResponse
Returns a connection's configuration and status.
-
#get_curation_policy(params = {}) ⇒ Types::GetCurationPolicyResponse
Returns a curation policy's configuration, status, and policy document.
-
#get_curation_proposal(params = {}) ⇒ Types::GetCurationProposalResponse
Returns a curation proposal and a summary of the change that it holds for review.
-
#get_ontology(params = {}) ⇒ Types::GetOntologyResponse
Returns an ontology's status and one of its versions.
-
#get_ontology_induction(params = {}) ⇒ Types::GetOntologyInductionResponse
Returns an ontology induction's status, and, once it is a draft, the ontology it created.
-
#get_resource_policy(params = {}) ⇒ Types::GetResourcePolicyResponse
Returns the resource-based policy attached to an agent context, with its revision ID.
-
#get_task(params = {}) ⇒ Types::GetTaskResponse
Returns a task's configuration, status, and results.
-
#list_agent_contexts(params = {}) ⇒ Types::ListAgentContextsResponse
Lists the agent contexts in your account.
-
#list_change_set_operations(params = {}) ⇒ Types::ListChangeSetOperationsResponse
Returns what one change set wrote: every operation it holds (the nodes and relationships it adds, updates, or deletes), one page at a time, in order.
-
#list_change_sets(params = {}) ⇒ Types::ListChangeSetsResponse
Lists an agent context's change sets that have the specified
status, newest first. -
#list_connections(params = {}) ⇒ Types::ListConnectionsResponse
Lists the connections in your account, most recently updated first.
-
#list_curation_policies(params = {}) ⇒ Types::ListCurationPoliciesResponse
Lists the curation policies in your account, or the ones associated with an agent context.
-
#list_curation_proposals(params = {}) ⇒ Types::ListCurationProposalsResponse
Lists an agent context's curation proposals, newest first.
-
#list_ontologies(params = {}) ⇒ Types::ListOntologiesResponse
Lists the ontologies in your account, with the status of each.
-
#list_ontology_inductions(params = {}) ⇒ Types::ListOntologyInductionsResponse
Lists the ontology inductions in your account.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns the tags on an agent context, connection, curation policy, customer-owned ontology, or ontology induction.
-
#list_tasks(params = {}) ⇒ Types::ListTasksResponse
Lists an agent context's tasks, newest first.
-
#put_resource_policy(params = {}) ⇒ Types::PutResourcePolicyResponse
Attaches a resource-based policy to an agent context, or replaces the one it has.
-
#put_trace(params = {}) ⇒ Types::PutTraceResponse
Submits an agent's execution traces so that AWS Context can extract reusable knowledge and skills from them.
-
#reject_curation_proposal(params = {}) ⇒ Types::RejectCurationProposalResponse
Rejects a curation proposal.
-
#search_agent_context(params = {}) ⇒ Types::SearchAgentContextResponse
Searches an agent context for entities matching a query.
-
#start_ontology_induction(params = {}) ⇒ Types::StartOntologyInductionResponse
Starts an ontology induction, which induces a draft ontology from the documents that you provide.
-
#start_task(params = {}) ⇒ Types::StartTaskResponse
Starts a task that imports a data dictionary, verified queries, or ontologies into an agent context.
-
#tag_resource(params = {}) ⇒ Struct
Adds tags to an agent context, connection, curation policy, customer-owned ontology, or ontology induction.
-
#traverse_agent_context(params = {}) ⇒ Types::TraverseAgentContextResponse
Returns the neighbors of a seed node in an agent context, each with its properties, hop distance, and the edges that connect it to the seed.
-
#untag_resource(params = {}) ⇒ Struct
Removes tags from an agent context, connection, curation policy, customer-owned ontology, or ontology induction.
-
#update_agent_context(params = {}) ⇒ Types::UpdateAgentContextResponse
Updates an agent context's configuration.
-
#update_change_set(params = {}) ⇒ Types::UpdateChangeSetResponse
Drops operations from a change set that is held for curator review.
-
#update_connection(params = {}) ⇒ Types::UpdateConnectionResponse
Updates a connection's configuration.
-
#update_curation_policy(params = {}) ⇒ Types::UpdateCurationPolicyResponse
Updates a curation policy's working copy.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from Aws::ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
Parameters:
- options (Hash)
Options Hash (options):
-
:plugins
(Array<Seahorse::Client::Plugin>)
— default:
[]]
—
A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.
-
:credentials
(required, Aws::CredentialProvider)
—
Your AWS credentials used for authentication. This can be any class that includes and implements
Aws::CredentialProvider, or instance of any one of the following classes:Aws::Credentials- Used for configuring static, non-refreshing credentials.Aws::SharedCredentials- Used for loading static credentials from a shared file, such as~/.aws/config.Aws::AssumeRoleCredentials- Used when you need to assume a role.Aws::AssumeRoleWebIdentityCredentials- Used when you need to assume a role after providing credentials via the web.Aws::SSOCredentials- Used for loading credentials from AWS SSO using an access token generated fromaws login.Aws::ProcessCredentials- Used for loading credentials from a process that outputs to stdout.Aws::InstanceProfileCredentials- Used for loading credentials from an EC2 IMDS on an EC2 instance.Aws::ECSCredentials- Used for loading credentials from instances running in ECS.Aws::CognitoIdentityCredentials- Used for loading credentials from the Cognito Identity service.
When
:credentialsare not configured directly, the following locations will be searched for credentials:Aws.config[:credentials]The
:access_key_id,:secret_access_key,:session_token, and:account_idoptions.ENV['AWS_ACCESS_KEY_ID'],ENV['AWS_SECRET_ACCESS_KEY'],ENV['AWS_SESSION_TOKEN'], andENV['AWS_ACCOUNT_ID'].~/.aws/credentials~/.aws/configEC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of
Aws::InstanceProfileCredentialsorAws::ECSCredentialsto enable retries and extended timeouts. Instance profile credential fetching can be disabled by settingENV['AWS_EC2_METADATA_DISABLED']totrue.
-
:region
(required, String)
—
The AWS region to connect to. The configured
:regionis used to determine the service:endpoint. When not passed, a default:regionis searched for in the following locations:Aws.config[:region]ENV['AWS_REGION']ENV['AMAZON_REGION']ENV['AWS_DEFAULT_REGION']~/.aws/credentials~/.aws/config
- :access_key_id (String)
- :account_id (String)
-
:active_endpoint_cache
(Boolean)
— default:
false
—
When set to
true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults tofalse. -
:adaptive_retry_wait_to_fill
(Boolean)
— default:
true
—
Used only in
adaptiveretry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise aRetryCapacityNotAvailableErrorand will not retry instead of sleeping. -
:auth_scheme_preference
(Array<String>)
—
A list of preferred authentication schemes to use when making a request. Supported values are:
sigv4,sigv4a,httpBearerAuth, andnoAuth. When set usingENV['AWS_AUTH_SCHEME_PREFERENCE']or in shared config asauth_scheme_preference, the value should be a comma-separated list. -
:client_side_monitoring
(Boolean)
— default:
false
—
When
true, client-side metrics will be collected for all API requests from this client. -
:client_side_monitoring_client_id
(String)
— default:
""
—
Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.
-
:client_side_monitoring_host
(String)
— default:
"127.0.0.1"
—
Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.
-
:client_side_monitoring_port
(Integer)
— default:
31000
—
Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.
-
:client_side_monitoring_publisher
(Aws::ClientSideMonitoring::Publisher)
— default:
Aws::ClientSideMonitoring::Publisher
—
Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.
-
:convert_params
(Boolean)
— default:
true
—
When
true, an attempt is made to coerce request parameters into the required types. -
:correct_clock_skew
(Boolean)
— default:
true
—
Used only in
standardandadaptiveretry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks. Takes effect only whendisable_clock_skew_correctionis not set. -
:defaults_mode
(String)
— default:
"legacy"
—
See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.
-
:disable_clock_skew_correction
(Boolean)
—
Used only in
standardandadaptiveretry modes. Whentrue, the SDK does not apply a clock skew correction, does not update its stored skew from responses, and does not retry clock skew errors. Clock skew correction is enabled by default. -
:disable_host_prefix_injection
(Boolean)
— default:
false
—
When
true, the SDK will not prepend the modeled host prefix to the endpoint. -
:disable_request_compression
(Boolean)
— default:
false
—
When set to 'true' the request body will not be compressed for supported operations.
-
:endpoint
(String, URI::HTTPS, URI::HTTP)
—
Normally you should not configure the
:endpointoption directly. This is normally constructed from the:regionoption. Configuring:endpointis normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:'http://example.com' 'https://example.com' 'http://example.com:123' -
:endpoint_cache_max_entries
(Integer)
— default:
1000
—
Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.
-
:endpoint_cache_max_threads
(Integer)
— default:
10
—
Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
-
:endpoint_cache_poll_interval
(Integer)
— default:
60
—
When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.
-
:endpoint_discovery
(Boolean)
— default:
false
—
When set to
true, endpoint discovery will be enabled for operations when available. -
:event_stream_handler
(Proc)
—
When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
-
:ignore_configured_endpoint_urls
(Boolean)
—
Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.
-
:input_event_stream_handler
(Proc)
—
When an EventStream or Proc object is provided, it can be used for sending events for the event stream.
-
:log_formatter
(Aws::Log::Formatter)
— default:
Aws::Log::Formatter.default
—
The log formatter.
-
:log_level
(Symbol)
— default:
:info
—
The log level to send messages to the
:loggerat. -
:logger
(Logger)
—
The Logger instance to send log messages to. If this option is not set, logging will be disabled.
-
:max_attempts
(Integer)
— default:
3
—
An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in
standardandadaptiveretry modes. Defaults to 3, except for DynamoDB and DynamoDB Streams, which default to 4. -
:output_event_stream_handler
(Proc)
—
When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
-
:profile
(String)
— default:
"default"
—
Used when loading credentials from the shared credentials file at
HOME/.aws/credentials. When not specified, 'default' is used. -
:request_checksum_calculation
(String)
— default:
"when_supported"
—
Determines when a checksum will be calculated for request payloads. Values are:
when_supported- (default) When set, a checksum will be calculated for all request payloads of operations modeled with thehttpChecksumtrait whererequestChecksumRequiredistrueand/or arequestAlgorithmMemberis modeled.when_required- When set, a checksum will only be calculated for request payloads of operations modeled with thehttpChecksumtrait whererequestChecksumRequiredistrueor where arequestAlgorithmMemberis modeled and supplied.
-
:request_min_compression_size_bytes
(Integer)
— default:
10240
—
The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.
-
:response_checksum_validation
(String)
— default:
"when_supported"
—
Determines when checksum validation will be performed on response payloads. Values are:
when_supported- (default) When set, checksum validation is performed on all response payloads of operations modeled with thehttpChecksumtrait whereresponseAlgorithmsis modeled, except when no modeled checksum algorithms are supported.when_required- When set, checksum validation is not performed on response payloads of operations unless the checksum algorithm is supported and therequestValidationModeMembermember is set toENABLED.
-
:retry_backoff
(Proc)
—
A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the
legacyretry mode. -
:retry_base_delay
(Float)
— default:
0.3
—
The base delay in seconds used by the default backoff function. This option is only used in the
legacyretry mode. -
:retry_jitter
(Symbol)
— default:
:none
—
A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the
legacyretry mode.@see https://www.awsarchitectureblog.com/2015/03/backoff.html
-
:retry_limit
(Integer)
— default:
3
—
The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the
legacyretry mode. -
:retry_max_delay
(Integer)
— default:
0
—
The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the
legacyretry mode. -
:retry_mode
(String)
— default:
"standard"
—
Specifies which retry algorithm to use. Values are:
legacy- The pre-existing retry behavior.standard- A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make. This is the default value if no retry mode is provided.adaptive- A retry mode that includes all the functionality ofstandardmode along with automatic client side throttling.
-
:sdk_ua_app_id
(String)
—
A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
- :secret_access_key (String)
- :session_token (String)
-
:sigv4a_signing_region_set
(Array)
—
A list of regions that should be signed with SigV4a signing. When not passed, a default
:sigv4a_signing_region_setis searched for in the following locations:Aws.config[:sigv4a_signing_region_set]ENV['AWS_SIGV4A_SIGNING_REGION_SET']~/.aws/config
-
:stub_responses
(Boolean)
— default:
false
—
Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling Aws::ClientStubs#stub_responses. See Aws::ClientStubs for more information.
Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.
-
:telemetry_provider
(Aws::Telemetry::TelemetryProviderBase)
— default:
Aws::Telemetry::NoOpTelemetryProvider
—
Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses
NoOpTelemetryProviderwhich will not record or emit any telemetry data. The SDK supports the following telemetry providers:- OpenTelemetry (OTel) - To use the OTel provider, install and require the
opentelemetry-sdkgem and then, pass in an instance of aAws::Telemetry::OTelProviderfor telemetry provider.
- OpenTelemetry (OTel) - To use the OTel provider, install and require the
-
:token_provider
(Aws::TokenProvider)
—
Your Bearer token used for authentication. This can be any class that includes and implements
Aws::TokenProvider, or instance of any one of the following classes:Aws::StaticTokenProvider- Used for configuring static, non-refreshing tokens.Aws::SSOTokenProvider- Used for loading tokens from AWS SSO using an access token generated fromaws login.
When
:token_provideris not configured directly, theAws::TokenProviderChainwill be used to search for tokens configured for your profile in shared configuration files. -
:use_dualstack_endpoint
(Boolean)
—
When set to
true, dualstack enabled endpoints (with.awsTLD) will be used if available. -
:use_fips_endpoint
(Boolean)
—
When set to
true, fips compatible endpoints will be used if available. When afipsregion is used, the region is normalized and this config is set totrue. -
:validate_params
(Boolean)
— default:
true
—
When
true, request parameters are validated before sending the request. -
:endpoint_provider
(Aws::Context::EndpointProvider)
—
The endpoint provider used to resolve endpoints. Any object that responds to
#resolve_endpoint(parameters)whereparametersis a Struct similar toAws::Context::EndpointParameters. -
:http_continue_timeout
(Float)
— default:
1
—
The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to
nilwhich disables this behaviour. This value can safely be set per request on the session. -
:http_idle_timeout
(Float)
— default:
5
—
The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.
-
:http_open_timeout
(Float)
— default:
15
—
The default number of seconds to wait for response data. This value can safely be set per-request on the session.
-
:http_proxy
(URI::HTTP, String)
—
A proxy to send requests through. Formatted like 'http://proxy.com:123'.
-
:http_read_timeout
(Float)
— default:
60
—
The default number of seconds to wait for response data. This value can safely be set per-request on the session.
-
:http_wire_trace
(Boolean)
— default:
false
—
When
true, HTTP debug output will be sent to the:logger. -
:on_chunk_received
(Proc)
—
When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a
content-length). -
:on_chunk_sent
(Proc)
—
When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.
-
:raise_response_errors
(Boolean)
— default:
true
—
When
true, response errors are raised. -
:ssl_ca_bundle
(String)
—
Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass
:ssl_ca_bundleor:ssl_ca_directorythe the system default will be used if available. -
:ssl_ca_directory
(String)
—
Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass
:ssl_ca_bundleor:ssl_ca_directorythe the system default will be used if available. -
:ssl_ca_store
(String)
—
Sets the X509::Store to verify peer certificate.
-
:ssl_cert
(OpenSSL::X509::Certificate)
—
Sets a client certificate when creating http connections.
-
:ssl_key
(OpenSSL::PKey)
—
Sets a client key when creating http connections.
-
:ssl_timeout
(Float)
—
Sets the SSL timeout in seconds
-
:ssl_verify_peer
(Boolean)
— default:
true
—
When
true, SSL peer certificates are verified when establishing a connection.
490 491 492 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 490 def initialize(*args) super end |
Instance Method Details
#accept_curation_proposal(params = {}) ⇒ Types::AcceptCurationProposalResponse
Accepts a curation proposal and applies its change to the agent context.
Examples:
Example: Accept a curation proposal
Example: Accept a curation proposal
# The following example accepts a curation proposal that is waiting for review, using the revisionId from
# GetCurationProposal, so AWS Context applies its change set to the agent context.
resp = client.accept_curation_proposal({
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
client_token: "5e2b8d14-6c3a-4f7e-9b1d-0a4c6e8f2b3d",
curation_proposal_id: "cp-dc0af01d4ca5847e27d63a3e30a0c9c6",
revision_id: "7f3c2a1e-9b4d-4e6f-8a0c-2d5e7b9f1a3c",
})
resp.to_h outputs the following:
{
access_control: "NO_ACL",
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
change_set_id: "cs-8e1f3a5c7b9d4e2f6a0c1b3d5e7f9a2b",
created_at: Time.parse("2026-11-18T14:05:13Z"),
generated_by: "DATA_SOURCE_INGESTION",
id: "cp-dc0af01d4ca5847e27d63a3e30a0c9c6",
revision_id: "a9d1f3b5-7c2e-4a6b-8d0f-3e5a7c9b1d4f",
status: "APPROVED",
title: "Update 'orders' and 2 more entities, and 3 relationships",
triggering_policies: [
{
policy_id: "pol-6b8d0f2a4c1e4b7d9a3c5e7f1b3d5a8c",
},
],
updated_at: Time.parse("2026-11-19T09:30:41Z"),
}
Example: Accept a curation proposal with a stale revision, which fails with ConflictException
Example: Accept a curation proposal with a stale revision, which fails with ConflictException
# The following example fails with a ConflictException because the proposal changed after the caller read it, so the
# revisionId in the request is no longer current.
resp = client.accept_curation_proposal({
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
curation_proposal_id: "cp-dc0af01d4ca5847e27d63a3e30a0c9c6",
revision_id: "0b2d4f6a-8c1e-4b3d-a5f7-9c1e3a5b7d9f",
})
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.accept_curation_proposal({
curation_proposal_id: "CurationProposalId", # required
agent_context_id: "AgentContextIdentifier", # required
revision_id: "CurationProposalRevision", # required
client_token: "ClientToken",
})
Response structure
Response structure
resp.change_set_id #=> String
resp.title #=> String
resp.generated_by #=> String, one of "DATA_SOURCE_EXTRACTION", "DATA_SOURCE_INGESTION", "ENTITY_RESOLUTION", "ONTOLOGY_GROUNDING", "TRACE_ANALYSIS", "IMPORT_DATA_DICTIONARY_TASK", "IMPORT_VERIFIED_QUERIES_TASK", "IMPORT_ONTOLOGY_TASK", "DIRECT_MODIFICATION"
resp.revision_id #=> String
resp.status #=> String, one of "PENDING_REVIEW", "APPROVED", "REJECTED", "SUPERSEDED", "FAILED", "PUBLISHING", "ARCHIVED"
resp.status_reason_code #=> String, one of "REQUEST_EXPIRED", "CONNECTION_REMOVED"
resp.access_control #=> String, one of "ACL_RESTRICTED", "NO_ACL"
resp.agent_context_id #=> String
resp.expires_at #=> Time
resp.created_at #=> Time
resp.updated_at #=> Time
resp.status_reason.code #=> String, one of "REQUEST_EXPIRED", "CONNECTION_REMOVED"
resp.status_reason.message #=> String
resp.id #=> String
resp.triggering_policies #=> Array
resp.triggering_policies[0].policy_id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:curation_proposal_id
(required, String)
—
The ID of the proposal to accept.
-
:agent_context_id
(required, String)
—
The agent context that the proposal belongs to, by its ID or ARN. If the proposal belongs to another agent context, the request fails with
ResourceNotFoundException. -
:revision_id
(required, String)
—
The revisionId the curator observed. A mismatch means a stale view.
-
:client_token
(String)
—
A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry with the same token returns the proposal's current state, and the same token used with another proposal returns a
ValidationException.A suitable default value is auto-generated. You should normally not need to pass this option.**
Returns:
-
(Types::AcceptCurationProposalResponse)
—
Returns a response object which responds to the following methods:
- #change_set_id => String
- #title => String
- #generated_by => String
- #revision_id => String
- #status => String
- #status_reason_code => String
- #access_control => String
- #agent_context_id => String
- #expires_at => Time
- #created_at => Time
- #updated_at => Time
- #status_reason => Types::StatusReason
- #id => String
- #triggering_policies => Array<Types::TriggeringPolicy>
See Also:
611 612 613 614 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 611 def accept_curation_proposal(params = {}, options = {}) req = build_request(:accept_curation_proposal, params) req.send_request(options) end |
#agentic_retrieve(params = {}) ⇒ Types::AgenticRetrieveResponse
Retrieves ranked context from an agent context for a natural-language
question, in a single response. Send the question as a user message in
messages and read the ranked retrievedContext. AWS Context
searches and traverses the agent context for you until it has gathered
enough context or reaches maxIterations. Prefer this over
SearchAgentContext when finding the context needs more than one search
or hop. To stream progress and receive a generated answer, use
AgenticRetrieveStream.
Examples:
Example: Retrieve context for a question about an agent context
Example: Retrieve context for a question about an agent context
# The following example asks which table holds customer orders and returns the retrieved context in a single response.
resp = client.agentic_retrieve({
agent_context_id: "ac-0123456789abcdef0123456789abcdef",
messages: [
{
content: "Which table holds customer order data?",
role: "USER",
},
],
retrieval_configuration: {
max_iterations: 10,
},
session_id: "sales-analytics-chat-0001",
})
resp.to_h outputs the following:
{
retrieved_context: [
{
entity_type: "NODE",
node_id: "glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders",
properties: {
"name" => {
string_value: "orders",
},
"aws:context:connection-arns" => {
string_value: "[\"arn:aws:context:us-east-1:111122223333:connection/conn-0123456789abcdef0123456789abcdef\"]",
},
"createdAt" => {
string_value: "2026-10-14T09:12:41Z",
},
"databaseName" => {
string_value: "sales_analytics",
},
"nodeType" => {
string_value: "AWS::CONTEXT::TABLE",
},
"tableArn" => {
string_value: "arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders",
},
"updatedAt" => {
string_value: "2026-10-14T09:12:41Z",
},
},
summary: "AWS Glue table orders in the sales_analytics database.",
},
],
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.agentic_retrieve({
agent_context_id: "AgentContextIdentifier", # required
messages: [ # required
{
role: "USER", # required, accepts USER, ASSISTANT
content: "MessageContent", # required
},
],
session_id: "SessionId",
analysis_configuration: {
emit_trace: "ENABLED", # accepts ENABLED, DISABLED
},
retrieval_configuration: {
max_iterations: 1,
},
})
Response structure
Response structure
resp.retrieved_context #=> Array
resp.retrieved_context[0].node_id #=> String
resp.retrieved_context[0].edge_id.from #=> String
resp.retrieved_context[0].edge_id.to #=> String
resp.retrieved_context[0].document_id #=> String
resp.retrieved_context[0].entity_type #=> String, one of "NODE", "EDGE", "DOCUMENT"
resp.retrieved_context[0].summary #=> String
resp.retrieved_context[0].content.byte_content #=> String
resp.retrieved_context[0].content.text #=> String
resp.retrieved_context[0].content.mime_type #=> String
resp.retrieved_context[0].properties #=> Hash
resp.retrieved_context[0].properties["MetadataKey"].string_value #=> String
resp.retrieved_context[0].properties["MetadataKey"].int_value #=> Integer
resp.retrieved_context[0].properties["MetadataKey"].long_value #=> Integer
resp.retrieved_context[0].properties["MetadataKey"].bool_value #=> Boolean
resp.retrieved_context[0].properties["MetadataKey"].float_value #=> Float
resp.retrieved_context[0].properties["MetadataKey"].double_value #=> Float
resp.retrieved_context[0].properties["MetadataKey"].string_list_value #=> Array
resp.retrieved_context[0].properties["MetadataKey"].string_list_value[0] #=> String
resp.retrieved_context[0].properties["MetadataKey"].int_list_value #=> Array
resp.retrieved_context[0].properties["MetadataKey"].int_list_value[0] #=> Integer
resp.retrieved_context[0].properties["MetadataKey"].long_list_value #=> Array
resp.retrieved_context[0].properties["MetadataKey"].long_list_value[0] #=> Integer
resp.retrieved_context[0].properties["MetadataKey"].float_list_value #=> Array
resp.retrieved_context[0].properties["MetadataKey"].float_list_value[0] #=> Float
resp.retrieved_context[0].properties["MetadataKey"].double_list_value #=> Array
resp.retrieved_context[0].properties["MetadataKey"].double_list_value[0] #=> Float
resp.retrieved_context[0].properties["MetadataKey"].bool_list_value #=> Array
resp.retrieved_context[0].properties["MetadataKey"].bool_list_value[0] #=> Boolean
resp.answer #=> String
resp.citations #=> Array
resp.citations[0].start_index #=> Integer
resp.citations[0].end_index #=> Integer
resp.citations[0].references #=> Array
resp.citations[0].references[0].node_id #=> String
resp.citations[0].references[0].edge_id.from #=> String
resp.citations[0].references[0].edge_id.to #=> String
resp.citations[0].references[0].document_id #=> String
resp.authorization_required.authorization_url #=> String
resp.authorization_required.message #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context to retrieve from, by its ID or ARN.
-
:messages
(required, Array<Types::Message>)
—
The conversation, as an ordered list of turns. A single-question caller sends one user message. The list carries multi-turn history so a follow-up resolves against earlier turns.
-
:session_id
(String)
—
Optional. A key that you supply to group related calls, for example the turns of one conversation, for trace storage and analysis. Grouping is per account, across agent contexts, so use a value that is unique to each conversation.
-
:analysis_configuration
(Types::AnalysisConfiguration)
—
Optional controls for post-call analysis of the retrieval: whether its trace is stored for analysis.
-
:retrieval_configuration
(Types::RetrievalConfiguration)
—
Optional bounds and configuration for the agent loop.
Returns:
-
(Types::AgenticRetrieveResponse)
—
Returns a response object which responds to the following methods:
- #retrieved_context => Array<Types::RetrievedContext>
- #answer => String
- #citations => Array<Types::Citation>
- #authorization_required => Types::AuthorizationRequired
See Also:
772 773 774 775 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 772 def agentic_retrieve(params = {}, options = {}) req = build_request(:agentic_retrieve, params) req.send_request(options) end |
#agentic_retrieve_stream(params = {}) ⇒ Types::AgenticRetrieveStreamResponse
Answers a natural-language question against an agent context and streams the work as it happens. The response is an event stream that contains progress events while AWS Context searches the agent context, the answer in chunks as it is generated, and a final result. The final result contains the answer and the ranked retrieved context.
Examples:
EventStream Operation Example
EventStream Operation Example
# You can process the event once it arrives immediately, or wait until the
# full response is complete and iterate through the eventstream enumerator.
# To interact with event immediately, you need to register agentic_retrieve_stream
# with callbacks. Callbacks can be registered for specific events or for all
# events, including error events.
# Callbacks can be passed into the `:event_stream_handler` option or within a
# block statement attached to the #agentic_retrieve_stream call directly. Hybrid
# pattern of both is also supported.
# `:event_stream_handler` option takes in either a Proc object or
# Aws::Context::EventStreams::AgenticRetrieveStreamOutput object.
# Usage pattern a): Callbacks with a block attached to #agentic_retrieve_stream
# Example for registering callbacks for all event types and an error event
client.agentic_retrieve_stream(
# params input
) do |stream|
stream.on_error_event do |event|
# catch unmodeled error event in the stream
raise event
# => Aws::Errors::EventError
# event.event_type => :error
# event.error_code => String
# event.error_message => String
end
stream.on_event do |event|
# process all events arrive
puts event.event_type
# ...
end
end
# Usage pattern b): Pass in `:event_stream_handler` for #agentic_retrieve_stream
# 1) Create a Aws::Context::EventStreams::AgenticRetrieveStreamOutput object
# Example for registering callbacks with specific events
handler = Aws::Context::EventStreams::AgenticRetrieveStreamOutput.new
handler.on_trace_event_event do |event|
event # => Aws::Context::Types::traceEvent
end
handler.on_response_event_event do |event|
event # => Aws::Context::Types::responseEvent
end
handler.on_result_event do |event|
event # => Aws::Context::Types::result
end
handler.on_access_denied_exception_event do |event|
event # => Aws::Context::Types::accessDeniedException
end
handler.on_resource_not_found_exception_event do |event|
event # => Aws::Context::Types::resourceNotFoundException
end
handler.on_internal_server_exception_event do |event|
event # => Aws::Context::Types::internalServerException
end
client.agentic_retrieve_stream(
# params inputs
event_stream_handler: handler
)
# 2) Use a Ruby Proc object
# Example for registering callbacks with specific events
handler = Proc.new do |stream|
stream.on_trace_event_event do |event|
event # => Aws::Context::Types::traceEvent
end
stream.on_response_event_event do |event|
event # => Aws::Context::Types::responseEvent
end
stream.on_result_event do |event|
event # => Aws::Context::Types::result
end
stream.on_access_denied_exception_event do |event|
event # => Aws::Context::Types::accessDeniedException
end
stream.on_resource_not_found_exception_event do |event|
event # => Aws::Context::Types::resourceNotFoundException
end
stream.on_internal_server_exception_event do |event|
event # => Aws::Context::Types::internalServerException
end
end
client.agentic_retrieve_stream(
# params inputs
event_stream_handler: handler
)
# Usage pattern c): Hybrid pattern of a) and b)
handler = Aws::Context::EventStreams::AgenticRetrieveStreamOutput.new
handler.on_trace_event_event do |event|
event # => Aws::Context::Types::traceEvent
end
handler.on_response_event_event do |event|
event # => Aws::Context::Types::responseEvent
end
handler.on_result_event do |event|
event # => Aws::Context::Types::result
end
handler.on_access_denied_exception_event do |event|
event # => Aws::Context::Types::accessDeniedException
end
handler.on_resource_not_found_exception_event do |event|
event # => Aws::Context::Types::resourceNotFoundException
end
handler.on_internal_server_exception_event do |event|
event # => Aws::Context::Types::internalServerException
end
client.agentic_retrieve_stream(
# params input
event_stream_handler: handler
) do |stream|
stream.on_error_event do |event|
# catch unmodeled error event in the stream
raise event
# => Aws::Errors::EventError
# event.event_type => :error
# event.error_code => String
# event.error_message => String
end
end
# You can also iterate through events after the response complete.
# Events are available at
resp.stream # => Enumerator
# For parameter input example, please refer to following request syntax.
Example: Ask a question about an agent context
Example: Ask a question about an agent context
# The following example asks which table holds customer orders. The response is an event stream; this example shows only
# its final result event, which carries the answer, the retrieved context, and a citation.
resp = client.agentic_retrieve_stream({
agent_context_id: "ac-0123456789abcdef0123456789abcdef",
messages: [
{
content: "Which table holds customer order data?",
role: "USER",
},
],
retrieval_configuration: {
max_iterations: 10,
},
session_id: "sales-analytics-chat-0001",
})
resp.to_h outputs the following:
{
stream: {
result: {
answer: "Customer order data is in the orders table in the sales_analytics database. Each row records an order_id, a customer_id, an order_date, and an order_total.",
citations: [
{
end_index: 74,
references: [
{
node_id: "glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders",
},
],
start_index: 26,
},
],
retrieved_context: [
{
entity_type: "NODE",
node_id: "glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders",
properties: {
"name" => {
string_value: "orders",
},
"aws:context:connection-arns" => {
string_value: "[\"arn:aws:context:us-east-1:111122223333:connection/conn-0123456789abcdef0123456789abcdef\"]",
},
"createdAt" => {
string_value: "2026-10-14T09:12:41Z",
},
"databaseName" => {
string_value: "sales_analytics",
},
"nodeType" => {
string_value: "AWS::CONTEXT::TABLE",
},
"tableArn" => {
string_value: "arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders",
},
"updatedAt" => {
string_value: "2026-10-14T09:12:41Z",
},
},
summary: "AWS Glue table orders in the sales_analytics database.",
},
],
},
},
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.agentic_retrieve_stream({
agent_context_id: "AgentContextIdentifier", # required
messages: [ # required
{
role: "USER", # required, accepts USER, ASSISTANT
content: "MessageContent", # required
},
],
session_id: "SessionId",
analysis_configuration: {
emit_trace: "ENABLED", # accepts ENABLED, DISABLED
},
retrieval_configuration: {
max_iterations: 1,
},
})
Response structure
Response structure
# All events are available at resp.stream:
resp.stream #=> Enumerator
resp.stream.event_types #=> [:trace_event, :response_event, :result, :access_denied_exception, :resource_not_found_exception, :internal_server_exception]
# For :trace_event event available at #on_trace_event_event callback and response eventstream enumerator:
event.id #=> String
event.occurred_at #=> Time
event.attributes.step #=> String, one of "Planning", "Retrieval"
event.attributes.status #=> String, one of "IN_PROGRESS", "SUCCEEDED", "FAILED"
event.attributes.message #=> String
event.attributes.actions #=> Array
event.attributes.actions[0].input_query #=> String
event.attributes.actions[0].source_retrievers #=> Array
event.attributes.actions[0].source_retrievers[0].identifier #=> String
event.attributes.warnings #=> Array
event.attributes.warnings[0].message #=> String
event.attributes.failures #=> Array
event.attributes.failures[0].message #=> String
# For :response_event event available at #on_response_event_event callback and response eventstream enumerator:
event.text #=> String
# For :result event available at #on_result_event callback and response eventstream enumerator:
event.retrieved_context #=> Array
event.retrieved_context[0].node_id #=> String
event.retrieved_context[0].edge_id.from #=> String
event.retrieved_context[0].edge_id.to #=> String
event.retrieved_context[0].document_id #=> String
event.retrieved_context[0].entity_type #=> String, one of "NODE", "EDGE", "DOCUMENT"
event.retrieved_context[0].summary #=> String
event.retrieved_context[0].content.byte_content #=> String
event.retrieved_context[0].content.text #=> String
event.retrieved_context[0].content.mime_type #=> String
event.retrieved_context[0].properties #=> Hash
event.retrieved_context[0].properties["MetadataKey"].string_value #=> String
event.retrieved_context[0].properties["MetadataKey"].int_value #=> Integer
event.retrieved_context[0].properties["MetadataKey"].long_value #=> Integer
event.retrieved_context[0].properties["MetadataKey"].bool_value #=> Boolean
event.retrieved_context[0].properties["MetadataKey"].float_value #=> Float
event.retrieved_context[0].properties["MetadataKey"].double_value #=> Float
event.retrieved_context[0].properties["MetadataKey"].string_list_value #=> Array
event.retrieved_context[0].properties["MetadataKey"].string_list_value[0] #=> String
event.retrieved_context[0].properties["MetadataKey"].int_list_value #=> Array
event.retrieved_context[0].properties["MetadataKey"].int_list_value[0] #=> Integer
event.retrieved_context[0].properties["MetadataKey"].long_list_value #=> Array
event.retrieved_context[0].properties["MetadataKey"].long_list_value[0] #=> Integer
event.retrieved_context[0].properties["MetadataKey"].float_list_value #=> Array
event.retrieved_context[0].properties["MetadataKey"].float_list_value[0] #=> Float
event.retrieved_context[0].properties["MetadataKey"].double_list_value #=> Array
event.retrieved_context[0].properties["MetadataKey"].double_list_value[0] #=> Float
event.retrieved_context[0].properties["MetadataKey"].bool_list_value #=> Array
event.retrieved_context[0].properties["MetadataKey"].bool_list_value[0] #=> Boolean
event.answer #=> String
event.citations #=> Array
event.citations[0].start_index #=> Integer
event.citations[0].end_index #=> Integer
event.citations[0].references #=> Array
event.citations[0].references[0].node_id #=> String
event.citations[0].references[0].edge_id.from #=> String
event.citations[0].references[0].edge_id.to #=> String
event.citations[0].references[0].document_id #=> String
# For :access_denied_exception event available at #on_access_denied_exception_event callback and response eventstream enumerator:
event.message #=> String
# For :resource_not_found_exception event available at #on_resource_not_found_exception_event callback and response eventstream enumerator:
event.message #=> String
event.resource_id #=> String
event.resource_type #=> String, one of "agent-context", "connection", "curation-policy", "evaluation", "ontology", "ontology-induction", "resource-policy"
# For :internal_server_exception event available at #on_internal_server_exception_event callback and response eventstream enumerator:
event.message #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context to retrieve from, by its ID or ARN.
-
:messages
(required, Array<Types::Message>)
—
The conversation, as an ordered list of turns. A single-question caller sends one user message. The list carries multi-turn history so a follow-up resolves against earlier turns.
-
:session_id
(String)
—
Optional. A key that you supply to group related calls, for example the turns of one conversation, for trace storage and analysis. Grouping is per account, across agent contexts, so use a value that is unique to each conversation.
-
:analysis_configuration
(Types::AnalysisConfiguration)
—
Optional controls for post-call analysis of the retrieval: whether its trace is stored for analysis. Trace events are streamed either way.
-
:retrieval_configuration
(Types::StreamRetrievalConfiguration)
—
Optional bounds and configuration for the agent loop.
Yields:
- (event_stream_handler)
Returns:
See Also:
1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 1110 def agentic_retrieve_stream(params = {}, options = {}) params = params.dup event_stream_handler = case handler = params.delete(:event_stream_handler) when EventStreams::AgenticRetrieveStreamOutput then handler when Proc then EventStreams::AgenticRetrieveStreamOutput.new.tap(&handler) when nil then EventStreams::AgenticRetrieveStreamOutput.new else msg = "expected :event_stream_handler to be a block or "\ "instance of Aws::Context::EventStreams::AgenticRetrieveStreamOutput"\ ", got `#{handler.inspect}` instead" raise ArgumentError, msg end yield(event_stream_handler) if block_given? req = build_request(:agentic_retrieve_stream, params) req.context[:event_stream_handler] = event_stream_handler req.handlers.add(Aws::Binary::DecodeHandler, priority: 95) req.send_request(options) end |
#associate_curation_policy(params = {}) ⇒ Types::AssociateCurationPolicyResponse
Associates a curation policy with an agent context. The agent context enforces the policy's latest published version, including versions published later. Returns the association.
Examples:
Example: Associate a curation policy with an agent context
Example: Associate a curation policy with an agent context
# The following example associates a curation policy with an agent context, which then enforces the policy's latest
# published version.
resp = client.associate_curation_policy({
agent_context_id: "ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d",
curation_policy_id: "pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
})
resp.to_h outputs the following:
{
agent_context_id: "ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d",
curation_policy_id: "pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.associate_curation_policy({
agent_context_id: "AgentContextIdentifier", # required
curation_policy_id: "CurationPolicyId", # required
})
Response structure
Response structure
resp.agent_context_id #=> String
resp.curation_policy_id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context, by its ID or ARN.
-
:curation_policy_id
(required, String)
—
The ID of the curation policy to associate with the agent context. If the policy doesn't exist in your account, the request fails with
ResourceNotFoundException. If it was deleted, the request fails withConflictException.
Returns:
-
(Types::AssociateCurationPolicyResponse)
—
Returns a response object which responds to the following methods:
- #agent_context_id => String
- #curation_policy_id => String
See Also:
1184 1185 1186 1187 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 1184 def associate_curation_policy(params = {}, options = {}) req = build_request(:associate_curation_policy, params) req.send_request(options) end |
#cancel_ontology_induction(params = {}) ⇒ Types::CancelOntologyInductionResponse
Cancels an ontology induction that is still INDUCING. The
induction's status changes to CANCELLED, and no ontology is
created.
Examples:
Example: Cancel an ontology induction
Example: Cancel an ontology induction
# The following example cancels an ontology induction that is still INDUCING, so no ontology is created.
resp = client.cancel_ontology_induction({
ontology_induction_id: "oi-9e8d7c6b5a4f4e3d8c2b1a0f9e8d7c6b",
})
resp.to_h outputs the following:
{
arn: "arn:aws:context:us-east-1:111122223333:ontology-induction/oi-9e8d7c6b5a4f4e3d8c2b1a0f9e8d7c6b",
id: "oi-9e8d7c6b5a4f4e3d8c2b1a0f9e8d7c6b",
status: "CANCELLED",
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.cancel_ontology_induction({
ontology_induction_id: "OntologyInductionIdentifier", # required
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.status #=> String, one of "INDUCING", "DRAFT", "FAILED", "CANCELLED"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:ontology_induction_id
(required, String)
—
The ID or Amazon Resource Name (ARN) of the ontology induction to cancel.
Returns:
See Also:
1235 1236 1237 1238 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 1235 def cancel_ontology_induction(params = {}, options = {}) req = build_request(:cancel_ontology_induction, params) req.send_request(options) end |
#cancel_task(params = {}) ⇒ Types::CancelTaskResponse
Cancels a task that is PENDING or IN_PROGRESS. The task moves to
CANCELLING, and then to CANCELLED when it stops. AWS Context keeps
the change sets that the task already created. Canceling a CANCELLED
task returns it unchanged. Canceling a CANCELLING task returns it
unchanged, unless the task's work has already stopped, in which case
the cancel completes and the task is returned as CANCELLED.
Canceling a COMPLETED or FAILED task fails with
ConflictException.
Examples:
Example: Cancel a running task
Example: Cancel a running task
# The following example cancels a verified queries import task that is in progress, which moves it to CANCELLING.
resp = client.cancel_task({
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
task_id: "task-2c7f5e9a1d3b4a68b4e2f0c9d8a7e153",
})
resp.to_h outputs the following:
{
type: "IMPORT_VERIFIED_QUERIES",
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53/task/task-2c7f5e9a1d3b4a68b4e2f0c9d8a7e153",
created_at: Time.parse("2026-11-22T14:03:11Z"),
description: "Import verified sales queries",
id: "task-2c7f5e9a1d3b4a68b4e2f0c9d8a7e153",
input_configuration: {
import_verified_queries: {
documents: [
{
name: "verified-sales-queries.sql",
content_type: "SQL",
size_bytes: 18432,
},
],
},
},
statistics: {
number_of_change_sets_auto_approved: 0,
number_of_change_sets_created: 1,
},
status: "CANCELLING",
updated_at: Time.parse("2026-11-22T14:05:47Z"),
}
Example: Cancel a task that has already completed, which fails with ConflictException
Example: Cancel a task that has already completed, which fails with ConflictException
# The following example tries to cancel a task that is COMPLETED, which fails with ConflictException.
resp = client.cancel_task({
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
task_id: "task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364",
})
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.cancel_task({
agent_context_id: "AgentContextIdentifier", # required
task_id: "TaskId", # required
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.agent_context_id #=> String
resp.type #=> String, one of "IMPORT_DATA_DICTIONARY", "IMPORT_VERIFIED_QUERIES", "IMPORT_ONTOLOGY"
resp.status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "FAILED", "CANCELLING", "CANCELLED"
resp.description #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.status_reason_code #=> String, one of "GRAPH_NOT_ACTIVE", "ONTOLOGY_INVALID", "ONTOLOGY_IMPORT_UNAVAILABLE", "ONTOLOGY_ALREADY_IMPORTED"
resp.status_message #=> String
resp.statistics.number_of_documents_analyzed #=> Integer
resp.statistics.number_of_change_sets_created #=> Integer
resp.statistics.number_of_change_sets_auto_approved #=> Integer
resp.input_configuration.import_data_dictionary.documents #=> Array
resp.input_configuration.import_data_dictionary.documents[0].name #=> String
resp.input_configuration.import_data_dictionary.documents[0].size_bytes #=> Integer
resp.input_configuration.import_data_dictionary.documents[0].content_type #=> String, one of "CSV", "JSON", "YAML", "MARKDOWN", "SQL", "TXT"
resp.input_configuration.import_verified_queries.documents #=> Array
resp.input_configuration.import_verified_queries.documents[0].name #=> String
resp.input_configuration.import_verified_queries.documents[0].size_bytes #=> Integer
resp.input_configuration.import_verified_queries.documents[0].content_type #=> String, one of "CSV", "JSON", "YAML", "MARKDOWN", "SQL", "TXT"
resp.input_configuration.import_ontology.ontologies #=> Array
resp.input_configuration.import_ontology.ontologies[0].ontology_arn #=> String
resp.input_configuration.import_ontology.ontologies[0].ontology_version #=> String
resp.outputs #=> Array
resp.outputs[0].change_set.change_set_id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context, as an ID or ARN.
-
:task_id
(required, String)
—
The ID of the task to cancel.
Returns:
-
(Types::CancelTaskResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #agent_context_id => String
- #type => String
- #status => String
- #description => String
- #created_at => Time
- #updated_at => Time
- #status_reason_code => String
- #status_message => String
- #statistics => Types::TaskStatistics
- #input_configuration => Types::TaskInputConfigurationSummary
- #outputs => Array<Types::TaskOutput>
See Also:
1357 1358 1359 1360 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 1357 def cancel_task(params = {}, options = {}) req = build_request(:cancel_task, params) req.send_request(options) end |
#create_agent_context(params = {}) ⇒ Types::CreateAgentContextResponse
Creates an agent context over one or more connections. Creation is asynchronous. GetAgentContext returns its status.
Examples:
Example: Create an agent context
Example: Create an agent context
# The following example creates an agent context over one AWS Glue Data Catalog connection, scoped to the sales database
# and mapped to the AWS managed Data ontology.
resp = client.create_agent_context({
name: "sales-analytics",
client_token: "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
connection_mappings: [
{
connection_id: "conn-7b1e4d9a2c6f4b08a3e5d1c9f2a6b4e7",
ontology_mappings: [
{
ontology_id: "arn:aws:context:us-east-1::ontology/data",
},
],
path_segments: [
{
id: "sales",
level: "glueDatabase",
},
],
},
],
description: "Sales pipeline and revenue tables for the analytics agents.",
tags: {
"team" => "sales-analytics",
},
})
resp.to_h outputs the following:
{
name: "sales-analytics",
arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
connection_mappings: [
{
type: "GLUE_DATA_CATALOG",
connection_id: "arn:aws:context:us-east-1:111122223333:connection/conn-7b1e4d9a2c6f4b08a3e5d1c9f2a6b4e7",
ontology_mappings: [
{
ontology_id: "arn:aws:context:us-east-1::ontology/data",
},
],
path_segments: [
{
id: "sales",
level: "glueDatabase",
},
],
},
],
created_at: Time.parse("2026-11-02T17:30:00Z"),
description: "Sales pipeline and revenue tables for the analytics agents.",
encryption_config: {
encryption_mode: "AWS_OWNED",
},
entity_resolution_config: {
status: "ENABLED",
},
id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
status: "CREATING",
trace_analysis_config: {
include_context_agent_traces: "ENABLED",
status: "DISABLED",
},
updated_at: Time.parse("2026-11-02T17:30:00Z"),
workforce_sign_in_config: {
status: "DISABLED",
},
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_agent_context({
client_token: "ClientToken",
name: "ResourceName",
description: "UserDefinedString",
connection_mappings: [ # required
{
connection_id: "ConnectionIdentifier", # required
ontology_mappings: [ # required
{
ontology_id: "OntologyIdentifier", # required
},
],
data_filter: {
filters: [
{
file_type: "FileType",
exclude_tags: ["TagString"],
include_tags: ["TagString"],
updated_after: Time.now,
created_after: Time.now,
max_document_size_bytes: 1,
},
],
},
extraction_depth: "ExtractionDepth",
path_segments: [
{
level: "PathSegmentValue", # required
id: "PathSegmentIdValue", # required
},
],
type: "GLUE_DATA_CATALOG", # accepts GLUE_DATA_CATALOG, BEDROCK_KNOWLEDGE_BASE, DATABRICKS, SNOWFLAKE
},
],
trace_analysis_config: {
status: "ENABLED", # accepts ENABLED, DISABLED
trace_analysis_role: "RoleArn",
include_context_agent_traces: "ENABLED", # accepts ENABLED, DISABLED
},
workforce_sign_in_config: {
status: "ENABLED", # accepts ENABLED, DISABLED
sign_in_url: "SignInUrl",
},
entity_resolution_config: {
status: "ENABLED", # accepts ENABLED, DISABLED
},
trusted_identity_sources: [
{
identity_store_arn: "IdentityStoreArn",
identity_provider_arn: "IamIdentityProviderArn",
},
],
tags: {
"TagKey" => "TagValue",
},
curation_policy_ids: ["CurationPolicyIdentifier"],
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.name #=> String
resp.description #=> String
resp.status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.created_at #=> Time
resp.updated_at #=> Time
resp.connection_mappings #=> Array
resp.connection_mappings[0].connection_id #=> String
resp.connection_mappings[0].ontology_mappings #=> Array
resp.connection_mappings[0].ontology_mappings[0].ontology_id #=> String
resp.connection_mappings[0].data_filter.filters #=> Array
resp.connection_mappings[0].data_filter.filters[0].file_type #=> String
resp.connection_mappings[0].data_filter.filters[0].exclude_tags #=> Array
resp.connection_mappings[0].data_filter.filters[0].exclude_tags[0] #=> String
resp.connection_mappings[0].data_filter.filters[0].include_tags #=> Array
resp.connection_mappings[0].data_filter.filters[0].include_tags[0] #=> String
resp.connection_mappings[0].data_filter.filters[0].updated_after #=> Time
resp.connection_mappings[0].data_filter.filters[0].created_after #=> Time
resp.connection_mappings[0].data_filter.filters[0].max_document_size_bytes #=> Integer
resp.connection_mappings[0].extraction_depth #=> String
resp.connection_mappings[0].path_segments #=> Array
resp.connection_mappings[0].path_segments[0].level #=> String
resp.connection_mappings[0].path_segments[0].id #=> String
resp.connection_mappings[0].type #=> String, one of "GLUE_DATA_CATALOG", "BEDROCK_KNOWLEDGE_BASE", "DATABRICKS", "SNOWFLAKE"
resp.encryption_config.encryption_mode #=> String, one of "AWS_OWNED", "CUSTOMER_MANAGED"
resp.encryption_config.key_arn #=> String
resp.trace_analysis_config.status #=> String, one of "ENABLED", "DISABLED"
resp.trace_analysis_config.trace_analysis_role #=> String
resp.trace_analysis_config.include_context_agent_traces #=> String, one of "ENABLED", "DISABLED"
resp.workforce_sign_in_config.status #=> String, one of "ENABLED", "DISABLED"
resp.workforce_sign_in_config.sign_in_url #=> String
resp.entity_resolution_config.status #=> String, one of "ENABLED", "DISABLED"
resp.mcp_server_url #=> String
resp.trusted_identity_sources #=> Array
resp.trusted_identity_sources[0].identity_store_arn #=> String
resp.trusted_identity_sources[0].identity_provider_arn #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
Client idempotency token. The AWS SDKs generate one when it is absent. An identical request with the same token returns the existing agent context. The same token with a different request returns ValidationException.
trustedIdentitySourceswith the same entries in another order is the same request.A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:name
(String)
—
Optional. The name of the agent context. If you omit it, the name is
default. You can change it later with UpdateAgentContext. -
:description
(String)
—
Optional human-readable description of the agent context. An empty string is the same as none.
-
:connection_mappings
(required, Array<Types::ConnectionMapping>)
—
The connection mappings for this agent context, up to 20. CreateAgentContext requires at least one: an empty list returns
ValidationException. Each entry binds a connection to one or more ontologies, optionally scoped by a data filter, extraction depth, and path segments. Each referenced connection must exist, be owned by your account, and beACTIVE. Order is significant. When several connections reach the same AWS Glue Data Catalog table, AWS Context tries the connection mapped first, with its own access, and then the next. -
:trace_analysis_config
(Types::TraceAnalysisConfig)
—
The agent context's trace analysis settings. Optional. You can change it with UpdateAgentContext.
-
:workforce_sign_in_config
(Types::WorkforceSignInConfig)
—
Optional workforce sign-in settings. A config with
signInUrlturns sign-in on (statusdefaults to ENABLED).statusENABLED withoutsignInUrlis a ValidationException. You can change it with UpdateAgentContext. -
:entity_resolution_config
(Types::EntityResolutionConfig)
—
Optional entity resolution settings. When the config or its
statusis absent,statusreads ENABLED. You can change it with UpdateAgentContext. -
:trusted_identity_sources
(Array<Types::TrustedIdentitySource>)
—
Optional identity sources to trust in addition to your account. At most 100 unique entries, each with exactly one member. Order is not significant. An empty list and an absent member are the same value: only your account is trusted. You can change it with UpdateAgentContext.
-
:tags
(Hash<String,String>)
—
Tags to add to the agent context 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 agent context. 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. -
:curation_policy_ids
(Array<String>)
—
Curation policies to associate with the new agent context, as IDs or ARNs, instead of the default curation policies. If you omit it or the list is empty, AWS Context associates the default curation policies. Each policy must be
ACTIVEand owned by your account, and you needcontext:AssociateCurationPolicypermission on each. AWS Context checks both again on aclientTokenretry. If a policy doesn't exist, the request fails withResourceNotFoundException. If one has been deleted, it fails withConflictException. Change the policies later with AssociateCurationPolicy and DisassociateCurationPolicy.
Returns:
-
(Types::CreateAgentContextResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #name => String
- #description => String
- #status => String
- #created_at => Time
- #updated_at => Time
- #connection_mappings => Array<Types::ConnectionMapping>
- #encryption_config => Types::EncryptionConfig
- #trace_analysis_config => Types::TraceAnalysisConfig
- #workforce_sign_in_config => Types::WorkforceSignInConfig
- #entity_resolution_config => Types::EntityResolutionConfig
- #mcp_server_url => String
- #trusted_identity_sources => Array<Types::TrustedIdentitySource>
See Also:
1629 1630 1631 1632 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 1629 def create_agent_context(params = {}, options = {}) req = build_request(:create_agent_context, params) req.send_request(options) end |
#create_change_set(params = {}) ⇒ Types::CreateChangeSetResponse
Proposes a change to an agent context, as ChangeSetOperation items
(the same items that ListChangeSetOperations returns), each setting
one of put, update, or delete.
Examples:
Example: Create or replace the retrieval instructions
Example: Create or replace the retrieval instructions
# The following example creates or replaces the retrieval instructions of an agent context with one update operation on
# the fixed instructions node. No curation policy holds direct changes, so AWS Context applies the change set right away.
resp = client.create_change_set({
operations: [
{
update: {
entity: {
node_id: "https://ontology.context.aws.dev/retrievalInstruction:default",
},
properties: {
"nodeType" => {
string_value: "AWS::CONTEXT::RETRIEVAL_INSTRUCTION",
},
"retrievalInstructionId" => {
string_value: "default",
},
"retrievalInstructionText" => {
string_value: "# Rules for every query\n- If two sources disagree, use the most recent one.",
},
},
},
},
],
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
client_token: "3d5f7a9c-1e2b-4d6f-8a0c-4e6b8d0f2a5c",
})
resp.to_h outputs the following:
{
access_control: "NO_ACL",
id: "cs-5a7c9e1b3d5f7a9c0e2b4d6f8a0c2e4b",
status: "PUBLISHED",
}
Example: Create a relationship in a change set that only one group can read
Example: Create a relationship in a change set that only one group can read
# The following example adds a relationship between two existing concepts. Because the request specifies
# accessControlConfig, only members of the group can read the change set's operations, and the change set is
# ACL_RESTRICTED. The relationship itself is visible to anyone who can read both concepts. AWS Context applies the change
# set right away because no curation policy holds it.
resp = client.create_change_set({
operations: [
{
put: {
entity: {
edge_id: {
from: "concept:forecast-margin",
to: "concept:gross-margin",
},
},
properties: {
"edgeType" => {
string_value: "AWS::CONTEXT::RELATED_TO",
},
},
},
},
],
access_control_config: {
access_control_list: [
{
access: "ALLOW",
principal_id: "94a8f4e8-60d1-70a4-b2c3-1f5e9d7c3a20",
principal_type: "GROUP",
},
],
},
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
client_token: "6f8b0d2a-4c6e-4a8b-9d1f-5b7d9f1a3c6e",
})
resp.to_h outputs the following:
{
access_control: "ACL_RESTRICTED",
id: "cs-7b9d1f3a5c6e4a8b0d2f4a6c8e0b1d3f",
status: "PUBLISHED",
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_change_set({
client_token: "ClientToken",
access_control_config: {
access_control_list: [
{
access: "ALLOW", # required, accepts ALLOW, DENY
principal_id: "PrincipalId", # required
principal_type: "USER", # accepts USER, GROUP
},
],
},
agent_context_id: "AgentContextIdentifier", # required
operations: [ # required
{
put: {
entity: {
node_id: "GenericNodeId",
edge_id: {
from: "GenericNodeId", # required
to: "GenericNodeId", # required
},
},
properties: { # required
"MetadataKey" => {
string_value: "MetadataStringValue",
int_value: 1,
long_value: 1,
bool_value: false,
float_value: 1.0,
double_value: 1.0,
string_list_value: ["MetadataStringValue"],
int_list_value: [1],
long_list_value: [1],
float_list_value: [1.0],
double_list_value: [1.0],
bool_list_value: [false],
},
},
},
update: {
entity: { # required
node_id: "GenericNodeId",
edge_id: {
from: "GenericNodeId", # required
to: "GenericNodeId", # required
},
},
properties: { # required
"MetadataKey" => {
string_value: "MetadataStringValue",
int_value: 1,
long_value: 1,
bool_value: false,
float_value: 1.0,
double_value: 1.0,
string_list_value: ["MetadataStringValue"],
int_list_value: [1],
long_list_value: [1],
float_list_value: [1.0],
double_list_value: [1.0],
bool_list_value: [false],
},
},
},
delete: {
entity: { # required
node_id: "GenericNodeId",
edge_id: {
from: "GenericNodeId", # required
to: "GenericNodeId", # required
},
},
properties: {
"MetadataKey" => {
string_value: "MetadataStringValue",
int_value: 1,
long_value: 1,
bool_value: false,
float_value: 1.0,
double_value: 1.0,
string_list_value: ["MetadataStringValue"],
int_list_value: [1],
long_list_value: [1],
float_list_value: [1.0],
double_list_value: [1.0],
bool_list_value: [false],
},
},
},
},
],
})
Response structure
Response structure
resp.status #=> String, one of "DRAFT", "PENDING", "AUTHORIZED", "SUPPRESSED", "PUBLISHED", "FAILED"
resp.access_control #=> String, one of "ACL_RESTRICTED", "NO_ACL"
resp.id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A unique, case-sensitive identifier that you provide to make the request idempotent. A retry with the same token returns the same change set.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:access_control_config
(Types::AccessControlConfig)
—
Who can read the nodes that this change set writes. AWS Context refuses it on a change set that only deletes. If you omit it, every reader of the agent context can read a node that the change creates, and every other node keeps its access control. If you specify it, it replaces the access control of every node that the change set writes, and an absent or empty
accessControlListlets nobody read them. -
:agent_context_id
(required, String)
—
The agent context to change, by its ID or ARN.
-
:operations
(required, Array<Types::ChangeSetOperation>)
—
The operations to write, each a
ChangeSetOperation, from 1 to 1,000. If the list is empty or names the same entity twice, the request fails withValidationException.
Returns:
-
(Types::CreateChangeSetResponse)
—
Returns a response object which responds to the following methods:
- #status => String
- #access_control => String
- #id => String
See Also:
1856 1857 1858 1859 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 1856 def create_change_set(params = {}, options = {}) req = build_request(:create_change_set, params) req.send_request(options) end |
#create_connection(params = {}) ⇒ Types::CreateConnectionResponse
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.
Examples:
Example: Create a connection to an AWS Glue Data Catalog
Example: Create a connection to an AWS Glue Data Catalog
# The following example creates a connection to the sales_db database in the AWS Glue Data Catalog of account
# 111122223333, with a role that AWS Context assumes to read the catalog and a role that the data producer assumes to push
# data. An AWS Glue Data Catalog connection is ACTIVE as soon as CreateConnection returns.
resp = client.create_connection({
name: "sales-analytics",
access_config: {
iam_role: {
role_arn: "arn:aws:iam::111122223333:role/ContextGlueReadRole",
},
},
data_source: {
type: "GLUE_DATA_CATALOG",
location: {
arn: "arn:aws:glue:us-east-1:111122223333:catalog",
},
},
ingestion_config: {
role_arn: "arn:aws:iam::111122223333:role/ContextIngestionRole",
},
scope: {
selectors: [
{
path: [
{
id: "arn:aws:glue:us-east-1:111122223333:catalog",
level: "glueCatalog",
},
{
id: "sales_db",
level: "glueDatabase",
},
],
},
],
},
tags: {
"team" => "sales-analytics",
},
})
resp.to_h outputs the following:
{
name: "sales-analytics",
access_config: {
iam_role: {
role_arn: "arn:aws:iam::111122223333:role/ContextGlueReadRole",
},
},
arn: "arn:aws:context:us-east-1:111122223333:connection/conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b",
created_at: Time.parse("2026-11-02T17:30:00Z"),
data_source: {
type: "GLUE_DATA_CATALOG",
location: {
arn: "arn:aws:glue:us-east-1:111122223333:catalog",
},
},
id: "conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b",
ingestion_config: {
role_arn: "arn:aws:iam::111122223333:role/ContextIngestionRole",
},
scope: {
selectors: [
{
path: [
{
id: "arn:aws:glue:us-east-1:111122223333:catalog",
level: "glueCatalog",
},
{
id: "sales_db",
level: "glueDatabase",
},
],
},
],
},
status: "ACTIVE",
updated_at: Time.parse("2026-11-02T17:30:00Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_connection({
client_token: "ClientToken",
name: "ResourceName", # required
data_source: { # required
type: "GLUE_DATA_CATALOG", # required, accepts GLUE_DATA_CATALOG, BEDROCK_KNOWLEDGE_BASE, DATABRICKS, SNOWFLAKE
location: { # required
arn: "ArnString", # required
},
},
scope: {
selectors: [
{
path: [ # required
{
level: "PathSegmentValue", # required
id: "PathSegmentIdValue", # required
},
],
},
],
},
access_config: {
iam_role: {
role_arn: "RoleArn", # required
},
},
sync_schedule: {
frequency: "HOURLY", # accepts HOURLY, DAILY, WEEKLY, MONTHLY
cron_expression: "CronExpression",
},
ingestion_config: { # required
role_arn: "RoleArn", # required
},
glue_connection_mappings: [
{
path: [ # required
{
level: "PathSegmentValue", # required
id: "PathSegmentIdValue", # required
},
],
glue_connection_arn: "ArnString", # required
},
],
publish: false,
acknowledgements: ["AcknowledgementType"],
tags: {
"TagKey" => "TagValue",
},
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.name #=> String
resp.data_source.type #=> String, one of "GLUE_DATA_CATALOG", "BEDROCK_KNOWLEDGE_BASE", "DATABRICKS", "SNOWFLAKE"
resp.data_source.location.arn #=> String
resp.scope.selectors #=> Array
resp.scope.selectors[0].path #=> Array
resp.scope.selectors[0].path[0].level #=> String
resp.scope.selectors[0].path[0].id #=> String
resp.access_config.iam_role.role_arn #=> String
resp.sync_schedule.frequency #=> String, one of "HOURLY", "DAILY", "WEEKLY", "MONTHLY"
resp.sync_schedule.cron_expression #=> String
resp.ingestion_config.role_arn #=> String
resp.glue_connection_mappings #=> Array
resp.glue_connection_mappings[0].path #=> Array
resp.glue_connection_mappings[0].path[0].level #=> String
resp.glue_connection_mappings[0].path[0].id #=> String
resp.glue_connection_mappings[0].glue_connection_arn #=> String
resp.status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.failure.code #=> String, one of "GLUE_CONNECTION_UNAVAILABLE"
resp.failure.message #=> String
resp.sub_status #=> String, one of "GLUE_CONNECTION_CREATED", "GLUE_CONNECTION_VALIDATED", "SYNC_JOB_CREATED"
resp.created_at #=> Time
resp.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(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,tagsand, once the connection isACTIVE,publishare not compared with the original request. A create refused for a missing acknowledgement records no token.A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:name
(required, 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.
-
:data_source
(required, Types::DataSourceReference)
—
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
(Types::DataSourceScope)
—
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. -
:access_config
(Types::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. -
:sync_schedule
(Types::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. -
:ingestion_config
(required, Types::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. -
:glue_connection_mappings
(Array<Types::GlueConnectionMapping>)
—
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
(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 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. -
:acknowledgements
(Array<String>)
—
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. -
:tags
(Hash<String,String>)
—
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.
Returns:
-
(Types::CreateConnectionResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #name => String
- #data_source => Types::DataSourceReference
- #scope => Types::DataSourceScope
- #access_config => Types::AccessConfig
- #sync_schedule => Types::SyncSchedule
- #ingestion_config => Types::IngestionConfig
- #glue_connection_mappings => Array<Types::GlueConnectionMapping>
- #status => String
- #failure => Types::ConnectionFailure
- #sub_status => String
- #created_at => Time
- #updated_at => Time
See Also:
2191 2192 2193 2194 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 2191 def create_connection(params = {}, options = {}) req = build_request(:create_connection, params) req.send_request(options) end |
#create_curation_policy(params = {}) ⇒ Types::CreateCurationPolicyResponse
Creates a curation policy, which decides which changes to an agent context are held for review as curation proposals instead of applied automatically. The policy starts as an unpublished draft. The agent contexts associated with it enforce it once CreateCurationPolicyVersion publishes it.
Examples:
Example: Create a curation policy
Example: Create a curation policy
# The following example creates a curation policy that holds change sets that trace analysis generates for review, and
# rejects a held proposal after 7 days without a decision.
resp = client.create_curation_policy({
name: "hold-trace-analysis-changes",
auto_reject_after_seconds: 604800,
description: "Holds changes that trace analysis generates for review before they are applied.",
policy_document: "forbid (\n principal,\n action == AWS::Context::Action::\"PublishChangeSet\",\n resource is AWS::Context::ChangeSet\n)\nwhen { resource has generatedBy && resource.generatedBy == AWS::Context::Activity::\"TRACE_ANALYSIS\" };",
tags: {
"team" => "sales-analytics",
},
})
resp.to_h outputs the following:
{
name: "hold-trace-analysis-changes",
arn: "arn:aws:context:us-east-1:111122223333:curation-policy/pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
auto_reject_after_seconds: 604800,
created_at: Time.parse("2026-03-10T16:20:00Z"),
description: "Holds changes that trace analysis generates for review before they are applied.",
id: "pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
policy_document: "forbid (\n principal,\n action == AWS::Context::Action::\"PublishChangeSet\",\n resource is AWS::Context::ChangeSet\n)\nwhen { resource has generatedBy && resource.generatedBy == AWS::Context::Activity::\"TRACE_ANALYSIS\" };",
revision_id: "8f14e45f-ceea-4e7a-9b1d-2c3a4b5c6d7e",
status: "DRAFT",
updated_at: Time.parse("2026-03-10T16:20:00Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_curation_policy({
client_token: "ClientToken",
name: "ResourceName", # required
description: "UserDefinedString",
policy_document: "PolicyText", # required
auto_reject_after_seconds: 1,
tags: {
"TagKey" => "TagValue",
},
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.name #=> String
resp.last_published_version #=> String
resp.revision_id #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.auto_reject_after_seconds #=> Integer
resp.description #=> String
resp.policy_document #=> String
resp.status #=> String, one of "DRAFT", "ACTIVE", "DELETED"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A unique, case-sensitive identifier that you provide to make the request idempotent. A retry with the same token and the same parameters returns the curation policy that the first request created. If you don't specify one, the AWS SDKs generate one.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:name
(required, String)
—
The name of the curation policy. 3 to 63 characters: it must start with a letter and can contain only ASCII letters, digits, and hyphens.
-
:description
(String)
—
A description of the curation policy. Up to 1,024 characters, with no control characters.
-
:policy_document
(required, String)
—
The policy's rules, as a Cedar policy document.
-
:auto_reject_after_seconds
(Integer)
—
The number of seconds that a curation proposal held for review under this policy can wait for a decision before it is rejected automatically. Valid range: 86,400 (1 day) to 15,552,000 (180 days). If you omit it, proposals held under this policy are never rejected automatically.
-
:tags
(Hash<String,String>)
—
Tags to add to the curation policy 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 curation policy. 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.
Returns:
-
(Types::CreateCurationPolicyResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #name => String
- #last_published_version => String
- #revision_id => String
- #created_at => Time
- #updated_at => Time
- #auto_reject_after_seconds => Integer
- #description => String
- #policy_document => String
- #status => String
See Also:
2313 2314 2315 2316 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 2313 def create_curation_policy(params = {}, options = {}) req = build_request(:create_curation_policy, params) req.send_request(options) end |
#create_curation_policy_version(params = {}) ⇒ Types::CreateCurationPolicyVersionResponse
Publishes a curation policy's working copy as a new, immutable version. The agent contexts associated with the policy start enforcing the new version. Returns the updated policy.
Examples:
Example: Publish a curation policy
Example: Publish a curation policy
# The following example publishes the working copy of a draft curation policy as version 1, so the agent contexts
# associated with the policy start enforcing it.
resp = client.create_curation_policy_version({
curation_policy_id: "pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
revision_id: "8f14e45f-ceea-4e7a-9b1d-2c3a4b5c6d7e",
})
resp.to_h outputs the following:
{
name: "hold-trace-analysis-changes",
arn: "arn:aws:context:us-east-1:111122223333:curation-policy/pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
auto_reject_after_seconds: 604800,
created_at: Time.parse("2026-03-10T16:20:00Z"),
description: "Holds changes that trace analysis generates for review before they are applied.",
id: "pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
last_published_version: "1",
policy_document: "forbid (\n principal,\n action == AWS::Context::Action::\"PublishChangeSet\",\n resource is AWS::Context::ChangeSet\n)\nwhen { resource has generatedBy && resource.generatedBy == AWS::Context::Activity::\"TRACE_ANALYSIS\" };",
revision_id: "e3a5c7b9-1d4f-4b6a-8c2e-9f0b1d3a5c7e",
status: "ACTIVE",
updated_at: Time.parse("2026-03-10T16:45:00Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_curation_policy_version({
client_token: "ClientToken",
curation_policy_id: "CurationPolicyId", # required
revision_id: "CurationPolicyRevision", # required
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.name #=> String
resp.last_published_version #=> String
resp.revision_id #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.auto_reject_after_seconds #=> Integer
resp.description #=> String
resp.policy_document #=> String
resp.status #=> String, one of "DRAFT", "ACTIVE", "DELETED"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A token that makes a retry safe. A retry with the same token and the same parameters returns the current policy instead of creating another version. A token used with different parameters is a ValidationException, checked first, and a retry with the same parameters after the policy was deleted is a ConflictException. Required at run time. The AWS SDKs generate one.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:curation_policy_id
(required, String)
—
The ID of the curation policy to publish a new version of.
-
:revision_id
(required, String)
—
The
revisionIdof the working copy to publish, as last read. A working copy whose revision has since advanced is a ConflictException.
Returns:
-
(Types::CreateCurationPolicyVersionResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #name => String
- #last_published_version => String
- #revision_id => String
- #created_at => Time
- #updated_at => Time
- #auto_reject_after_seconds => Integer
- #description => String
- #policy_document => String
- #status => String
See Also:
2406 2407 2408 2409 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 2406 def create_curation_policy_version(params = {}, options = {}) req = build_request(:create_curation_policy_version, params) req.send_request(options) end |
#create_ontology(params = {}) ⇒ Types::CreateOntologyResponse
Creates an ontology from an OWL ontology document. An ontology defines the types of nodes and edges in an agent context. Returns the new ontology's ID and ARN.
Examples:
Example: Create an ontology
Example: Create an ontology
# The following example creates an ontology from a Turtle (OWL) document that defines customers, orders, and the
# relationship between them.
resp = client.create_ontology({
name: "sales-analytics",
client_token: "3f1c9a2e-5b7d-4e8f-9a0b-1c2d3e4f5a6b",
description: "Customers and the orders they place.",
source: "@prefix ex: <http://example.com/sales#> .\n@prefix owl: <http://www.w3.org/2002/07/owl#> .\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n\n<http://example.com/sales> a owl:Ontology .\n\nex:Customer a owl:Class ;\n rdfs:label \"Customer\" ;\n rdfs:comment \"A person or company that places orders.\" .\n\nex:Order a owl:Class ;\n rdfs:label \"Order\" ;\n rdfs:comment \"A purchase that a customer places.\" .\n\nex:customerId a owl:DatatypeProperty ;\n rdfs:domain ex:Customer ;\n rdfs:range xsd:string .\n\nex:orderId a owl:DatatypeProperty ;\n rdfs:domain ex:Order ;\n rdfs:range xsd:string .\n\nex:placedOrder a owl:ObjectProperty ;\n rdfs:label \"placed order\" ;\n rdfs:domain ex:Customer ;\n rdfs:range ex:Order .\n",
source_format: "TURTLE",
tags: {
"team" => "analytics",
},
})
resp.to_h outputs the following:
{
version: "1.0.0",
name: "sales-analytics",
arn: "arn:aws:context:us-east-1:111122223333:ontology/ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d",
description: "Customers and the orders they place.",
id: "ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d",
updated_at: Time.parse("2026-11-02T17:45:10Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_ontology({
client_token: "ClientToken",
name: "OntologyName", # required
description: "UserDefinedString",
source_format: "TURTLE", # required, accepts TURTLE
source: "OntologySource", # required
tags: {
"TagKey" => "TagValue",
},
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.updated_at #=> Time
resp.name #=> String
resp.description #=> String
resp.version #=> String
resp.validation_issues #=> Array
resp.validation_issues[0].code #=> String
resp.validation_issues[0].message #=> String
resp.validation_issues[0].line #=> Integer
resp.validation_issues[0].subject #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
Client idempotency token. A reused token with an identical request returns the existing ontology with no second write. A reused token with a different request (any member differs, for example
name,description,sourceFormat, orsource) is a ValidationException namingclientToken, never a ConflictException. The AWS SDKs generate the token automatically. A request that arrives without a token is a ValidationException.A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:name
(required, String)
—
Friendly display name for the ontology (for example, "Sales Org"). AWS Context assigns the ontology its opaque ID. This name is a non-unique label. You can rename the ontology in the AWS Context console.
-
:description
(String)
—
Optional description of the ontology. Part of the idempotency comparison on a replay.
-
:source_format
(required, String)
—
The format of
source. The only supported value isTURTLE. -
:source
(required, String)
—
An OWL ontology to derive the template from, in
sourceFormat. -
:tags
(Hash<String,String>)
—
Tags to add to the ontology 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 ontology. 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.
Returns:
-
(Types::CreateOntologyResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #updated_at => Time
- #name => String
- #description => String
- #version => String
- #validation_issues => Array<Types::OntologyValidationIssue>
See Also:
2520 2521 2522 2523 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 2520 def create_ontology(params = {}, options = {}) req = build_request(:create_ontology, params) req.send_request(options) end |
#delete_agent_context(params = {}) ⇒ Struct
Deletes an agent context. Deletion is asynchronous. An agent context that does not exist or is already being deleted returns ResourceNotFoundException.
Examples:
Example: Delete an agent context
Example: Delete an agent context
# The following example deletes the agent context ac-8d2b6f1e4a9c4e37b5d0a2c8f6e1b394; deletion is asynchronous, and the
# agent context no longer appears in GetAgentContext or ListAgentContexts as soon as deletion starts.
resp = client.delete_agent_context({
agent_context_id: "ac-8d2b6f1e4a9c4e37b5d0a2c8f6e1b394",
})
resp.to_h outputs the following:
{
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_agent_context({
agent_context_id: "AgentContextIdentifier", # required
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context to delete, by its ID or ARN.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
2558 2559 2560 2561 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 2558 def delete_agent_context(params = {}, options = {}) req = build_request(:delete_agent_context, params) req.send_request(options) end |
#delete_connection(params = {}) ⇒ Struct
Deletes a connection. While any agent context still uses the
connection, the request fails with ConflictException. Remove the
connection from each agent context with UpdateAgentContext, and wait
until AWS Context has removed the connection's data from the agent
context, before you retry. For a DATABRICKS or SNOWFLAKE
connection, deletionMode specifies whether AWS Context also deletes
the AWS Glue connection. If the connection stays DELETING, call
DeleteConnection again to finish the cleanup. Deleting a connection
that doesn't exist or is already being deleted succeeds, so you can
safely retry.
Examples:
Example: Delete a connection
Example: Delete a connection
# The following example deletes the connection conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b, which no agent context uses.
resp = client.delete_connection({
connection_id: "conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b",
})
resp.to_h outputs the following:
{
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_connection({
connection_id: "ConnectionIdentifier", # required
deletion_mode: "RETAIN", # accepts RETAIN, DELETE
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:connection_id
(required, String)
—
The connection to delete, by its ID (which starts with
conn-) or its ARN. -
:deletion_mode
(String)
—
Specifies what happens to the connectivity resources behind the connection: the AWS Glue connection, whether AWS Context created it or you specified an existing one. AWS Context keeps the AWS Glue connections named in
glueConnectionMappings. This member doesn't affect agent context content. To remove the connection's content from an agent context, remove the connection from the agent context with UpdateAgentContext. AWS Context never changes your source data. If you omit it, the default isRETAIN. It has no effect onGLUE_DATA_CATALOGandBEDROCK_KNOWLEDGE_BASEconnections.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
2615 2616 2617 2618 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 2615 def delete_connection(params = {}, options = {}) req = build_request(:delete_connection, params) req.send_request(options) end |
#delete_curation_policy(params = {}) ⇒ Struct
Deletes a curation policy. While the policy is associated with any
agent context, the request fails with ConflictException.
Disassociate it with DisassociateCurationPolicy first. You can't
delete a default policy that AWS Context created in your account: the
request fails with ConflictException. Disassociate it instead. After
the delete, GetCurationPolicy returns the policy with status
DELETED, and ListCurationPolicies doesn't return it. Deleting a
policy that is already deleted succeeds.
Examples:
Example: Delete a curation policy
Example: Delete a curation policy
# The following example deletes a curation policy that isn't associated with any agent context.
resp = client.delete_curation_policy({
curation_policy_id: "pol-9b2d4f6a8c0e4b1d3f5a7c9e1b3d5f7a",
})
resp.to_h outputs the following:
{
}
Example: Delete a curation policy that is still associated with an agent context, which fails with ConflictException
Example: Delete a curation policy that is still associated with an agent context, which fails with ConflictException
# The following example fails because the curation policy is still associated with an agent context; disassociate it with
# DisassociateCurationPolicy first.
resp = client.delete_curation_policy({
curation_policy_id: "pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
})
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_curation_policy({
curation_policy_id: "CurationPolicyId", # required
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:curation_policy_id
(required, String)
—
The ID of the curation policy to delete.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
2666 2667 2668 2669 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 2666 def delete_curation_policy(params = {}, options = {}) req = build_request(:delete_curation_policy, params) req.send_request(options) end |
#delete_ontology(params = {}) ⇒ Struct
Deletes an ontology that you own and all of its versions. You can't
delete an AWS managed ontology. While an agent context maps the
ontology, the request fails with ConflictException. Remove the
ontology from the agent context's connection mappings with
UpdateAgentContext first. If an agent context mapped the ontology in
the last 5 minutes, the request also fails with ConflictException,
and you can retry later. A DRAFT ontology that an induction created
is deleted together with its induction. Deleting an ontology that is
already deleted succeeds. AWS Context never reuses the ID of a deleted
ontology.
Examples:
Example: Delete an ontology
Example: Delete an ontology
# The following example deletes an ontology and all of its versions.
resp = client.delete_ontology({
ontology_id: "ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d",
})
resp.to_h outputs the following:
{
}
Example: Delete an ontology that an agent context maps, which fails with ConflictException
Example: Delete an ontology that an agent context maps, which fails with ConflictException
# The following example fails with ConflictException because an agent context still maps the ontology; remove the ontology
# from the agent context's connection mappings with UpdateAgentContext, then retry.
resp = client.delete_ontology({
ontology_id: "ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d",
})
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_ontology({
ontology_id: "OntologyIdentifier", # required
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:ontology_id
(required, String)
—
The ontology to delete, by its ID or ARN. ListOntologies and GetOntology return its ARN.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
2720 2721 2722 2723 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 2720 def delete_ontology(params = {}, options = {}) req = build_request(:delete_ontology, params) req.send_request(options) end |
#delete_ontology_induction(params = {}) ⇒ Struct
Deletes an ontology induction. You can delete a FAILED or
CANCELLED induction, or one whose ontology is PUBLISHED or was
deleted after it was published. While the induction is INDUCING, or
while its ontology is still a DRAFT, the request fails with
ConflictException. To stop a running induction, call
CancelOntologyInduction first. To delete a draft ontology and its
induction together, call DeleteOntology. Deleting an induction
doesn't change its published ontology.
Examples:
Example: Delete an ontology induction
Example: Delete an ontology induction
# The following example deletes a CANCELLED ontology induction.
resp = client.delete_ontology_induction({
ontology_induction_id: "oi-9e8d7c6b5a4f4e3d8c2b1a0f9e8d7c6b",
})
resp.to_h outputs the following:
{
}
Example: Delete an ontology induction whose ontology is a draft, which fails with ConflictException
Example: Delete an ontology induction whose ontology is a draft, which fails with ConflictException
# The following example fails with ConflictException because the induction's ontology is still a DRAFT; to delete the
# draft ontology and its induction together, call DeleteOntology.
resp = client.delete_ontology_induction({
ontology_induction_id: "oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b",
})
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_ontology_induction({
ontology_induction_id: "OntologyInductionIdentifier", # required
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:ontology_induction_id
(required, String)
—
The ID or Amazon Resource Name (ARN) of the ontology induction to delete.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
2772 2773 2774 2775 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 2772 def delete_ontology_induction(params = {}, options = {}) req = build_request(:delete_ontology_induction, params) req.send_request(options) end |
#delete_resource_policy(params = {}) ⇒ Struct
Removes the resource-based policy from an agent context.
Examples:
Example: Remove the resource-based policy from an agent context
Example: Remove the resource-based policy from an agent context
# The following example removes the resource-based policy from an agent context, only if the stored policy is still at the
# given revision.
resp = client.delete_resource_policy({
expected_revision_id: "9a4f2c6e-1d8b-4b3a-a7e5-0c2d6f8b1e49",
resource_arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
})
resp.to_h outputs the following:
{
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_resource_policy({
resource_arn: "ResourcePolicyResourceArn", # required
expected_revision_id: "RevisionId",
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:resource_arn
(required, String)
—
ARN of the agent context.
-
:expected_revision_id
(String)
—
The revision that you last read. The delete succeeds only if it matches the stored revision.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
2814 2815 2816 2817 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 2814 def delete_resource_policy(params = {}, options = {}) req = build_request(:delete_resource_policy, params) req.send_request(options) end |
#disassociate_curation_policy(params = {}) ⇒ Struct
Disassociates a curation policy from an agent context, so the agent context stops enforcing it.
Examples:
Example: Disassociate a curation policy from an agent context
Example: Disassociate a curation policy from an agent context
# The following example disassociates a curation policy from an agent context, so the agent context stops enforcing it.
resp = client.disassociate_curation_policy({
agent_context_id: "ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d",
curation_policy_id: "pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
})
resp.to_h outputs the following:
{
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.disassociate_curation_policy({
agent_context_id: "AgentContextIdentifier", # required
curation_policy_id: "CurationPolicyId", # required
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context to unlink the policy from, by its ID or ARN.
-
:curation_policy_id
(required, String)
—
The ID of the curation policy to disassociate from the agent context.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
2855 2856 2857 2858 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 2855 def disassociate_curation_policy(params = {}, options = {}) req = build_request(:disassociate_curation_policy, params) req.send_request(options) end |
#execute_sql(params = {}) ⇒ Types::ExecuteSqlResponse
Runs one read-only SQL query over the tables of a connection in an
agent context, and returns the result as typed columns and rows. Use
this to read structured data directly when you can write the query
yourself. If the result's rows are larger than 5 MiB, the call fails
with ValidationException. Add a LIMIT clause or select fewer
columns.
Examples:
Example: Run a SQL query
Example: Run a SQL query
# The following example totals order value by sales region from an AWS Glue table that a connection in the agent context
# links, and returns the top three sales regions.
resp = client.execute_sql({
agent_context_id: "ac-0123456789abcdef0123456789abcdef",
connection_id: "conn-0123456789abcdef0123456789abcdef",
query: {
sql: {
statement: "SELECT \"sales_region\", SUM(\"order_total\") AS \"total_sales\" FROM \"arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders\" GROUP BY \"sales_region\" ORDER BY \"total_sales\" DESC LIMIT 3",
tables: [
{
glue_table_arn: "arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders",
},
],
},
},
})
resp.to_h outputs the following:
{
column_metadata: [
{
name: "sales_region",
type: "VARCHAR",
nullable: true,
type_name: "Utf8",
},
{
name: "total_sales",
type: "DECIMAL",
nullable: true,
precision: 22,
scale: 2,
type_name: "Decimal(22, 2, 128)",
},
],
rows: [
{
values: [
{
string_value: "West",
},
{
string_value: "1284503.75",
},
],
},
{
values: [
{
string_value: "East",
},
{
string_value: "1176220.40",
},
],
},
{
values: [
{
string_value: "Central Europe",
},
{
string_value: "843019.12",
},
],
},
],
}
Example: Run a SQL query on a connection that isn't linked, which fails with ResourceNotFoundException
Example: Run a SQL query on a connection that isn't linked, which fails with ResourceNotFoundException
# The following example fails with ResourceNotFoundException because the connection isn't linked to the agent context.
resp = client.execute_sql({
agent_context_id: "ac-0123456789abcdef0123456789abcdef",
connection_id: "conn-fedcba9876543210fedcba9876543210",
query: {
sql: {
statement: "SELECT \"order_id\" FROM \"arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders\" LIMIT 10",
tables: [
{
glue_table_arn: "arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders",
},
],
},
},
})
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.execute_sql({
agent_context_id: "AgentContextIdentifier", # required
connection_id: "ConnectionIdentifier", # required
query: { # required
sql: {
statement: "SqlStatement", # required
tables: [ # required
{
glue_table_arn: "GlueTableArn",
},
],
},
},
})
Response structure
Response structure
resp.column_metadata #=> Array
resp.column_metadata[0].name #=> String
resp.column_metadata[0].type #=> String, one of "BOOLEAN", "TINYINT", "SMALLINT", "INTEGER", "BIGINT", "REAL", "DOUBLE", "DECIMAL", "VARCHAR", "VARBINARY", "DATE", "TIME", "TIMESTAMP", "INTERVAL", "ARRAY", "STRUCT", "MAP", "UNKNOWN"
resp.column_metadata[0].type_name #=> String
resp.column_metadata[0].nullable #=> Boolean
resp.column_metadata[0].precision #=> Integer
resp.column_metadata[0].scale #=> Integer
resp.column_metadata[0].time_zone #=> String
resp.rows #=> Array
resp.rows[0].values #=> Array
resp.rows[0].values[0].null_value #=> Boolean
resp.rows[0].values[0].boolean_value #=> Boolean
resp.rows[0].values[0].long_value #=> Integer
resp.rows[0].values[0].double_value #=> Float
resp.rows[0].values[0].string_value #=> String
resp.rows[0].values[0].blob_value #=> String
resp.rows[0].values[0].json_value #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context that owns the connection, by ID or full ARN.
-
:connection_id
(required, String)
—
The connection to run against. Must be a GLUE_DATA_CATALOG connection linked to the agent context. Its access configuration (
accessConfig) determines how AWS Context reads the tables. -
:query
(required, Types::SqlDataQuery)
—
The query to run: a SQL statement and the AWS Glue tables that it reads. For the SQL rules and limits, see
SqlQuery.
Returns:
-
(Types::ExecuteSqlResponse)
—
Returns a response object which responds to the following methods:
- #column_metadata => Array<Types::SqlColumnMetadata>
- #rows => Array<Types::SqlRow>
See Also:
3017 3018 3019 3020 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 3017 def execute_sql(params = {}, options = {}) req = build_request(:execute_sql, params) req.send_request(options) end |
#get_agent_context(params = {}) ⇒ Types::GetAgentContextResponse
Returns an agent context's configuration and status.
Examples:
Example: Get an agent context
Example: Get an agent context
# The following example returns the configuration and status of the agent context ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53.
resp = client.get_agent_context({
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
})
resp.to_h outputs the following:
{
name: "sales-analytics",
arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
connection_mappings: [
{
type: "GLUE_DATA_CATALOG",
connection_id: "arn:aws:context:us-east-1:111122223333:connection/conn-7b1e4d9a2c6f4b08a3e5d1c9f2a6b4e7",
ontology_mappings: [
{
ontology_id: "arn:aws:context:us-east-1::ontology/data",
},
],
path_segments: [
{
id: "sales",
level: "glueDatabase",
},
],
},
],
created_at: Time.parse("2026-11-02T17:30:00Z"),
description: "Sales pipeline and revenue tables for the analytics agents.",
encryption_config: {
encryption_mode: "AWS_OWNED",
},
entity_resolution_config: {
status: "ENABLED",
},
id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
status: "ACTIVE",
trace_analysis_config: {
include_context_agent_traces: "ENABLED",
status: "DISABLED",
},
updated_at: Time.parse("2026-11-02T17:42:15Z"),
workforce_sign_in_config: {
status: "DISABLED",
},
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_agent_context({
agent_context_id: "AgentContextIdentifier", # required
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.name #=> String
resp.description #=> String
resp.status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.created_at #=> Time
resp.updated_at #=> Time
resp.connection_mappings #=> Array
resp.connection_mappings[0].connection_id #=> String
resp.connection_mappings[0].ontology_mappings #=> Array
resp.connection_mappings[0].ontology_mappings[0].ontology_id #=> String
resp.connection_mappings[0].data_filter.filters #=> Array
resp.connection_mappings[0].data_filter.filters[0].file_type #=> String
resp.connection_mappings[0].data_filter.filters[0].exclude_tags #=> Array
resp.connection_mappings[0].data_filter.filters[0].exclude_tags[0] #=> String
resp.connection_mappings[0].data_filter.filters[0].include_tags #=> Array
resp.connection_mappings[0].data_filter.filters[0].include_tags[0] #=> String
resp.connection_mappings[0].data_filter.filters[0].updated_after #=> Time
resp.connection_mappings[0].data_filter.filters[0].created_after #=> Time
resp.connection_mappings[0].data_filter.filters[0].max_document_size_bytes #=> Integer
resp.connection_mappings[0].extraction_depth #=> String
resp.connection_mappings[0].path_segments #=> Array
resp.connection_mappings[0].path_segments[0].level #=> String
resp.connection_mappings[0].path_segments[0].id #=> String
resp.connection_mappings[0].type #=> String, one of "GLUE_DATA_CATALOG", "BEDROCK_KNOWLEDGE_BASE", "DATABRICKS", "SNOWFLAKE"
resp.encryption_config.encryption_mode #=> String, one of "AWS_OWNED", "CUSTOMER_MANAGED"
resp.encryption_config.key_arn #=> String
resp.trace_analysis_config.status #=> String, one of "ENABLED", "DISABLED"
resp.trace_analysis_config.trace_analysis_role #=> String
resp.trace_analysis_config.include_context_agent_traces #=> String, one of "ENABLED", "DISABLED"
resp.workforce_sign_in_config.status #=> String, one of "ENABLED", "DISABLED"
resp.workforce_sign_in_config.sign_in_url #=> String
resp.entity_resolution_config.status #=> String, one of "ENABLED", "DISABLED"
resp.mcp_server_url #=> String
resp.trusted_identity_sources #=> Array
resp.trusted_identity_sources[0].identity_store_arn #=> String
resp.trusted_identity_sources[0].identity_provider_arn #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context to return, by its ID or ARN.
Returns:
-
(Types::GetAgentContextResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #name => String
- #description => String
- #status => String
- #created_at => Time
- #updated_at => Time
- #connection_mappings => Array<Types::ConnectionMapping>
- #encryption_config => Types::EncryptionConfig
- #trace_analysis_config => Types::TraceAnalysisConfig
- #workforce_sign_in_config => Types::WorkforceSignInConfig
- #entity_resolution_config => Types::EntityResolutionConfig
- #mcp_server_url => String
- #trusted_identity_sources => Array<Types::TrustedIdentitySource>
See Also:
3144 3145 3146 3147 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 3144 def get_agent_context(params = {}, options = {}) req = build_request(:get_agent_context, params) req.send_request(options) end |
#get_change_set(params = {}) ⇒ Types::GetChangeSetResponse
Returns one change set's metadata: its status and the other fields
of the change set, without its operations. To see what the change set
wrote, list its operations with ListChangeSetOperations. For
changeSetId, pass a change set's id from ListChangeSets.
Examples:
Example: Get a change set
Example: Get a change set
# The following example returns the metadata of a change set that ontology grounding produced and that a curation policy
# holds for review, including the changeSetVersion to pass to UpdateChangeSet.
resp = client.get_change_set({
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
change_set_id: "cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b",
})
resp.to_h outputs the following:
{
access_control: "NO_ACL",
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
change_set_version: 1,
created_at: Time.parse("2026-11-18T14:05:12Z"),
generated_by: "ONTOLOGY_GROUNDING",
id: "cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b",
status: "PENDING",
updated_at: Time.parse("2026-11-18T14:05:12Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_change_set({
change_set_id: "ChangeSetId", # required
agent_context_id: "AgentContextIdentifier", # required
})
Response structure
Response structure
resp.agent_context_id #=> String
resp.status #=> String, one of "DRAFT", "PENDING", "AUTHORIZED", "SUPPRESSED", "PUBLISHED", "FAILED"
resp.created_at #=> Time
resp.updated_at #=> Time
resp.access_control #=> String, one of "ACL_RESTRICTED", "NO_ACL"
resp.generated_by #=> String, one of "DATA_SOURCE_EXTRACTION", "DATA_SOURCE_INGESTION", "ENTITY_RESOLUTION", "ONTOLOGY_GROUNDING", "TRACE_ANALYSIS", "IMPORT_DATA_DICTIONARY_TASK", "IMPORT_VERIFIED_QUERIES_TASK", "IMPORT_ONTOLOGY_TASK", "DIRECT_MODIFICATION"
resp.status_reason.code #=> String, one of "REQUEST_EXPIRED", "CONNECTION_REMOVED"
resp.status_reason.message #=> String
resp.id #=> String
resp.change_set_version #=> Integer
resp.connection_arn #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:change_set_id
(required, String)
—
The change set to fetch, by its opaque instance ID.
-
:agent_context_id
(required, String)
—
The agent context that owns the change set, by its ID or ARN.
Returns:
-
(Types::GetChangeSetResponse)
—
Returns a response object which responds to the following methods:
- #agent_context_id => String
- #status => String
- #created_at => Time
- #updated_at => Time
- #access_control => String
- #generated_by => String
- #status_reason => Types::StatusReason
- #id => String
- #change_set_version => Integer
- #connection_arn => String
See Also:
3221 3222 3223 3224 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 3221 def get_change_set(params = {}, options = {}) req = build_request(:get_change_set, params) req.send_request(options) end |
#get_connection(params = {}) ⇒ Types::GetConnectionResponse
Returns a connection's configuration and status.
Examples:
Example: Get a connection
Example: Get a connection
# The following example returns the configuration and status of the connection conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b.
resp = client.get_connection({
connection_id: "conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b",
})
resp.to_h outputs the following:
{
name: "sales-analytics",
access_config: {
iam_role: {
role_arn: "arn:aws:iam::111122223333:role/ContextGlueReadRole",
},
},
arn: "arn:aws:context:us-east-1:111122223333:connection/conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b",
created_at: Time.parse("2026-11-02T17:30:00Z"),
data_source: {
type: "GLUE_DATA_CATALOG",
location: {
arn: "arn:aws:glue:us-east-1:111122223333:catalog",
},
},
id: "conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b",
ingestion_config: {
role_arn: "arn:aws:iam::111122223333:role/ContextIngestionRole",
},
scope: {
selectors: [
{
path: [
{
id: "arn:aws:glue:us-east-1:111122223333:catalog",
level: "glueCatalog",
},
{
id: "sales_db",
level: "glueDatabase",
},
],
},
],
},
status: "ACTIVE",
updated_at: Time.parse("2026-11-02T17:30:00Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_connection({
connection_id: "ConnectionIdentifier", # required
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.name #=> String
resp.data_source.type #=> String, one of "GLUE_DATA_CATALOG", "BEDROCK_KNOWLEDGE_BASE", "DATABRICKS", "SNOWFLAKE"
resp.data_source.location.arn #=> String
resp.scope.selectors #=> Array
resp.scope.selectors[0].path #=> Array
resp.scope.selectors[0].path[0].level #=> String
resp.scope.selectors[0].path[0].id #=> String
resp.access_config.iam_role.role_arn #=> String
resp.sync_schedule.frequency #=> String, one of "HOURLY", "DAILY", "WEEKLY", "MONTHLY"
resp.sync_schedule.cron_expression #=> String
resp.ingestion_config.role_arn #=> String
resp.glue_connection_mappings #=> Array
resp.glue_connection_mappings[0].path #=> Array
resp.glue_connection_mappings[0].path[0].level #=> String
resp.glue_connection_mappings[0].path[0].id #=> String
resp.glue_connection_mappings[0].glue_connection_arn #=> String
resp.status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.failure.code #=> String, one of "GLUE_CONNECTION_UNAVAILABLE"
resp.failure.message #=> String
resp.sub_status #=> String, one of "GLUE_CONNECTION_CREATED", "GLUE_CONNECTION_VALIDATED", "SYNC_JOB_CREATED"
resp.created_at #=> Time
resp.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:connection_id
(required, String)
—
The connection to return, by its ID (which starts with
conn-) or its ARN.
Returns:
-
(Types::GetConnectionResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #name => String
- #data_source => Types::DataSourceReference
- #scope => Types::DataSourceScope
- #access_config => Types::AccessConfig
- #sync_schedule => Types::SyncSchedule
- #ingestion_config => Types::IngestionConfig
- #glue_connection_mappings => Array<Types::GlueConnectionMapping>
- #status => String
- #failure => Types::ConnectionFailure
- #sub_status => String
- #created_at => Time
- #updated_at => Time
See Also:
3335 3336 3337 3338 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 3335 def get_connection(params = {}, options = {}) req = build_request(:get_connection, params) req.send_request(options) end |
#get_curation_policy(params = {}) ⇒ Types::GetCurationPolicyResponse
Returns a curation policy's configuration, status, and policy document.
Examples:
Example: Get a published version of a curation policy
Example: Get a published version of a curation policy
# The following example returns version 1 of a curation policy, including the Cedar policy document that the associated
# agent contexts enforce.
resp = client.get_curation_policy({
version: "1",
curation_policy_id: "pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
})
resp.to_h outputs the following:
{
name: "hold-trace-analysis-changes",
arn: "arn:aws:context:us-east-1:111122223333:curation-policy/pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
auto_reject_after_seconds: 604800,
created_at: Time.parse("2026-03-10T16:20:00Z"),
description: "Holds changes that trace analysis generates for review before they are applied.",
id: "pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
last_published_version: "1",
policy_document: "forbid (\n principal,\n action == AWS::Context::Action::\"PublishChangeSet\",\n resource is AWS::Context::ChangeSet\n)\nwhen { resource has generatedBy && resource.generatedBy == AWS::Context::Activity::\"TRACE_ANALYSIS\" };",
revision_id: "e3a5c7b9-1d4f-4b6a-8c2e-9f0b1d3a5c7e",
status: "ACTIVE",
updated_at: Time.parse("2026-03-10T16:45:00Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_curation_policy({
curation_policy_id: "CurationPolicyId", # required
version: "CurationPolicyVersion",
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.name #=> String
resp.last_published_version #=> String
resp.revision_id #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.auto_reject_after_seconds #=> Integer
resp.description #=> String
resp.policy_document #=> String
resp.status #=> String, one of "DRAFT", "ACTIVE", "DELETED"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:curation_policy_id
(required, String)
—
The ID of the curation policy to return.
-
:version
(String)
—
The version to return:
DRAFTfor the working copy, or a published version number. If you omit it, AWS Context returns the working copy.
Returns:
-
(Types::GetCurationPolicyResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #name => String
- #last_published_version => String
- #revision_id => String
- #created_at => Time
- #updated_at => Time
- #auto_reject_after_seconds => Integer
- #description => String
- #policy_document => String
- #status => String
See Also:
3415 3416 3417 3418 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 3415 def get_curation_policy(params = {}, options = {}) req = build_request(:get_curation_policy, params) req.send_request(options) end |
#get_curation_proposal(params = {}) ⇒ Types::GetCurationProposalResponse
Returns a curation proposal and a summary of the change that it holds for review. ListChangeSetOperations returns the change's individual operations.
Examples:
Example: Get a curation proposal
Example: Get a curation proposal
# The following example returns a curation proposal that a curation policy held for review, including the revisionId to
# pass when you accept or reject it.
resp = client.get_curation_proposal({
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
curation_proposal_id: "cp-dc0af01d4ca5847e27d63a3e30a0c9c6",
})
resp.to_h outputs the following:
{
access_control: "NO_ACL",
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
change_set_id: "cs-8e1f3a5c7b9d4e2f6a0c1b3d5e7f9a2b",
created_at: Time.parse("2026-11-18T14:05:13Z"),
expires_at: Time.parse("2026-11-25T14:05:13Z"),
generated_by: "DATA_SOURCE_INGESTION",
id: "cp-dc0af01d4ca5847e27d63a3e30a0c9c6",
revision_id: "7f3c2a1e-9b4d-4e6f-8a0c-2d5e7b9f1a3c",
status: "PENDING_REVIEW",
title: "Update 'orders' and 2 more entities, and 3 relationships",
triggering_policies: [
{
policy_id: "pol-6b8d0f2a4c1e4b7d9a3c5e7f1b3d5a8c",
},
],
updated_at: Time.parse("2026-11-18T14:05:13Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_curation_proposal({
agent_context_id: "AgentContextIdentifier", # required
curation_proposal_id: "CurationProposalId", # required
})
Response structure
Response structure
resp.change_set_id #=> String
resp.title #=> String
resp.generated_by #=> String, one of "DATA_SOURCE_EXTRACTION", "DATA_SOURCE_INGESTION", "ENTITY_RESOLUTION", "ONTOLOGY_GROUNDING", "TRACE_ANALYSIS", "IMPORT_DATA_DICTIONARY_TASK", "IMPORT_VERIFIED_QUERIES_TASK", "IMPORT_ONTOLOGY_TASK", "DIRECT_MODIFICATION"
resp.revision_id #=> String
resp.status #=> String, one of "PENDING_REVIEW", "APPROVED", "REJECTED", "SUPERSEDED", "FAILED", "PUBLISHING", "ARCHIVED"
resp.status_reason_code #=> String, one of "REQUEST_EXPIRED", "CONNECTION_REMOVED"
resp.access_control #=> String, one of "ACL_RESTRICTED", "NO_ACL"
resp.agent_context_id #=> String
resp.expires_at #=> Time
resp.created_at #=> Time
resp.updated_at #=> Time
resp.status_reason.code #=> String, one of "REQUEST_EXPIRED", "CONNECTION_REMOVED"
resp.status_reason.message #=> String
resp.id #=> String
resp.triggering_policies #=> Array
resp.triggering_policies[0].policy_id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context that the proposal belongs to, by its ID or ARN. If the proposal belongs to another agent context, the request fails with
ResourceNotFoundException. -
:curation_proposal_id
(required, String)
—
The proposal to fetch, by its opaque instance ID.
Returns:
-
(Types::GetCurationProposalResponse)
—
Returns a response object which responds to the following methods:
- #change_set_id => String
- #title => String
- #generated_by => String
- #revision_id => String
- #status => String
- #status_reason_code => String
- #access_control => String
- #agent_context_id => String
- #expires_at => Time
- #created_at => Time
- #updated_at => Time
- #status_reason => Types::StatusReason
- #id => String
- #triggering_policies => Array<Types::TriggeringPolicy>
See Also:
3510 3511 3512 3513 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 3510 def get_curation_proposal(params = {}, options = {}) req = build_request(:get_curation_proposal, params) req.send_request(options) end |
#get_ontology(params = {}) ⇒ Types::GetOntologyResponse
Returns an ontology's status and one of its versions.
Examples:
Example: Get an ontology and its source document
Example: Get an ontology and its source document
# The following example returns the current default version of an ontology, with its Turtle source document in place of
# the template.
resp = client.get_ontology({
ontology_id: "ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d",
source_format: "TURTLE",
})
resp.to_h outputs the following:
{
version: "1.0.0",
name: "sales-analytics",
arn: "arn:aws:context:us-east-1:111122223333:ontology/ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d",
created_at: Time.parse("2026-11-02T17:45:10Z"),
derivation_version: "owl-derivation-3",
description: "Customers and the orders they place.",
id: "ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d",
published_at: Time.parse("2026-11-02T17:45:10Z"),
source: "@prefix ex: <http://example.com/sales#> .\n@prefix owl: <http://www.w3.org/2002/07/owl#> .\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n\n<http://example.com/sales> a owl:Ontology .\n\nex:Customer a owl:Class ;\n rdfs:label \"Customer\" ;\n rdfs:comment \"A person or company that places orders.\" .\n\nex:Order a owl:Class ;\n rdfs:label \"Order\" ;\n rdfs:comment \"A purchase that a customer places.\" .\n\nex:customerId a owl:DatatypeProperty ;\n rdfs:domain ex:Customer ;\n rdfs:range xsd:string .\n\nex:orderId a owl:DatatypeProperty ;\n rdfs:domain ex:Order ;\n rdfs:range xsd:string .\n\nex:placedOrder a owl:ObjectProperty ;\n rdfs:label \"placed order\" ;\n rdfs:domain ex:Customer ;\n rdfs:range ex:Order .\n",
source_format: "TURTLE",
status: "PUBLISHED",
updated_at: Time.parse("2026-11-02T17:45:10Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_ontology({
ontology_id: "OntologyIdentifier", # required
version: "OntologyVersionString",
source_format: "TURTLE", # accepts TURTLE
})
Response structure
Response structure
resp.arn #=> String
resp.version #=> String
resp.template #=> String
resp.created_at #=> Time
resp.published_at #=> Time
resp.name #=> String
resp.description #=> String
resp.derivation_version #=> String
resp.id #=> String
resp.status #=> String, one of "DRAFT", "PUBLISHED"
resp.updated_at #=> Time
resp.ontology_induction_id #=> String
resp.source #=> String
resp.source_format #=> String, one of "TURTLE"
resp.revision_id #=> String
resp.validation_issues #=> Array
resp.validation_issues[0].code #=> String
resp.validation_issues[0].message #=> String
resp.validation_issues[0].line #=> Integer
resp.validation_issues[0].subject #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:ontology_id
(required, String)
—
The ontology to return, by its ID or ARN (see
OntologyIdentifier). -
:version
(String)
—
The version to return, in MAJOR.MINOR.PATCH form, for example
1.0.0. If you omit it, GetOntology returns the current default version. -
:source_format
(String)
—
Return the version's source document in
source, in this format, in place of the template. The response then has notemplate. The format must be the version'ssourceFormat. On aDRAFTontology, GetOntology returns the draft, with or withoutversion(its only version is 1.0.0). If the ontology is AWS managed, whose source is never returned, or the version has no source document, the request fails withValidationException. If you omit it, the response has the template and no source.
Returns:
-
(Types::GetOntologyResponse)
—
Returns a response object which responds to the following methods:
- #arn => String
- #version => String
- #template => String
- #created_at => Time
- #published_at => Time
- #name => String
- #description => String
- #derivation_version => String
- #id => String
- #status => String
- #updated_at => Time
- #ontology_induction_id => String
- #source => String
- #source_format => String
- #revision_id => String
- #validation_issues => Array<Types::OntologyValidationIssue>
See Also:
3615 3616 3617 3618 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 3615 def get_ontology(params = {}, options = {}) req = build_request(:get_ontology, params) req.send_request(options) end |
#get_ontology_induction(params = {}) ⇒ Types::GetOntologyInductionResponse
Returns an ontology induction's status, and, once it is a draft, the ontology it created.
Examples:
Example: Get an ontology induction
Example: Get an ontology induction
# The following example returns an ontology induction that has finished and created a DRAFT ontology.
resp = client.get_ontology_induction({
ontology_induction_id: "oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b",
})
resp.to_h outputs the following:
{
arn: "arn:aws:context:us-east-1:111122223333:ontology-induction/oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b",
created_at: Time.parse("2026-11-04T16:20:05Z"),
id: "oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b",
input_config: {
documents: [
{
name: "catalog-overview.md",
content_type: "MARKDOWN",
size_bytes: 143,
},
],
},
ontology_arn: "arn:aws:context:us-east-1:111122223333:ontology/ont-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b",
ontology_description: "Books, authors, members, and loans for a lending library.",
ontology_id: "ont-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b",
ontology_name: "library-catalog",
prompt: "Model books, authors, library members, and loans. Give every type a stable identifier.",
status: "DRAFT",
updated_at: Time.parse("2026-11-04T16:23:41Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_ontology_induction({
ontology_induction_id: "OntologyInductionIdentifier", # required
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.status #=> String, one of "INDUCING", "DRAFT", "FAILED", "CANCELLED"
resp.failure.code #=> String
resp.failure.message #=> String
resp.ontology_name #=> String
resp.ontology_description #=> String
resp.ontology_id #=> String
resp.ontology_arn #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.seed_ontology_id #=> String
resp.prompt #=> String
resp.input_config.documents #=> Array
resp.input_config.documents[0].name #=> String
resp.input_config.documents[0].size_bytes #=> Integer
resp.input_config.documents[0].content_type #=> String, one of "PDF", "TXT", "MARKDOWN", "CSV", "JSON", "YAML", "DOC", "DOCX", "HTML"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:ontology_induction_id
(required, String)
—
The ID or Amazon Resource Name (ARN) of the ontology induction to return.
Returns:
-
(Types::GetOntologyInductionResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #status => String
- #failure => Types::OntologyInductionFailure
- #ontology_name => String
- #ontology_description => String
- #ontology_id => String
- #ontology_arn => String
- #created_at => Time
- #updated_at => Time
- #seed_ontology_id => String
- #prompt => String
- #input_config => Types::OntologyInductionInputConfigSummary
See Also:
3705 3706 3707 3708 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 3705 def get_ontology_induction(params = {}, options = {}) req = build_request(:get_ontology_induction, params) req.send_request(options) end |
#get_resource_policy(params = {}) ⇒ Types::GetResourcePolicyResponse
Returns the resource-based policy attached to an agent context, with its revision ID.
Examples:
Example: Get the resource-based policy of an agent context
Example: Get the resource-based policy of an agent context
# The following example returns the resource-based policy attached to an agent context, with the revision ID to pass to
# PutResourcePolicy or DeleteResourcePolicy.
resp = client.get_resource_policy({
resource_arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
})
resp.to_h outputs the following:
{
policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"AllowAnalyticsAccountRead\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::444455556666:root\"},\"Action\":[\"context:SearchAgentContext\",\"context:TraverseAgentContext\"],\"Resource\":\"arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53\"}]}",
resource_arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
revision_id: "3c7e1a9f-2b4d-4e6a-8f0c-5d9b1e3a7c2f",
}
Example: Get the policy of an agent context that has none, which fails with ResourceNotFoundException
Example: Get the policy of an agent context that has none, which fails with ResourceNotFoundException
# The following example shows the ResourceNotFoundException returned when no resource-based policy is attached to the
# agent context.
resp = client.get_resource_policy({
resource_arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-8d2b6f1e4a9c4e37b5d0a2c8f6e1b394",
})
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_resource_policy({
resource_arn: "ResourcePolicyResourceArn", # required
})
Response structure
Response structure
resp.resource_arn #=> String
resp.policy #=> String
resp.revision_id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:resource_arn
(required, String)
—
ARN of the agent context.
Returns:
-
(Types::GetResourcePolicyResponse)
—
Returns a response object which responds to the following methods:
- #resource_arn => String
- #policy => String
- #revision_id => String
See Also:
3764 3765 3766 3767 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 3764 def get_resource_policy(params = {}, options = {}) req = build_request(:get_resource_policy, params) req.send_request(options) end |
#get_task(params = {}) ⇒ Types::GetTaskResponse
Returns a task's configuration, status, and results.
Examples:
Example: Get a completed task
Example: Get a completed task
# The following example gets a data dictionary import task that has completed and lists the change sets that it created.
resp = client.get_task({
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
task_id: "task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364",
})
resp.to_h outputs the following:
{
type: "IMPORT_DATA_DICTIONARY",
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53/task/task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364",
created_at: Time.parse("2026-11-20T17:42:05Z"),
description: "Import the sales data dictionary",
id: "task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364",
input_configuration: {
import_data_dictionary: {
documents: [
{
name: "sales-columns.csv",
content_type: "CSV",
size_bytes: 140,
},
],
},
},
outputs: [
{
change_set: {
change_set_id: "cs-8a1f3d5c7e9b4f2a6c0d8e4b1a9f7c35",
},
},
{
change_set: {
change_set_id: "cs-4d9e2b7a5c1f4e83a7b6d0c3f9e2a518",
},
},
],
statistics: {
number_of_change_sets_auto_approved: 0,
number_of_change_sets_created: 2,
},
status: "COMPLETED",
updated_at: Time.parse("2026-11-20T17:48:51Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_task({
agent_context_id: "AgentContextIdentifier", # required
task_id: "TaskId", # required
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.agent_context_id #=> String
resp.type #=> String, one of "IMPORT_DATA_DICTIONARY", "IMPORT_VERIFIED_QUERIES", "IMPORT_ONTOLOGY"
resp.status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "FAILED", "CANCELLING", "CANCELLED"
resp.description #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.status_reason_code #=> String, one of "GRAPH_NOT_ACTIVE", "ONTOLOGY_INVALID", "ONTOLOGY_IMPORT_UNAVAILABLE", "ONTOLOGY_ALREADY_IMPORTED"
resp.status_message #=> String
resp.statistics.number_of_documents_analyzed #=> Integer
resp.statistics.number_of_change_sets_created #=> Integer
resp.statistics.number_of_change_sets_auto_approved #=> Integer
resp.input_configuration.import_data_dictionary.documents #=> Array
resp.input_configuration.import_data_dictionary.documents[0].name #=> String
resp.input_configuration.import_data_dictionary.documents[0].size_bytes #=> Integer
resp.input_configuration.import_data_dictionary.documents[0].content_type #=> String, one of "CSV", "JSON", "YAML", "MARKDOWN", "SQL", "TXT"
resp.input_configuration.import_verified_queries.documents #=> Array
resp.input_configuration.import_verified_queries.documents[0].name #=> String
resp.input_configuration.import_verified_queries.documents[0].size_bytes #=> Integer
resp.input_configuration.import_verified_queries.documents[0].content_type #=> String, one of "CSV", "JSON", "YAML", "MARKDOWN", "SQL", "TXT"
resp.input_configuration.import_ontology.ontologies #=> Array
resp.input_configuration.import_ontology.ontologies[0].ontology_arn #=> String
resp.input_configuration.import_ontology.ontologies[0].ontology_version #=> String
resp.outputs #=> Array
resp.outputs[0].change_set.change_set_id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context, as an ID or ARN.
-
:task_id
(required, String)
—
The ID of the task to return.
Returns:
-
(Types::GetTaskResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #agent_context_id => String
- #type => String
- #status => String
- #description => String
- #created_at => Time
- #updated_at => Time
- #status_reason_code => String
- #status_message => String
- #statistics => Types::TaskStatistics
- #input_configuration => Types::TaskInputConfigurationSummary
- #outputs => Array<Types::TaskOutput>
See Also:
3882 3883 3884 3885 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 3882 def get_task(params = {}, options = {}) req = build_request(:get_task, params) req.send_request(options) end |
#list_agent_contexts(params = {}) ⇒ Types::ListAgentContextsResponse
Lists the agent contexts in your account. A page can hold fewer items
than maxResults, or none, and still return a nextToken. Keep
paging until nextToken is absent.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Example: List agent contexts
Example: List agent contexts
# The following example lists the agent contexts in the account.
resp = client.list_agent_contexts({
max_results: 10,
})
resp.to_h outputs the following:
{
items: [
{
name: "sales-analytics",
arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
created_at: Time.parse("2026-11-02T17:30:00Z"),
description: "Sales pipeline and revenue tables for the analytics agents.",
id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
status: "ACTIVE",
updated_at: Time.parse("2026-11-02T17:42:15Z"),
workforce_sign_in_config: {
status: "DISABLED",
},
},
{
name: "support-knowledge",
arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-8d2b6f1e4a9c4e37b5d0a2c8f6e1b394",
created_at: Time.parse("2026-10-20T09:15:00Z"),
id: "ac-8d2b6f1e4a9c4e37b5d0a2c8f6e1b394",
status: "ACTIVE",
updated_at: Time.parse("2026-10-28T14:05:30Z"),
workforce_sign_in_config: {
status: "DISABLED",
},
},
],
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_agent_contexts({
max_results: 1,
next_token: "PaginationToken",
})
Response structure
Response structure
resp.items #=> Array
resp.items[0].id #=> String
resp.items[0].arn #=> String
resp.items[0].name #=> String
resp.items[0].description #=> String
resp.items[0].status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.items[0].workforce_sign_in_config.status #=> String, one of "ENABLED", "DISABLED"
resp.items[0].workforce_sign_in_config.sign_in_url #=> String
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:max_results
(Integer)
—
Maximum number of results per page (upper bound, not a target). Defaults to 50 when absent. The service might return fewer items.
-
:next_token
(String)
—
Opaque pagination cursor from a prior response. Omit for the first page.
Returns:
-
(Types::ListAgentContextsResponse)
—
Returns a response object which responds to the following methods:
- #items => Array<Types::AgentContextSummary>
- #next_token => String
See Also:
3969 3970 3971 3972 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 3969 def list_agent_contexts(params = {}, options = {}) req = build_request(:list_agent_contexts, params) req.send_request(options) end |
#list_change_set_operations(params = {}) ⇒ Types::ListChangeSetOperationsResponse
Returns what one change set wrote: every operation it holds (the nodes and relationships it adds, updates, or deletes), one page at a time, in order. This is the only read that returns a change set's contents.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Example: List the operations in a change set
Example: List the operations in a change set
# The following example returns the operations in a change set that ontology grounding produced for one table: a link from
# the table to an ontology class, and a link from each of two columns to an ontology property.
resp = client.list_change_set_operations({
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
change_set_id: "cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b",
max_results: 25,
})
resp.to_h outputs the following:
{
items: [
{
put: {
entity: {
edge_id: {
from: "glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_db%2Forders",
to: "iri:https://example.com/ontology/sales%23Order",
},
},
properties: {
"edgeType" => {
string_value: "MAPPED_TO",
},
},
},
},
{
put: {
entity: {
edge_id: {
from: "glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_db%252Forders:order_total",
to: "iri:https://example.com/ontology/sales%23orderTotal",
},
},
properties: {
"edgeType" => {
string_value: "MAPPED_TO",
},
},
},
},
{
put: {
entity: {
edge_id: {
from: "glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_db%252Forders:region_code",
to: "iri:https://example.com/ontology/sales%23salesRegion",
},
},
properties: {
"edgeType" => {
string_value: "MAPPED_TO",
},
},
},
},
],
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_change_set_operations({
change_set_id: "ChangeSetId", # required
agent_context_id: "AgentContextIdentifier", # required
max_results: 1,
next_token: "PaginationToken",
})
Response structure
Response structure
resp.items #=> Array
resp.items[0].put.entity.node_id #=> String
resp.items[0].put.entity.edge_id.from #=> String
resp.items[0].put.entity.edge_id.to #=> String
resp.items[0].put.properties #=> Hash
resp.items[0].put.properties["MetadataKey"].string_value #=> String
resp.items[0].put.properties["MetadataKey"].int_value #=> Integer
resp.items[0].put.properties["MetadataKey"].long_value #=> Integer
resp.items[0].put.properties["MetadataKey"].bool_value #=> Boolean
resp.items[0].put.properties["MetadataKey"].float_value #=> Float
resp.items[0].put.properties["MetadataKey"].double_value #=> Float
resp.items[0].put.properties["MetadataKey"].string_list_value #=> Array
resp.items[0].put.properties["MetadataKey"].string_list_value[0] #=> String
resp.items[0].put.properties["MetadataKey"].int_list_value #=> Array
resp.items[0].put.properties["MetadataKey"].int_list_value[0] #=> Integer
resp.items[0].put.properties["MetadataKey"].long_list_value #=> Array
resp.items[0].put.properties["MetadataKey"].long_list_value[0] #=> Integer
resp.items[0].put.properties["MetadataKey"].float_list_value #=> Array
resp.items[0].put.properties["MetadataKey"].float_list_value[0] #=> Float
resp.items[0].put.properties["MetadataKey"].double_list_value #=> Array
resp.items[0].put.properties["MetadataKey"].double_list_value[0] #=> Float
resp.items[0].put.properties["MetadataKey"].bool_list_value #=> Array
resp.items[0].put.properties["MetadataKey"].bool_list_value[0] #=> Boolean
resp.items[0].update.entity.node_id #=> String
resp.items[0].update.entity.edge_id.from #=> String
resp.items[0].update.entity.edge_id.to #=> String
resp.items[0].update.properties #=> Hash
resp.items[0].update.properties["MetadataKey"].string_value #=> String
resp.items[0].update.properties["MetadataKey"].int_value #=> Integer
resp.items[0].update.properties["MetadataKey"].long_value #=> Integer
resp.items[0].update.properties["MetadataKey"].bool_value #=> Boolean
resp.items[0].update.properties["MetadataKey"].float_value #=> Float
resp.items[0].update.properties["MetadataKey"].double_value #=> Float
resp.items[0].update.properties["MetadataKey"].string_list_value #=> Array
resp.items[0].update.properties["MetadataKey"].string_list_value[0] #=> String
resp.items[0].update.properties["MetadataKey"].int_list_value #=> Array
resp.items[0].update.properties["MetadataKey"].int_list_value[0] #=> Integer
resp.items[0].update.properties["MetadataKey"].long_list_value #=> Array
resp.items[0].update.properties["MetadataKey"].long_list_value[0] #=> Integer
resp.items[0].update.properties["MetadataKey"].float_list_value #=> Array
resp.items[0].update.properties["MetadataKey"].float_list_value[0] #=> Float
resp.items[0].update.properties["MetadataKey"].double_list_value #=> Array
resp.items[0].update.properties["MetadataKey"].double_list_value[0] #=> Float
resp.items[0].update.properties["MetadataKey"].bool_list_value #=> Array
resp.items[0].update.properties["MetadataKey"].bool_list_value[0] #=> Boolean
resp.items[0].delete.entity.node_id #=> String
resp.items[0].delete.entity.edge_id.from #=> String
resp.items[0].delete.entity.edge_id.to #=> String
resp.items[0].delete.properties #=> Hash
resp.items[0].delete.properties["MetadataKey"].string_value #=> String
resp.items[0].delete.properties["MetadataKey"].int_value #=> Integer
resp.items[0].delete.properties["MetadataKey"].long_value #=> Integer
resp.items[0].delete.properties["MetadataKey"].bool_value #=> Boolean
resp.items[0].delete.properties["MetadataKey"].float_value #=> Float
resp.items[0].delete.properties["MetadataKey"].double_value #=> Float
resp.items[0].delete.properties["MetadataKey"].string_list_value #=> Array
resp.items[0].delete.properties["MetadataKey"].string_list_value[0] #=> String
resp.items[0].delete.properties["MetadataKey"].int_list_value #=> Array
resp.items[0].delete.properties["MetadataKey"].int_list_value[0] #=> Integer
resp.items[0].delete.properties["MetadataKey"].long_list_value #=> Array
resp.items[0].delete.properties["MetadataKey"].long_list_value[0] #=> Integer
resp.items[0].delete.properties["MetadataKey"].float_list_value #=> Array
resp.items[0].delete.properties["MetadataKey"].float_list_value[0] #=> Float
resp.items[0].delete.properties["MetadataKey"].double_list_value #=> Array
resp.items[0].delete.properties["MetadataKey"].double_list_value[0] #=> Float
resp.items[0].delete.properties["MetadataKey"].bool_list_value #=> Array
resp.items[0].delete.properties["MetadataKey"].bool_list_value[0] #=> Boolean
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:change_set_id
(required, String)
—
The change set whose operations to page through, by its opaque instance ID.
-
:agent_context_id
(required, String)
—
The agent context that owns the change set, as an ID or ARN. Authorization is on this agent context's ARN, and a change set of another agent context is a ResourceNotFoundException.
-
:max_results
(Integer)
—
Maximum number of operations per page (upper bound, not a target). Defaults to 50. A value outside 1–100 fails with
ValidationException. -
:next_token
(String)
—
The pagination token from a previous response. Omit it for the first page.
The request fails with
ValidationException, and you must start again without a token, in these cases:The token was issued before an
UpdateChangeSetedit, and the change set is stillPENDING.The token was issued while an edited change set was
PENDING, and the change set's status has since changed.The token was issued to another end user or for another change set.
On an
ACL_RESTRICTEDchange set, AWS Context checks access before it reads the token, so a caller without access getsAccessDeniedExceptionwhatever token it sends. For an allowed end user, the token also carries the access decision, which expires after a few minutes. AWS Context then checks access again before it returns the page.
Returns:
-
(Types::ListChangeSetOperationsResponse)
—
Returns a response object which responds to the following methods:
- #items => Array<Types::ChangeSetOperation>
- #next_token => String
See Also:
4168 4169 4170 4171 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 4168 def list_change_set_operations(params = {}, options = {}) req = build_request(:list_change_set_operations, params) req.send_request(options) end |
#list_change_sets(params = {}) ⇒ Types::ListChangeSetsResponse
Lists an agent context's change sets that have the specified
status, newest first. Each item is a summary of the change set,
without its operations. To see what a change set wrote, call
ListChangeSetOperations with its id as changeSetId.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Example: List published change sets
Example: List published change sets
# The following example lists an agent context's published change sets, newest first, two per page.
resp = client.list_change_sets({
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
max_results: 2,
status: "PUBLISHED",
})
resp.to_h outputs the following:
{
items: [
{
access_control: "NO_ACL",
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
created_at: Time.parse("2026-11-20T16:02:55Z"),
generated_by: "DATA_SOURCE_INGESTION",
id: "cs-9c1e3a5b7d0f4b2d6e8a0c2f4b6d8e1a",
status: "PUBLISHED",
updated_at: Time.parse("2026-11-20T16:02:56Z"),
},
{
access_control: "ACL_RESTRICTED",
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
created_at: Time.parse("2026-11-16T03:00:04Z"),
generated_by: "DIRECT_MODIFICATION",
id: "cs-7b9d1f3a5c6e4a8b0d2f4a6c8e0b1d3f",
status: "PUBLISHED",
updated_at: Time.parse("2026-11-16T03:00:06Z"),
},
],
next_token: "AgV4EXAMPLEnextTokenListChangeSets0001",
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_change_sets({
agent_context_id: "AgentContextIdentifier", # required
status: "DRAFT", # required, accepts DRAFT, PENDING, AUTHORIZED, SUPPRESSED, PUBLISHED, FAILED
access_control: "ACL_RESTRICTED", # accepts ACL_RESTRICTED, NO_ACL
generated_by: "DATA_SOURCE_EXTRACTION", # accepts DATA_SOURCE_EXTRACTION, DATA_SOURCE_INGESTION, ENTITY_RESOLUTION, ONTOLOGY_GROUNDING, TRACE_ANALYSIS, IMPORT_DATA_DICTIONARY_TASK, IMPORT_VERIFIED_QUERIES_TASK, IMPORT_ONTOLOGY_TASK, DIRECT_MODIFICATION
max_results: 1,
next_token: "PaginationToken",
})
Response structure
Response structure
resp.items #=> Array
resp.items[0].agent_context_id #=> String
resp.items[0].status #=> String, one of "DRAFT", "PENDING", "AUTHORIZED", "SUPPRESSED", "PUBLISHED", "FAILED"
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.items[0].access_control #=> String, one of "ACL_RESTRICTED", "NO_ACL"
resp.items[0].generated_by #=> String, one of "DATA_SOURCE_EXTRACTION", "DATA_SOURCE_INGESTION", "ENTITY_RESOLUTION", "ONTOLOGY_GROUNDING", "TRACE_ANALYSIS", "IMPORT_DATA_DICTIONARY_TASK", "IMPORT_VERIFIED_QUERIES_TASK", "IMPORT_ONTOLOGY_TASK", "DIRECT_MODIFICATION"
resp.items[0].status_reason.code #=> String, one of "REQUEST_EXPIRED", "CONNECTION_REMOVED"
resp.items[0].status_reason.message #=> String
resp.items[0].id #=> String
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context whose change sets you want to list, by its ID or ARN.
-
:status
(required, String)
—
The status of the change sets to list, for example
PUBLISHED. Required. A request lists one status, so to list several statuses, make one request for each. If you specify a value that isn't listed, the request fails withValidationException. -
:access_control
(String)
—
The
accessControlvalue to list change sets for. If you omit it, every change set in the status is listed, each with itsaccessControl. If you specify a value that isn't listed, the request fails withValidationException.Valid values:
ACL_RESTRICTED- Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal'stitlenames no nodes or edges.NO_ACL- Every caller can read the content.
-
:generated_by
(String)
—
The activity that generated the change sets to list, for example
ENTITY_RESOLUTION. If you omit it, change sets from every activity are listed. If you specify a value that isn't listed, the request fails withValidationException. A change set without ageneratedBy, for example one that AWS Context wrote when it loaded an ontology's schema, matches no value.Valid values:
DATA_SOURCE_EXTRACTION- AWS Context extracted the content from a connected data source with a model, for example from the documents of an Amazon Bedrock knowledge base.DATA_SOURCE_INGESTION- AWS Context ingested content from a connected data source as a repeatable projection of the source, such as an AWS Glue Data Catalog sync.ENTITY_RESOLUTION- AWS Context merged duplicate entities into one canonical entity.ONTOLOGY_GROUNDING- AWS Context linked an ontology class to the data entities that instantiate it.TRACE_ANALYSIS- AWS Context derived skills and instructions from recorded agent sessions.IMPORT_DATA_DICTIONARY_TASK- AnIMPORT_DATA_DICTIONARYtask wrote the content. Change sets from earlierIMPORT_VERIFIED_QUERIEStasks can also carry this value.IMPORT_VERIFIED_QUERIES_TASK- AnIMPORT_VERIFIED_QUERIEStask wrote the content.IMPORT_ONTOLOGY_TASK- AnIMPORT_ONTOLOGYtask imported an ontology.DIRECT_MODIFICATION- A person, an agent, or an application calledCreateChangeSetdirectly.
-
:max_results
(Integer)
—
Maximum number of results per page (upper bound, not a target). The service might return fewer.
-
:next_token
(String)
—
Opaque pagination cursor from a prior response. Omit for the first page.
Returns:
-
(Types::ListChangeSetsResponse)
—
Returns a response object which responds to the following methods:
- #items => Array<Types::ChangeSetSummary>
- #next_token => String
See Also:
4323 4324 4325 4326 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 4323 def list_change_sets(params = {}, options = {}) req = build_request(:list_change_sets, params) req.send_request(options) end |
#list_connections(params = {}) ⇒ Types::ListConnectionsResponse
Lists the connections in your account, most recently updated first.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Example: List connections
Example: List connections
# The following example lists the connections in the account, most recently updated first.
resp = client.list_connections({
max_results: 10,
})
resp.to_h outputs the following:
{
items: [
{
name: "sales-analytics",
type: "GLUE_DATA_CATALOG",
arn: "arn:aws:context:us-east-1:111122223333:connection/conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b",
created_at: Time.parse("2026-11-02T17:30:00Z"),
data_source: {
type: "GLUE_DATA_CATALOG",
location: {
arn: "arn:aws:glue:us-east-1:111122223333:catalog",
},
},
id: "conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b",
scope: {
selectors: [
{
path: [
{
id: "arn:aws:glue:us-east-1:111122223333:catalog",
level: "glueCatalog",
},
{
id: "sales_db",
level: "glueDatabase",
},
],
},
],
},
status: "ACTIVE",
updated_at: Time.parse("2026-11-02T17:30:00Z"),
},
{
name: "support-knowledge-base",
type: "BEDROCK_KNOWLEDGE_BASE",
arn: "arn:aws:context:us-east-1:111122223333:connection/conn-c9d0e1f2a3b44c5d9e6f7a8b9c0d1e2f",
created_at: Time.parse("2026-10-20T09:15:00Z"),
data_source: {
type: "BEDROCK_KNOWLEDGE_BASE",
location: {
arn: "arn:aws:bedrock:us-east-1:111122223333:knowledge-base/KBEXAMPLE1",
},
},
id: "conn-c9d0e1f2a3b44c5d9e6f7a8b9c0d1e2f",
status: "ACTIVE",
updated_at: Time.parse("2026-10-20T09:15:00Z"),
},
],
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_connections({
max_results: 1,
next_token: "PaginationToken",
})
Response structure
Response structure
resp.items #=> Array
resp.items[0].id #=> String
resp.items[0].arn #=> String
resp.items[0].name #=> String
resp.items[0].type #=> String, one of "GLUE_DATA_CATALOG", "BEDROCK_KNOWLEDGE_BASE", "DATABRICKS", "SNOWFLAKE"
resp.items[0].status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.items[0].data_source.type #=> String, one of "GLUE_DATA_CATALOG", "BEDROCK_KNOWLEDGE_BASE", "DATABRICKS", "SNOWFLAKE"
resp.items[0].data_source.location.arn #=> String
resp.items[0].scope.selectors #=> Array
resp.items[0].scope.selectors[0].path #=> Array
resp.items[0].scope.selectors[0].path[0].level #=> String
resp.items[0].scope.selectors[0].path[0].id #=> String
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:max_results
(Integer)
—
Maximum number of results per page (upper bound, not a target). Defaults to 50 when absent. The service might return fewer items.
-
:next_token
(String)
—
Opaque pagination cursor from a prior response. Omit for the first page.
Returns:
-
(Types::ListConnectionsResponse)
—
Returns a response object which responds to the following methods:
- #items => Array<Types::ConnectionSummary>
- #next_token => String
See Also:
4435 4436 4437 4438 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 4435 def list_connections(params = {}, options = {}) req = build_request(:list_connections, params) req.send_request(options) end |
#list_curation_policies(params = {}) ⇒ Types::ListCurationPoliciesResponse
Lists the curation policies in your account, or the ones associated
with an agent context. Each item is a summary without the policy
document. GetCurationPolicy returns the document. If agentContextId
doesn't name an agent context in your account, the operation returns
an empty page instead of an error.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Example: List the curation policies in your account
Example: List the curation policies in your account
# The following example lists the curation policies in the account, one published and one still a draft.
resp = client.list_curation_policies({
max_results: 10,
})
resp.to_h outputs the following:
{
items: [
{
name: "hold-trace-analysis-changes",
arn: "arn:aws:context:us-east-1:111122223333:curation-policy/pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
auto_reject_after_seconds: 604800,
created_at: Time.parse("2026-03-10T16:20:00Z"),
id: "pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
last_published_version: "1",
revision_id: "e3a5c7b9-1d4f-4b6a-8c2e-9f0b1d3a5c7e",
status: "ACTIVE",
updated_at: Time.parse("2026-03-10T16:45:00Z"),
},
{
name: "hold-ontology-changes",
arn: "arn:aws:context:us-east-1:111122223333:curation-policy/pol-9b2d4f6a8c0e4b1d3f5a7c9e1b3d5f7a",
created_at: Time.parse("2026-02-02T11:05:00Z"),
id: "pol-9b2d4f6a8c0e4b1d3f5a7c9e1b3d5f7a",
revision_id: "2c9b7e1a-4d3f-4a8b-b6c5-1e0f9d8c7b6a",
status: "DRAFT",
updated_at: Time.parse("2026-02-02T11:05:00Z"),
},
],
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_curation_policies({
agent_context_id: "AgentContextIdentifier",
status: "DRAFT", # accepts DRAFT, ACTIVE
max_results: 1,
next_token: "PaginationToken",
})
Response structure
Response structure
resp.items #=> Array
resp.items[0].id #=> String
resp.items[0].arn #=> String
resp.items[0].name #=> String
resp.items[0].last_published_version #=> String
resp.items[0].revision_id #=> String
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.items[0].auto_reject_after_seconds #=> Integer
resp.items[0].status #=> String, one of "DRAFT", "ACTIVE", "DELETED"
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(String)
—
The agent context whose associated policies you want to list, by its ID or ARN. If you omit it, every policy in your account is listed.
-
:status
(String)
—
Return only policies with this status. If you omit it, policies in both statuses are returned.
Valid values:
DRAFT- Policies that have never been published.ACTIVE- Policies with a published version.
-
:max_results
(Integer)
—
Maximum number of results per page (upper bound, not a target). The service might return fewer. Defaults to 50. A value outside 1–100 fails with
ValidationException. -
:next_token
(String)
—
Opaque pagination cursor from a prior response. Omit for the first page.
Returns:
-
(Types::ListCurationPoliciesResponse)
—
Returns a response object which responds to the following methods:
- #items => Array<Types::CurationPolicySummary>
- #next_token => String
See Also:
4538 4539 4540 4541 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 4538 def list_curation_policies(params = {}, options = {}) req = build_request(:list_curation_policies, params) req.send_request(options) end |
#list_curation_proposals(params = {}) ⇒ Types::ListCurationProposalsResponse
Lists an agent context's curation proposals, newest first. A curation proposal holds a change to the agent context for review.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Example: List the curation proposals waiting for review
Example: List the curation proposals waiting for review
# The following example lists the curation proposals of an agent context that are waiting for a curator's decision, newest
# first.
resp = client.list_curation_proposals({
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
max_results: 25,
status: "PENDING_REVIEW",
})
resp.to_h outputs the following:
{
items: [
{
access_control: "NO_ACL",
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
change_set_id: "cs-8e1f3a5c7b9d4e2f6a0c1b3d5e7f9a2b",
created_at: Time.parse("2026-11-18T14:05:13Z"),
expires_at: Time.parse("2026-11-25T14:05:13Z"),
generated_by: "DATA_SOURCE_INGESTION",
id: "cp-dc0af01d4ca5847e27d63a3e30a0c9c6",
revision_id: "7f3c2a1e-9b4d-4e6f-8a0c-2d5e7b9f1a3c",
status: "PENDING_REVIEW",
title: "Update 'orders' and 2 more entities, and 3 relationships",
updated_at: Time.parse("2026-11-18T14:05:13Z"),
},
{
access_control: "NO_ACL",
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
change_set_id: "cs-2d4f6a8c0e1b3d5f7a9c1e3b5d7f9a0c",
created_at: Time.parse("2026-11-17T22:41:31Z"),
expires_at: Time.parse("2026-11-24T22:41:31Z"),
generated_by: "DATA_SOURCE_INGESTION",
id: "cp-1331654b3cbad6b265e09a4588a4e32f",
revision_id: "c4e6a8b0-2d1f-4a3c-9e5b-7d9f1b3a5c7e",
status: "PENDING_REVIEW",
title: "Update 'customers' and 1 more entity, and 1 relationship",
updated_at: Time.parse("2026-11-17T22:41:31Z"),
},
],
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_curation_proposals({
agent_context_id: "AgentContextIdentifier", # required
status: "PENDING_REVIEW", # required, accepts PENDING_REVIEW, APPROVED, REJECTED, SUPERSEDED, FAILED, PUBLISHING, ARCHIVED
access_control: "ACL_RESTRICTED", # accepts ACL_RESTRICTED, NO_ACL
max_results: 1,
next_token: "PaginationToken",
})
Response structure
Response structure
resp.items #=> Array
resp.items[0].change_set_id #=> String
resp.items[0].title #=> String
resp.items[0].generated_by #=> String, one of "DATA_SOURCE_EXTRACTION", "DATA_SOURCE_INGESTION", "ENTITY_RESOLUTION", "ONTOLOGY_GROUNDING", "TRACE_ANALYSIS", "IMPORT_DATA_DICTIONARY_TASK", "IMPORT_VERIFIED_QUERIES_TASK", "IMPORT_ONTOLOGY_TASK", "DIRECT_MODIFICATION"
resp.items[0].revision_id #=> String
resp.items[0].status #=> String, one of "PENDING_REVIEW", "APPROVED", "REJECTED", "SUPERSEDED", "FAILED", "PUBLISHING", "ARCHIVED"
resp.items[0].status_reason_code #=> String, one of "REQUEST_EXPIRED", "CONNECTION_REMOVED"
resp.items[0].access_control #=> String, one of "ACL_RESTRICTED", "NO_ACL"
resp.items[0].agent_context_id #=> String
resp.items[0].expires_at #=> Time
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.items[0].status_reason.code #=> String, one of "REQUEST_EXPIRED", "CONNECTION_REMOVED"
resp.items[0].status_reason.message #=> String
resp.items[0].id #=> String
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context whose proposals you want to list, by its ID or ARN.
-
:status
(required, String)
—
The status to scope the queue to, for example, PENDING_REVIEW for the review queue. Required: a request lists one status, so list each status you want in its own request.
Valid values:
PENDING_REVIEW- Waiting for a curator's decision. The only status Accept and Reject act on.APPROVED- A curator accepted it. Its change set is published or publishing.REJECTED- Closed without applying its change set: a curator rejected it, or the service did when a holding policy's review window passed with no decision (statusReasonCodeREQUEST_EXPIRED).SUPERSEDED- A newer proposal for the same document replaced it.FAILED- The proposal was accepted, but publishing its change set failed. This status is final. To apply the change, submit it again.PUBLISHING- Accepted and publishing asynchronously (an ontology-schema publish). The status then changes to APPROVED or FAILED.ARCHIVED- The connection that produced it was removed from the agent context.statusReason.codeis CONNECTION_REMOVED.
-
:access_control
(String)
—
The
accessControlvalue to list proposals for. If you omit it, every proposal in the status is listed, each with itsaccessControl. If you specify a value that isn't listed, the request fails withValidationException.Valid values:
ACL_RESTRICTED- Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal'stitlenames no nodes or edges.NO_ACL- Every caller can read the content.
-
:max_results
(Integer)
—
Maximum number of results per page (upper bound, not a target). The service might return fewer. Defaults to 50. A value outside 1–100 fails with
ValidationException. -
:next_token
(String)
—
Opaque pagination cursor from a prior response. Omit for the first page.
Returns:
-
(Types::ListCurationProposalsResponse)
—
Returns a response object which responds to the following methods:
- #items => Array<Types::CurationProposalSummary>
- #next_token => String
See Also:
4687 4688 4689 4690 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 4687 def list_curation_proposals(params = {}, options = {}) req = build_request(:list_curation_proposals, params) req.send_request(options) end |
#list_ontologies(params = {}) ⇒ Types::ListOntologiesResponse
Lists the ontologies in your account, with the status of each.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Example: List ontologies
Example: List ontologies
# The following example lists the ontologies in the account: one created with CreateOntology and one created by an
# ontology induction and then published.
resp = client.list_ontologies({
max_results: 50,
})
resp.to_h outputs the following:
{
items: [
{
name: "product-catalog",
arn: "arn:aws:context:us-east-1:111122223333:ontology/ont-2c4e6a8b0d1f4a3c5e7a9b1d3f5a7c9e",
default_version: "1.0.0",
edge_type_count: 3,
id: "ont-2c4e6a8b0d1f4a3c5e7a9b1d3f5a7c9e",
node_type_count: 4,
ontology_induction_id: "oi-2c4e6a8b0d1f4a3c5e7a9b1d3f5a7c9e",
published_at: Time.parse("2026-11-01T08:30:00Z"),
status: "PUBLISHED",
updated_at: Time.parse("2026-11-01T08:30:00Z"),
},
{
name: "sales-analytics",
arn: "arn:aws:context:us-east-1:111122223333:ontology/ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d",
default_version: "1.0.0",
description: "Customers and the orders they place.",
edge_type_count: 1,
id: "ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d",
node_type_count: 2,
published_at: Time.parse("2026-11-02T17:45:10Z"),
status: "PUBLISHED",
updated_at: Time.parse("2026-11-02T17:45:10Z"),
},
],
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_ontologies({
max_results: 1,
next_token: "PaginationToken",
})
Response structure
Response structure
resp.items #=> Array
resp.items[0].id #=> String
resp.items[0].arn #=> String
resp.items[0].name #=> String
resp.items[0].description #=> String
resp.items[0].status #=> String, one of "DRAFT", "PUBLISHED"
resp.items[0].updated_at #=> Time
resp.items[0].ontology_induction_id #=> String
resp.items[0].default_version #=> String
resp.items[0].published_at #=> Time
resp.items[0].node_type_count #=> Integer
resp.items[0].edge_type_count #=> Integer
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:max_results
(Integer)
—
The maximum number of ontology summaries to return in one page, 1–100. Defaults to 50. A value outside this range fails with ValidationException. AWS Context doesn't clamp it.
-
:next_token
(String)
—
Opaque continuation token from a prior response's nextToken. Omit on the first page.
Returns:
-
(Types::ListOntologiesResponse)
—
Returns a response object which responds to the following methods:
- #items => Array<Types::OntologySummary>
- #next_token => String
See Also:
4777 4778 4779 4780 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 4777 def list_ontologies(params = {}, options = {}) req = build_request(:list_ontologies, params) req.send_request(options) end |
#list_ontology_inductions(params = {}) ⇒ Types::ListOntologyInductionsResponse
Lists the ontology inductions in your account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Example: List ontology inductions
Example: List ontology inductions
# The following example lists the ontology inductions in the account: one that created a DRAFT ontology and one that was
# cancelled.
resp = client.list_ontology_inductions({
max_results: 50,
})
resp.to_h outputs the following:
{
items: [
{
arn: "arn:aws:context:us-east-1:111122223333:ontology-induction/oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b",
created_at: Time.parse("2026-11-04T16:20:05Z"),
id: "oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b",
ontology_arn: "arn:aws:context:us-east-1:111122223333:ontology/ont-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b",
ontology_description: "Books, authors, members, and loans for a lending library.",
ontology_id: "ont-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b",
ontology_name: "library-catalog",
status: "DRAFT",
updated_at: Time.parse("2026-11-04T16:23:41Z"),
},
{
arn: "arn:aws:context:us-east-1:111122223333:ontology-induction/oi-9e8d7c6b5a4f4e3d8c2b1a0f9e8d7c6b",
created_at: Time.parse("2026-11-03T09:12:44Z"),
id: "oi-9e8d7c6b5a4f4e3d8c2b1a0f9e8d7c6b",
ontology_name: "support-tickets",
status: "CANCELLED",
updated_at: Time.parse("2026-11-03T09:13:44Z"),
},
],
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_ontology_inductions({
max_results: 1,
next_token: "PaginationToken",
})
Response structure
Response structure
resp.items #=> Array
resp.items[0].id #=> String
resp.items[0].arn #=> String
resp.items[0].ontology_name #=> String
resp.items[0].ontology_description #=> String
resp.items[0].ontology_id #=> String
resp.items[0].ontology_arn #=> String
resp.items[0].status #=> String, one of "INDUCING", "DRAFT", "FAILED", "CANCELLED"
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:max_results
(Integer)
—
The maximum number of inductions to return in one page, from 1 to 100. Defaults to 50.
-
:next_token
(String)
—
Opaque continuation token from a prior response's nextToken. Omit on the first page.
Returns:
-
(Types::ListOntologyInductionsResponse)
—
Returns a response object which responds to the following methods:
- #items => Array<Types::OntologyInductionSummary>
- #next_token => String
See Also:
4859 4860 4861 4862 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 4859 def list_ontology_inductions(params = {}, options = {}) req = build_request(:list_ontology_inductions, params) req.send_request(options) end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns the tags on an agent context, connection, curation policy, customer-owned ontology, or ontology induction.
Examples:
Example: List the tags on an agent context
Example: List the tags on an agent context
# The following example lists the tags on the agent context ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d.
resp = client.list_tags_for_resource({
resource_arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d",
})
resp.to_h outputs the following:
{
tags: {
"environment" => "production",
"team" => "sales-analytics",
},
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_tags_for_resource({
resource_arn: "TaggableResourceArn", # required
})
Response structure
Response structure
resp.tags #=> Hash
resp.tags["TagKey"] #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:resource_arn
(required, String)
—
The ARN of the resource whose tags you want to list.
Returns:
See Also:
4906 4907 4908 4909 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 4906 def list_tags_for_resource(params = {}, options = {}) req = build_request(:list_tags_for_resource, params) req.send_request(options) end |
#list_tasks(params = {}) ⇒ Types::ListTasksResponse
Lists an agent context's tasks, newest first.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Example: List the tasks of an agent context
Example: List the tasks of an agent context
# The following example lists the tasks of an agent context, newest first.
resp = client.list_tasks({
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
max_results: 10,
})
resp.to_h outputs the following:
{
items: [
{
type: "IMPORT_ONTOLOGY",
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53/task/task-91d4a7e2c3b84f6a9e1d5c7b2a8f0e46",
created_at: Time.parse("2026-11-21T09:15:30Z"),
id: "task-91d4a7e2c3b84f6a9e1d5c7b2a8f0e46",
statistics: {
number_of_change_sets_auto_approved: 0,
number_of_change_sets_created: 0,
},
status: "FAILED",
status_message: "Imported 0 of 1 ontologies. Failed: arn:aws:context:us-east-1:111122223333:ontology/ont-5b8e1f4a9c2d4e7fb3a6c0d9e8f1a274 (this ontology version is already imported into the graph)",
status_reason_code: "ONTOLOGY_ALREADY_IMPORTED",
updated_at: Time.parse("2026-11-21T09:16:02Z"),
},
{
type: "IMPORT_DATA_DICTIONARY",
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53/task/task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364",
created_at: Time.parse("2026-11-20T17:42:05Z"),
description: "Import the sales data dictionary",
id: "task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364",
statistics: {
number_of_change_sets_auto_approved: 0,
number_of_change_sets_created: 2,
},
status: "COMPLETED",
updated_at: Time.parse("2026-11-20T17:48:51Z"),
},
],
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_tasks({
agent_context_id: "AgentContextIdentifier", # required
status: "PENDING", # accepts PENDING, IN_PROGRESS, COMPLETED, FAILED, CANCELLING, CANCELLED
type: "IMPORT_DATA_DICTIONARY", # accepts IMPORT_DATA_DICTIONARY, IMPORT_VERIFIED_QUERIES, IMPORT_ONTOLOGY
max_results: 1,
next_token: "PaginationToken",
})
Response structure
Response structure
resp.items #=> Array
resp.items[0].id #=> String
resp.items[0].arn #=> String
resp.items[0].agent_context_id #=> String
resp.items[0].type #=> String, one of "IMPORT_DATA_DICTIONARY", "IMPORT_VERIFIED_QUERIES", "IMPORT_ONTOLOGY"
resp.items[0].status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "FAILED", "CANCELLING", "CANCELLED"
resp.items[0].description #=> String
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.items[0].status_reason_code #=> String, one of "GRAPH_NOT_ACTIVE", "ONTOLOGY_INVALID", "ONTOLOGY_IMPORT_UNAVAILABLE", "ONTOLOGY_ALREADY_IMPORTED"
resp.items[0].status_message #=> String
resp.items[0].statistics.number_of_documents_analyzed #=> Integer
resp.items[0].statistics.number_of_change_sets_created #=> Integer
resp.items[0].statistics.number_of_change_sets_auto_approved #=> Integer
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context, as an ID or ARN.
-
:status
(String)
—
Specify a status to list only the tasks with that status.
-
:type
(String)
—
Specify a type to list only the tasks of that type.
-
:max_results
(Integer)
—
The maximum number of tasks to return in one page, from 1–100. The service can return fewer. Defaults to 20. A value outside 1–100 fails with
ValidationException. -
:next_token
(String)
—
The pagination token from a previous ListTasks response. Omit it for the first page, and keep the
statusandtypefilters the same on every page.
Returns:
-
(Types::ListTasksResponse)
—
Returns a response object which responds to the following methods:
- #items => Array<Types::TaskSummary>
- #next_token => String
See Also:
5016 5017 5018 5019 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 5016 def list_tasks(params = {}, options = {}) req = build_request(:list_tasks, params) req.send_request(options) end |
#put_resource_policy(params = {}) ⇒ Types::PutResourcePolicyResponse
Attaches a resource-based policy to an agent context, or replaces the one it has. The policy controls which other accounts can call operations on the agent context. Returns the policy's revision ID.
Examples:
Example: Attach a resource-based policy to an agent context
Example: Attach a resource-based policy to an agent context
# The following example lets account 444455556666 also get an agent context, in addition to searching and traversing it,
# replacing the policy at the revision that GetResourcePolicy returned.
resp = client.put_resource_policy({
expected_revision_id: "3c7e1a9f-2b4d-4e6a-8f0c-5d9b1e3a7c2f",
policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"AllowAnalyticsAccountRead\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::444455556666:root\"},\"Action\":[\"context:GetAgentContext\",\"context:SearchAgentContext\",\"context:TraverseAgentContext\"],\"Resource\":\"arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53\"}]}",
resource_arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
})
resp.to_h outputs the following:
{
resource_arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
revision_id: "9a4f2c6e-1d8b-4b3a-a7e5-0c2d6f8b1e49",
}
Example: Put a policy with a stale revision ID, which fails with ConflictException
Example: Put a policy with a stale revision ID, which fails with ConflictException
# The following example shows the ConflictException returned when expectedRevisionId doesn't match the stored revision
# because another writer changed the policy first.
resp = client.put_resource_policy({
expected_revision_id: "3c7e1a9f-2b4d-4e6a-8f0c-5d9b1e3a7c2f",
policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"AllowAnalyticsAccountRead\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::444455556666:root\"},\"Action\":[\"context:SearchAgentContext\",\"context:TraverseAgentContext\"],\"Resource\":\"arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53\"}]}",
resource_arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
})
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.put_resource_policy({
resource_arn: "ResourcePolicyResourceArn", # required
policy: "ResourcePolicy", # required
expected_revision_id: "RevisionId",
})
Response structure
Response structure
resp.resource_arn #=> String
resp.revision_id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:resource_arn
(required, String)
—
ARN of the agent context to attach the policy to.
-
:policy
(required, String)
—
The resource-based policy document.
SDK automatically handles json encoding and base64 encoding for you when the required value (Hash, Array, etc.) is provided according to the description.
-
:expected_revision_id
(String)
—
The revision that you last read. The write succeeds only if it matches the stored revision.
Returns:
-
(Types::PutResourcePolicyResponse)
—
Returns a response object which responds to the following methods:
- #resource_arn => String
- #revision_id => String
See Also:
5090 5091 5092 5093 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 5090 def put_resource_policy(params = {}, options = {}) req = build_request(:put_resource_policy, params) req.send_request(options) end |
#put_trace(params = {}) ⇒ Types::PutTraceResponse
Submits an agent's execution traces so that AWS Context can extract
reusable knowledge and skills from them. Call it when an agent
finishes a task or session that is worth learning from. In
agentContextArns, name the agent contexts that the traces are about.
AWS Context analyzes the traces for each of them.
Each traceDocuments entry is one raw trace document in the trace
schema that format selects. You can send 1–100 documents per call.
Each document can be up to 5 MiB before encoding. If you use an AWS
SDK, pass each document's raw bytes. If you call PutTrace through the
agent context's MCP server or another JSON client, send each document
as a base64-encoded string. To send a larger trace, split it across
calls that share a sessionId.
sessionId groups related calls into one session. If you omit it, AWS
Context generates one and returns it in the response so that you can
reuse it.
Each agent context can hold up to 100,000 trace documents. If a
request would exceed this quota, it fails with
ServiceQuotaExceededException, and AWS Context stores no documents.
If a request fails for any other reason, AWS Context might have stored
some of its documents. To store the rest without duplicates, retry
with the same clientToken.
Examples:
Example: Submit agent traces for analysis
Example: Submit agent traces for analysis
# The following example submits two Amazon Bedrock Converse messages from one agent session so that AWS Context can learn
# from them.
resp = client.put_trace({
access_control_config: {
access_control_list: [
{
access: "ALLOW",
principal_id: "*",
},
],
},
agent_context_arns: [
"arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
],
client_token: "9e4b2d7c-1a5f-4c38-b6e0-2f8d3a7c1b95",
format: "BEDROCK_CONVERSE",
session_id: "sales-analytics-session-0142",
trace_documents: [
"eyJyb2xlIjoidXNlciIsImNvbnRlbnQiOlt7InRleHQiOiJXaGF0IHdlcmUgdG90YWwgc2FsZXMgaW4gdGhlIFdlc3QgcmVnaW9uIGxhc3QgcXVhcnRlcj8ifV19",
"eyJyb2xlIjoiYXNzaXN0YW50IiwiY29udGVudCI6W3sidGV4dCI6IlRvdGFsIHNhbGVzIGluIHRoZSBXZXN0IHJlZ2lvbiBmb3IgUTMgMjAyNiB3ZXJlIDQuMiBtaWxsaW9uIFVTRCwgZnJvbSBzYWxlcy5vcmRlcnMgZmlsdGVyZWQgb24gcmVnaW9uX2NvZGUgV0UuIn1dfQ==",
],
trace_metadata: {
"agentName" => "sales-analytics-agent",
"agentVersion" => "1.4.0",
},
})
resp.to_h outputs the following:
{
session_id: "sales-analytics-session-0142",
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.put_trace({
session_id: "SessionId",
client_token: "ClientToken",
format: "OTEL", # required, accepts OTEL, ANTHROPIC, BEDROCK_CONVERSE, KIRO
trace_documents: ["data"], # required
agent_context_arns: ["AgentContextArnString"], # required
trace_metadata: {
"TraceMetadataKey" => "TraceMetadataValue",
},
access_control_config: {
access_control_list: [
{
access: "ALLOW", # required, accepts ALLOW, DENY
principal_id: "PrincipalId", # required
principal_type: "USER", # accepts USER, GROUP
},
],
},
})
Response structure
Response structure
resp.session_id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:session_id
(String)
—
The agent session this trace belongs to and the grouping key: multiple PutTrace calls with the same
sessionIdare one session. Optional. If you omit it, the service generates one and returns it in the response. It is not thetraceId: an OTLP batch carries many trace_ids under one session. -
:client_token
(String)
—
Makes the call idempotent. A retry with the same token and the same request returns the same
sessionIdand does not write the traces again. Reusing the token fails withValidationExceptionif the request is different, or if another caller reuses it whenaccessControlConfignames no entries. A token is honored for 8 hours after its first use. WhenaccessControlConfignames no entries and the caller's end user cannot be resolved at the time of the retry, the retry fails withValidationExceptioneven if the first attempt stored traces. To complete them, resend with explicit entries under a new token.A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:format
(required, String)
—
The format of the documents in
traceDocuments. Valid values:OTEL- OpenTelemetry traces in OTLP/JSON.ANTHROPIC- Claude Code session logs, one log line per document.BEDROCK_CONVERSE- Amazon Bedrock Converse messages, one message (roleandcontent) per document, in conversation order.KIRO- Kiro IDE or Kiro CLI session logs.
-
:trace_documents
(required, Array<String, StringIO, File>)
—
The raw trace documents, in the trace schema that
formatselects. You can send 1–100 documents per call, and each document can be up to 5 MiB (5,242,880 bytes) before encoding. If you use an AWS SDK, pass each document's raw bytes. If you call PutTrace through the agent context's MCP server or another JSON client, send each document as a base64-encoded string. -
:agent_context_arns
(required, Array<String>)
—
The ARNs of the agent contexts that the traces are about: 1–10
agent-context/ARNs that name at most 5 distinct agent contexts, in this Region and partition, all in your account. If you name more, the request fails withValidationException. AWS Context authorizescontext:PutTraceonce for each agent context. If any authorization is denied, the whole call fails withAccessDeniedException, and nothing is stored. After authorization, if trace analysis is disabled for an agent context, the call fails withValidationException, and nothing is stored. -
:trace_metadata
(Hash<String,String>)
—
Client-supplied key-value pairs, stored with the traces as-is. The key
analysisModeis reserved. A request that sets it fails withAccessDeniedException. -
:access_control_config
(Types::AccessControlConfig)
—
The principals who can see the insights that AWS Context generates from the traces. If you provide entries, the caller is not included unless an entry names it.
If you provide no entries (
accessControlConfigabsent, oraccessControlListabsent or empty), only the end user that the caller's trusted identity propagation session names can see the insights. If the session names no end user, or there is no session, the call fails withValidationExceptionand stores nothing. In that case, name the principals, or sendALLOWfor*so that every reader of the agent contexts can see the insights.An entry other than
*withoutprincipalType, aprincipalIdthat is not valid Unicode, or entries that total more than 65,536 bytes of UTF-8 are rejected withValidationException. AWS Context stores principal IDs as given and does not verify them against a directory. A session's access control is the union of its traces' entries. A call that would take that union over 100 entries, or over 65,536 bytes of UTF-8, fails withValidationExceptionand stores nothing.
Returns:
-
(Types::PutTraceResponse)
—
Returns a response object which responds to the following methods:
- #session_id => String
See Also:
5269 5270 5271 5272 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 5269 def put_trace(params = {}, options = {}) req = build_request(:put_trace, params) req.send_request(options) end |
#reject_curation_proposal(params = {}) ⇒ Types::RejectCurationProposalResponse
Rejects a curation proposal. Its change is not applied to the agent context.
Examples:
Example: Reject a curation proposal
Example: Reject a curation proposal
# The following example rejects a curation proposal that is waiting for review, so AWS Context doesn't apply its change
# set to the agent context.
resp = client.reject_curation_proposal({
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
client_token: "8a1c3e5b-7d9f-4b2d-a6c8-0e2f4a6b8d1c",
curation_proposal_id: "cp-1331654b3cbad6b265e09a4588a4e32f",
revision_id: "c4e6a8b0-2d1f-4a3c-9e5b-7d9f1b3a5c7e",
})
resp.to_h outputs the following:
{
access_control: "NO_ACL",
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
change_set_id: "cs-2d4f6a8c0e1b3d5f7a9c1e3b5d7f9a0c",
created_at: Time.parse("2026-11-17T22:41:31Z"),
generated_by: "DATA_SOURCE_INGESTION",
id: "cp-1331654b3cbad6b265e09a4588a4e32f",
revision_id: "f2b4d6a8-0c1e-4f3a-b5d7-9e1a3c5f7b9d",
status: "REJECTED",
title: "Update 'customers' and 1 more entity, and 1 relationship",
triggering_policies: [
{
policy_id: "pol-6b8d0f2a4c1e4b7d9a3c5e7f1b3d5a8c",
},
],
updated_at: Time.parse("2026-11-19T09:12:07Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.reject_curation_proposal({
curation_proposal_id: "CurationProposalId", # required
agent_context_id: "AgentContextIdentifier", # required
revision_id: "CurationProposalRevision", # required
client_token: "ClientToken",
})
Response structure
Response structure
resp.change_set_id #=> String
resp.title #=> String
resp.generated_by #=> String, one of "DATA_SOURCE_EXTRACTION", "DATA_SOURCE_INGESTION", "ENTITY_RESOLUTION", "ONTOLOGY_GROUNDING", "TRACE_ANALYSIS", "IMPORT_DATA_DICTIONARY_TASK", "IMPORT_VERIFIED_QUERIES_TASK", "IMPORT_ONTOLOGY_TASK", "DIRECT_MODIFICATION"
resp.revision_id #=> String
resp.status #=> String, one of "PENDING_REVIEW", "APPROVED", "REJECTED", "SUPERSEDED", "FAILED", "PUBLISHING", "ARCHIVED"
resp.status_reason_code #=> String, one of "REQUEST_EXPIRED", "CONNECTION_REMOVED"
resp.access_control #=> String, one of "ACL_RESTRICTED", "NO_ACL"
resp.agent_context_id #=> String
resp.expires_at #=> Time
resp.created_at #=> Time
resp.updated_at #=> Time
resp.status_reason.code #=> String, one of "REQUEST_EXPIRED", "CONNECTION_REMOVED"
resp.status_reason.message #=> String
resp.id #=> String
resp.triggering_policies #=> Array
resp.triggering_policies[0].policy_id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:curation_proposal_id
(required, String)
—
The ID of the proposal to reject.
-
:agent_context_id
(required, String)
—
The agent context that the proposal belongs to, by its ID or ARN. If the proposal belongs to another agent context, the request fails with
ResourceNotFoundException. -
:revision_id
(required, String)
—
The revisionId the curator observed. A mismatch means a stale view.
-
:client_token
(String)
—
A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry with the same token returns the rejected proposal, and the same token used with another proposal returns a
ValidationException.A suitable default value is auto-generated. You should normally not need to pass this option.**
Returns:
-
(Types::RejectCurationProposalResponse)
—
Returns a response object which responds to the following methods:
- #change_set_id => String
- #title => String
- #generated_by => String
- #revision_id => String
- #status => String
- #status_reason_code => String
- #access_control => String
- #agent_context_id => String
- #expires_at => Time
- #created_at => Time
- #updated_at => Time
- #status_reason => Types::StatusReason
- #id => String
- #triggering_policies => Array<Types::TriggeringPolicy>
See Also:
5378 5379 5380 5381 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 5378 def reject_curation_proposal(params = {}, options = {}) req = build_request(:reject_curation_proposal, params) req.send_request(options) end |
#search_agent_context(params = {}) ⇒ Types::SearchAgentContextResponse
Searches an agent context for entities matching a query. Returns ranked entities with relevance scores and metadata. To see the edges around a result node, pass its node ID to TraverseAgentContext.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Example: Search an agent context
Example: Search an agent context
# The following example runs a semantic search for customer orders and returns the two best-matching nodes, an AWS Glue
# table and one of its columns.
resp = client.search_agent_context({
agent_context_id: "ac-0123456789abcdef0123456789abcdef",
max_results: 5,
query: "customer orders",
search_type: "SEMANTIC",
})
resp.to_h outputs the following:
{
items: [
{
entity_type: "NODE",
node_id: "glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders",
properties: {
"name" => {
string_value: "orders",
},
"aws:context:connection-arns" => {
string_value: "[\"arn:aws:context:us-east-1:111122223333:connection/conn-0123456789abcdef0123456789abcdef\"]",
},
"createdAt" => {
string_value: "2026-10-14T09:12:41Z",
},
"databaseName" => {
string_value: "sales_analytics",
},
"nodeType" => {
string_value: "AWS::CONTEXT::TABLE",
},
"tableArn" => {
string_value: "arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders",
},
"updatedAt" => {
string_value: "2026-10-14T09:12:41Z",
},
},
score: 1.0412,
},
{
entity_type: "NODE",
node_id: "glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_analytics%252Forders:customer_id",
properties: {
"name" => {
string_value: "customer_id",
},
"aws:context:connection-arns" => {
string_value: "[\"arn:aws:context:us-east-1:111122223333:connection/conn-0123456789abcdef0123456789abcdef\"]",
},
"columnName" => {
string_value: "customer_id",
},
"dataType" => {
string_value: "string",
},
"isPartitionKey" => {
bool_value: false,
},
"nodeType" => {
string_value: "AWS::CONTEXT::COLUMN",
},
"tableArn" => {
string_value: "arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders",
},
"tableNodeId" => {
string_value: "glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders",
},
"vendor" => {
string_value: "GLUE",
},
},
score: 0.9137,
},
],
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.search_agent_context({
max_results: 1,
next_token: "String",
agent_context_id: "AgentContextIdentifier", # required
query: "SearchAgentContextRequestQueryString", # required
filter: {
equal_to: {
key: "FilterAttributeKeyString", # required
value: { # required
string_value: "EntityFilterValue",
number_value: 1.0,
boolean_value: false,
string_list_value: ["EntityFilterValue"],
},
},
not_equal_to: {
key: "FilterAttributeKeyString", # required
value: { # required
string_value: "EntityFilterValue",
number_value: 1.0,
boolean_value: false,
string_list_value: ["EntityFilterValue"],
},
},
greater_than: {
key: "FilterAttributeKeyString", # required
value: { # required
string_value: "EntityFilterValue",
number_value: 1.0,
boolean_value: false,
string_list_value: ["EntityFilterValue"],
},
},
greater_than_or_equal_to: {
key: "FilterAttributeKeyString", # required
value: { # required
string_value: "EntityFilterValue",
number_value: 1.0,
boolean_value: false,
string_list_value: ["EntityFilterValue"],
},
},
less_than: {
key: "FilterAttributeKeyString", # required
value: { # required
string_value: "EntityFilterValue",
number_value: 1.0,
boolean_value: false,
string_list_value: ["EntityFilterValue"],
},
},
less_than_or_equal_to: {
key: "FilterAttributeKeyString", # required
value: { # required
string_value: "EntityFilterValue",
number_value: 1.0,
boolean_value: false,
string_list_value: ["EntityFilterValue"],
},
},
in: {
key: "FilterAttributeKeyString", # required
value: { # required
string_value: "EntityFilterValue",
number_value: 1.0,
boolean_value: false,
string_list_value: ["EntityFilterValue"],
},
},
and_all: [
{
# recursive SearchFilter
},
],
},
search_type: "KEYWORD", # required, accepts KEYWORD, SEMANTIC, AUTO
})
Response structure
Response structure
resp.next_token #=> String
resp.items #=> Array
resp.items[0].node_id #=> String
resp.items[0].edge_id.from #=> String
resp.items[0].edge_id.to #=> String
resp.items[0].entity_type #=> String, one of "NODE", "EDGE"
resp.items[0].summary #=> String
resp.items[0].score #=> Float
resp.items[0].properties #=> Hash
resp.items[0].properties["MetadataKey"].string_value #=> String
resp.items[0].properties["MetadataKey"].int_value #=> Integer
resp.items[0].properties["MetadataKey"].long_value #=> Integer
resp.items[0].properties["MetadataKey"].bool_value #=> Boolean
resp.items[0].properties["MetadataKey"].float_value #=> Float
resp.items[0].properties["MetadataKey"].double_value #=> Float
resp.items[0].properties["MetadataKey"].string_list_value #=> Array
resp.items[0].properties["MetadataKey"].string_list_value[0] #=> String
resp.items[0].properties["MetadataKey"].int_list_value #=> Array
resp.items[0].properties["MetadataKey"].int_list_value[0] #=> Integer
resp.items[0].properties["MetadataKey"].long_list_value #=> Array
resp.items[0].properties["MetadataKey"].long_list_value[0] #=> Integer
resp.items[0].properties["MetadataKey"].float_list_value #=> Array
resp.items[0].properties["MetadataKey"].float_list_value[0] #=> Float
resp.items[0].properties["MetadataKey"].double_list_value #=> Array
resp.items[0].properties["MetadataKey"].double_list_value[0] #=> Float
resp.items[0].properties["MetadataKey"].bool_list_value #=> Array
resp.items[0].properties["MetadataKey"].bool_list_value[0] #=> Boolean
resp.authorization_required.authorization_url #=> String
resp.authorization_required.message #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:max_results
(Integer)
—
Maximum number of results to return per page.
-
:next_token
(String)
—
Opaque continuation token from a prior response. Omit on the first page.
-
:agent_context_id
(required, String)
—
The agent context to search, by ID or full Amazon Resource Name (ARN).
-
:query
(required, String)
—
The natural-language query or keywords to search for in the agent context. AWS Context interprets it based on
searchType: as literal text forKEYWORD, as a semantic concept forSEMANTIC, or as both forAUTO. -
:filter
(Types::SearchFilter)
—
Optional filter on node attributes: a single comparison, or
andAllof comparisons that must all match. -
:search_type
(required, String)
—
The search strategy to use. Valid values:
KEYWORD- Full-text keyword matching (BM25).SEMANTIC- Vector similarity of embeddings.AUTO- Keyword matches first, then semantic matches for the remaining results.
Returns:
-
(Types::SearchAgentContextResponse)
—
Returns a response object which responds to the following methods:
- #next_token => String
- #items => Array<Types::SearchAgentContextResultEntity>
- #authorization_required => Types::AuthorizationRequired
See Also:
5622 5623 5624 5625 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 5622 def search_agent_context(params = {}, options = {}) req = build_request(:search_agent_context, params) req.send_request(options) end |
#start_ontology_induction(params = {}) ⇒ Types::StartOntologyInductionResponse
Starts an ontology induction, which induces a draft ontology from the
documents that you provide. The induction runs asynchronously. To get
its status, call GetOntologyInduction. When the induction's status is
DRAFT, AWS Context has created the ontology as a DRAFT:
GetOntologyInduction returns the ontology's ID, and GetOntology
returns the draft. To publish the draft, use the AWS Context console.
Because AWS Context creates the ontology on your behalf, you need
context:CreateOntology permission in addition to
context:StartOntologyInduction. If you specify tags, you also need
context:TagResource permission.
Examples:
Example: Start an ontology induction
Example: Start an ontology induction
# The following example starts an ontology induction from one Markdown document; the induction runs asynchronously and
# creates a DRAFT ontology when it finishes.
resp = client.start_ontology_induction({
client_token: "8b0e6d4c-2a1f-4c3e-9d7b-5a6f7e8d9c0b",
input_config: {
documents: [
{
name: "catalog-overview.md",
content: "IyBMaWJyYXJ5IGNhdGFsb2cKCkVhY2ggYm9vayBoYXMgYW4gSVNCTiwgYSB0aXRsZSwgYW5kIG9uZSBvciBtb3JlIGF1dGhvcnMuIE1lbWJlcnMgYm9ycm93IGNvcGllcyBvZiBib29rcyB0aHJvdWdoIGxvYW5zIHRoYXQgaGF2ZSBhIGR1ZSBkYXRlLgo=",
content_type: "MARKDOWN",
},
],
},
ontology_description: "Books, authors, members, and loans for a lending library.",
ontology_name: "library-catalog",
prompt: "Model books, authors, library members, and loans. Give every type a stable identifier.",
})
resp.to_h outputs the following:
{
arn: "arn:aws:context:us-east-1:111122223333:ontology-induction/oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b",
id: "oi-4f2a9c7e1b3d4e6f8a0b2c4d6e8f0a1b",
status: "INDUCING",
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.start_ontology_induction({
client_token: "ClientToken",
ontology_name: "OntologyName", # required
ontology_description: "UserDefinedString",
input_config: { # required
documents: [
{
name: "OntologyInductionDocumentName", # required
content_type: "PDF", # required, accepts PDF, TXT, MARKDOWN, CSV, JSON, YAML, DOC, DOCX, HTML
content: "data", # required
},
],
},
seed_ontology_id: "OntologyIdentifier",
prompt: "OntologyInductionPrompt",
tags: {
"TagKey" => "TagValue",
},
ontology_tags: {
"TagKey" => "TagValue",
},
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.status #=> String, one of "INDUCING", "DRAFT", "FAILED", "CANCELLED"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A unique, case-sensitive identifier that you provide to make the request idempotent. A retry of the same request with the same token returns the induction that the first request created, and the same token used with a different request returns a
ValidationException. If that induction, or the ontology it created, was deleted since, a retry with the token fails withConflictException.A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:ontology_name
(required, String)
—
The new ontology's display name.
-
:ontology_description
(String)
—
Optional. The new ontology's description. An empty string is the same as none.
-
:input_config
(required, Types::OntologyInductionInputConfig)
—
The input to induce the ontology from. Set exactly one member.
-
:seed_ontology_id
(String)
—
Optional. An existing ontology to start from, by ID or ARN. If you omit it, AWS Context induces the ontology from the documents alone. The seed must be an ontology that you own, it must be
PUBLISHED, and its current version must be derived from a Turtle source document. You also needcontext:GetOntologypermission on the seed. If the seed doesn't exist, the request fails withResourceNotFoundException. If it can't be used, the request fails withValidationException. If the seed's source document is deleted while the induction runs, is larger than 400,000 bytes, or doesn't parse, the induction fails withSEED_INVALID. -
:prompt
(String)
—
Optional. Instructions for the induction.
-
:tags
(Hash<String,String>)
—
Tags to add to the induction 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 induction. 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. These tags go on the induction only.ontologyTagsgo on the ontology. -
:ontology_tags
(Hash<String,String>)
—
Tags to add to the ontology the induction creates at DRAFT, with the same limits and rules as
tags. They are checked here, and supplying them also requirescontext:TagResourceon the new ontology. These tags go on the ontology only.tagsgo on the induction.
Returns:
See Also:
5760 5761 5762 5763 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 5760 def start_ontology_induction(params = {}, options = {}) req = build_request(:start_ontology_induction, params) req.send_request(options) end |
#start_task(params = {}) ⇒ Types::StartTaskResponse
Starts a task that imports a data dictionary, verified queries, or ontologies into an agent context. The task runs asynchronously and records the changes it makes as change sets. GetTask returns its status.
Examples:
Example: Import a data dictionary into an agent context
Example: Import a data dictionary into an agent context
# The following example starts a task that imports a CSV data dictionary that describes the columns of a sales table.
resp = client.start_task({
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
client_token: "3c8f1a2e-6b4d-4f9a-8e2c-1d7b5a9f0e64",
description: "Import the sales data dictionary",
input_configuration: {
import_data_dictionary: {
documents: [
{
name: "sales-columns.csv",
content: "Y29sdW1uLHRhYmxlLGRlc2NyaXB0aW9uCm9yZGVyX3RvdGFsLHNhbGVzLm9yZGVycyxPcmRlciBhbW91bnQgaW4gVVNEIGFmdGVyIGRpc2NvdW50cwpyZWdpb25fY29kZSxzYWxlcy5vcmRlcnMsVHdvLWxldHRlciBzYWxlcyByZWdpb24gY29kZQo=",
content_type: "CSV",
},
],
},
},
})
resp.to_h outputs the following:
{
type: "IMPORT_DATA_DICTIONARY",
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53/task/task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364",
created_at: Time.parse("2026-11-20T17:42:05Z"),
description: "Import the sales data dictionary",
id: "task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364",
input_configuration: {
import_data_dictionary: {
documents: [
{
name: "sales-columns.csv",
content_type: "CSV",
size_bytes: 140,
},
],
},
},
status: "PENDING",
updated_at: Time.parse("2026-11-20T17:42:05Z"),
}
Example: Import an ontology into an agent context
Example: Import an ontology into an agent context
# The following example starts a task that imports version 1.2.0 of an ontology into an agent context.
resp = client.start_task({
access_control_config: {
access_control_list: [
{
access: "ALLOW",
principal_id: "*",
},
],
},
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
input_configuration: {
import_ontology: {
ontologies: [
{
ontology_id: "ont-5b8e1f4a9c2d4e7fb3a6c0d9e8f1a274",
ontology_version: "1.2.0",
},
],
},
},
})
resp.to_h outputs the following:
{
type: "IMPORT_ONTOLOGY",
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53/task/task-91d4a7e2c3b84f6a9e1d5c7b2a8f0e46",
created_at: Time.parse("2026-11-21T09:15:30Z"),
id: "task-91d4a7e2c3b84f6a9e1d5c7b2a8f0e46",
input_configuration: {
import_ontology: {
ontologies: [
{
ontology_arn: "arn:aws:context:us-east-1:111122223333:ontology/ont-5b8e1f4a9c2d4e7fb3a6c0d9e8f1a274",
ontology_version: "1.2.0",
},
],
},
},
status: "PENDING",
updated_at: Time.parse("2026-11-21T09:15:30Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.start_task({
agent_context_id: "AgentContextIdentifier", # required
client_token: "ClientToken",
description: "TaskDescription",
input_configuration: { # required
import_data_dictionary: {
documents: [ # required
{
name: "DocumentName", # required
content_type: "CSV", # required, accepts CSV, JSON, YAML, MARKDOWN, SQL, TXT
content: "data", # required
},
],
},
import_verified_queries: {
documents: [ # required
{
name: "DocumentName", # required
content_type: "CSV", # required, accepts CSV, JSON, YAML, MARKDOWN, SQL, TXT
content: "data", # required
},
],
},
import_ontology: {
ontologies: [ # required
{
ontology_id: "OntologyIdentifier", # required
ontology_version: "OntologyVersionString",
},
],
},
},
access_control_config: {
access_control_list: [
{
access: "ALLOW", # required, accepts ALLOW, DENY
principal_id: "PrincipalId", # required
principal_type: "USER", # accepts USER, GROUP
},
],
},
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.agent_context_id #=> String
resp.type #=> String, one of "IMPORT_DATA_DICTIONARY", "IMPORT_VERIFIED_QUERIES", "IMPORT_ONTOLOGY"
resp.status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "FAILED", "CANCELLING", "CANCELLED"
resp.description #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.status_reason_code #=> String, one of "GRAPH_NOT_ACTIVE", "ONTOLOGY_INVALID", "ONTOLOGY_IMPORT_UNAVAILABLE", "ONTOLOGY_ALREADY_IMPORTED"
resp.status_message #=> String
resp.statistics.number_of_documents_analyzed #=> Integer
resp.statistics.number_of_change_sets_created #=> Integer
resp.statistics.number_of_change_sets_auto_approved #=> Integer
resp.input_configuration.import_data_dictionary.documents #=> Array
resp.input_configuration.import_data_dictionary.documents[0].name #=> String
resp.input_configuration.import_data_dictionary.documents[0].size_bytes #=> Integer
resp.input_configuration.import_data_dictionary.documents[0].content_type #=> String, one of "CSV", "JSON", "YAML", "MARKDOWN", "SQL", "TXT"
resp.input_configuration.import_verified_queries.documents #=> Array
resp.input_configuration.import_verified_queries.documents[0].name #=> String
resp.input_configuration.import_verified_queries.documents[0].size_bytes #=> Integer
resp.input_configuration.import_verified_queries.documents[0].content_type #=> String, one of "CSV", "JSON", "YAML", "MARKDOWN", "SQL", "TXT"
resp.input_configuration.import_ontology.ontologies #=> Array
resp.input_configuration.import_ontology.ontologies[0].ontology_arn #=> String
resp.input_configuration.import_ontology.ontologies[0].ontology_version #=> String
resp.outputs #=> Array
resp.outputs[0].change_set.change_set_id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context, as an ID or ARN.
-
:client_token
(String)
—
A unique, case-sensitive identifier that you provide to ensure that the request completes no more than one time. The token is scoped to your account and the agent context. If you reuse a token on the same agent context with different parameters, the request fails with
ValidationException.A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:description
(String)
—
A description of the task. Up to 1,024 characters, with no control characters.
-
:input_configuration
(required, Types::TaskInputConfiguration)
—
What the task imports. Set exactly one member. The member that you set determines the task's
type. -
:access_control_config
(Types::AccessControlConfig)
—
Who can see the content that the task adds to the agent context. AWS Context supports only one entry:
ALLOWwithprincipalId*, so that every reader of the agent context can see it. If you omit it or send no entries, AWS Context uses that entry. If you name any other principal, include aDENYentry, or send more than one entry, the request fails withValidationException, and no task is started.
Returns:
-
(Types::StartTaskResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #agent_context_id => String
- #type => String
- #status => String
- #description => String
- #created_at => Time
- #updated_at => Time
- #status_reason_code => String
- #status_message => String
- #statistics => Types::TaskStatistics
- #input_configuration => Types::TaskInputConfigurationSummary
- #outputs => Array<Types::TaskOutput>
See Also:
5985 5986 5987 5988 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 5985 def start_task(params = {}, options = {}) req = build_request(:start_task, params) req.send_request(options) end |
#tag_resource(params = {}) ⇒ Struct
Adds tags to an agent context, connection, curation policy, customer-owned ontology, or ontology induction.
Examples:
Example: Add tags to an agent context
Example: Add tags to an agent context
# The following example adds two tags to the agent context ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d.
resp = client.tag_resource({
resource_arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d",
tags: {
"environment" => "production",
"team" => "sales-analytics",
},
})
resp.to_h outputs the following:
{
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.tag_resource({
resource_arn: "TaggableResourceArn", # required
tags: { # required
"TagKey" => "TagValue",
},
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:resource_arn
(required, String)
—
The ARN of the resource to tag.
-
:tags
(required, Hash<String,String>)
—
The tags to add, 1–200 per request. Keys must not start with
aws:.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
6031 6032 6033 6034 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 6031 def tag_resource(params = {}, options = {}) req = build_request(:tag_resource, params) req.send_request(options) end |
#traverse_agent_context(params = {}) ⇒ Types::TraverseAgentContextResponse
Returns the neighbors of a seed node in an agent context, each with its properties, hop distance, and the edges that connect it to the seed. To get the seed node ID, call SearchAgentContext.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Example: Traverse from a node
Example: Traverse from a node
# The following example follows outgoing HAS_COLUMN edges one hop from an AWS Glue table node, and returns two of the
# table's columns with the edge that connects each one to the table.
resp = client.traverse_agent_context({
agent_context_id: "ac-0123456789abcdef0123456789abcdef",
max_results: 2,
node_id: "glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders",
traversal_strategy: {
direction: "OUTGOING",
edge_types: [
"AWS::CONTEXT::HAS_COLUMN",
],
max_depth: 1,
},
})
resp.to_h outputs the following:
{
items: [
{
depth: 1,
node_id: "glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_analytics%252Forders:order_id",
path_edges: [
{
edge_id: {
from: "glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders",
to: "glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_analytics%252Forders:order_id",
},
properties: {
"edgeType" => {
string_value: "AWS::CONTEXT::HAS_COLUMN",
},
"vendor" => {
string_value: "GLUE",
},
},
},
],
properties: {
"name" => {
string_value: "order_id",
},
"aws:context:connection-arns" => {
string_value: "[\"arn:aws:context:us-east-1:111122223333:connection/conn-0123456789abcdef0123456789abcdef\"]",
},
"columnName" => {
string_value: "order_id",
},
"dataType" => {
string_value: "string",
},
"isPartitionKey" => {
bool_value: false,
},
"nodeType" => {
string_value: "AWS::CONTEXT::COLUMN",
},
"tableArn" => {
string_value: "arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders",
},
"tableNodeId" => {
string_value: "glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders",
},
"vendor" => {
string_value: "GLUE",
},
},
},
{
depth: 1,
node_id: "glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_analytics%252Forders:order_total",
path_edges: [
{
edge_id: {
from: "glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders",
to: "glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_analytics%252Forders:order_total",
},
properties: {
"edgeType" => {
string_value: "AWS::CONTEXT::HAS_COLUMN",
},
"vendor" => {
string_value: "GLUE",
},
},
},
],
properties: {
"name" => {
string_value: "order_total",
},
"aws:context:connection-arns" => {
string_value: "[\"arn:aws:context:us-east-1:111122223333:connection/conn-0123456789abcdef0123456789abcdef\"]",
},
"columnName" => {
string_value: "order_total",
},
"dataType" => {
string_value: "decimal(12,2)",
},
"isPartitionKey" => {
bool_value: false,
},
"nodeType" => {
string_value: "AWS::CONTEXT::COLUMN",
},
"tableArn" => {
string_value: "arn:aws:glue:us-east-1:111122223333:table/sales_analytics/orders",
},
"tableNodeId" => {
string_value: "glueTable:arn%3Aaws%3Aglue%3Aus-east-1%3A111122223333%3Atable%2Fsales_analytics%2Forders",
},
"vendor" => {
string_value: "GLUE",
},
},
},
],
next_token: "e1.AQIDAHhEXAMPLEnextTokenTraverseOrders0001",
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.traverse_agent_context({
max_results: 1,
next_token: "String",
agent_context_id: "AgentContextIdentifier", # required
node_id: "GenericNodeId", # required
traversal_strategy: { # required
edge_types: ["EdgeTypeName"],
direction: "OUTGOING", # required, accepts OUTGOING, INCOMING, BOTH
max_depth: 1, # required
},
})
Response structure
Response structure
resp.next_token #=> String
resp.items #=> Array
resp.items[0].node_id #=> String
resp.items[0].properties #=> Hash
resp.items[0].properties["MetadataKey"].string_value #=> String
resp.items[0].properties["MetadataKey"].int_value #=> Integer
resp.items[0].properties["MetadataKey"].long_value #=> Integer
resp.items[0].properties["MetadataKey"].bool_value #=> Boolean
resp.items[0].properties["MetadataKey"].float_value #=> Float
resp.items[0].properties["MetadataKey"].double_value #=> Float
resp.items[0].properties["MetadataKey"].string_list_value #=> Array
resp.items[0].properties["MetadataKey"].string_list_value[0] #=> String
resp.items[0].properties["MetadataKey"].int_list_value #=> Array
resp.items[0].properties["MetadataKey"].int_list_value[0] #=> Integer
resp.items[0].properties["MetadataKey"].long_list_value #=> Array
resp.items[0].properties["MetadataKey"].long_list_value[0] #=> Integer
resp.items[0].properties["MetadataKey"].float_list_value #=> Array
resp.items[0].properties["MetadataKey"].float_list_value[0] #=> Float
resp.items[0].properties["MetadataKey"].double_list_value #=> Array
resp.items[0].properties["MetadataKey"].double_list_value[0] #=> Float
resp.items[0].properties["MetadataKey"].bool_list_value #=> Array
resp.items[0].properties["MetadataKey"].bool_list_value[0] #=> Boolean
resp.items[0].depth #=> Integer
resp.items[0].path_edges #=> Array
resp.items[0].path_edges[0].edge_id.from #=> String
resp.items[0].path_edges[0].edge_id.to #=> String
resp.items[0].path_edges[0].properties #=> Hash
resp.items[0].path_edges[0].properties["MetadataKey"].string_value #=> String
resp.items[0].path_edges[0].properties["MetadataKey"].int_value #=> Integer
resp.items[0].path_edges[0].properties["MetadataKey"].long_value #=> Integer
resp.items[0].path_edges[0].properties["MetadataKey"].bool_value #=> Boolean
resp.items[0].path_edges[0].properties["MetadataKey"].float_value #=> Float
resp.items[0].path_edges[0].properties["MetadataKey"].double_value #=> Float
resp.items[0].path_edges[0].properties["MetadataKey"].string_list_value #=> Array
resp.items[0].path_edges[0].properties["MetadataKey"].string_list_value[0] #=> String
resp.items[0].path_edges[0].properties["MetadataKey"].int_list_value #=> Array
resp.items[0].path_edges[0].properties["MetadataKey"].int_list_value[0] #=> Integer
resp.items[0].path_edges[0].properties["MetadataKey"].long_list_value #=> Array
resp.items[0].path_edges[0].properties["MetadataKey"].long_list_value[0] #=> Integer
resp.items[0].path_edges[0].properties["MetadataKey"].float_list_value #=> Array
resp.items[0].path_edges[0].properties["MetadataKey"].float_list_value[0] #=> Float
resp.items[0].path_edges[0].properties["MetadataKey"].double_list_value #=> Array
resp.items[0].path_edges[0].properties["MetadataKey"].double_list_value[0] #=> Float
resp.items[0].path_edges[0].properties["MetadataKey"].bool_list_value #=> Array
resp.items[0].path_edges[0].properties["MetadataKey"].bool_list_value[0] #=> Boolean
resp.authorization_required.authorization_url #=> String
resp.authorization_required.message #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:max_results
(Integer)
—
Maximum total neighbors to return per page.
-
:next_token
(String)
—
Opaque continuation token from a prior response. Omit on the first page.
-
:agent_context_id
(required, String)
—
The agent context to traverse, by ID or full Amazon Resource Name (ARN).
-
:node_id
(required, String)
—
The ID of the seed node to start traversal from.
-
:traversal_strategy
(required, Types::TraversalStrategy)
—
Traversal directives: which edge types to follow, direction, and max depth.
Returns:
-
(Types::TraverseAgentContextResponse)
—
Returns a response object which responds to the following methods:
- #next_token => String
- #items => Array<Types::NeighborNode>
- #authorization_required => Types::AuthorizationRequired
See Also:
6258 6259 6260 6261 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 6258 def traverse_agent_context(params = {}, options = {}) req = build_request(:traverse_agent_context, params) req.send_request(options) end |
#untag_resource(params = {}) ⇒ Struct
Removes tags from an agent context, connection, curation policy, customer-owned ontology, or ontology induction.
Examples:
Example: Remove a tag from a connection
Example: Remove a tag from a connection
# The following example removes the team tag from the connection conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b.
resp = client.untag_resource({
resource_arn: "arn:aws:context:us-east-1:111122223333:connection/conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b",
tag_keys: [
"team",
],
})
resp.to_h outputs the following:
{
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.untag_resource({
resource_arn: "TaggableResourceArn", # required
tag_keys: ["TagKey"], # required
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:resource_arn
(required, String)
—
The ARN of the resource to untag.
-
:tag_keys
(required, Array<String>)
—
The keys of the tags to remove, 1–200 per request.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
6301 6302 6303 6304 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 6301 def untag_resource(params = {}, options = {}) req = build_request(:untag_resource, params) req.send_request(options) end |
#update_agent_context(params = {}) ⇒ Types::UpdateAgentContextResponse
Updates an agent context's configuration.
Examples:
Example: Turn on trace analysis for an agent context
Example: Turn on trace analysis for an agent context
# The following example turns on trace analysis for the agent context ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53 with an IAM role
# in the same account, and updates its description.
resp = client.update_agent_context({
agent_context_id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
description: "Sales pipeline, revenue, and forecast tables for the analytics agents.",
trace_analysis_config: {
status: "ENABLED",
trace_analysis_role: "arn:aws:iam::111122223333:role/ContextTraceAnalysisRole",
},
})
resp.to_h outputs the following:
{
name: "sales-analytics",
arn: "arn:aws:context:us-east-1:111122223333:agent-context/ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
connection_mappings: [
{
type: "GLUE_DATA_CATALOG",
connection_id: "arn:aws:context:us-east-1:111122223333:connection/conn-7b1e4d9a2c6f4b08a3e5d1c9f2a6b4e7",
ontology_mappings: [
{
ontology_id: "arn:aws:context:us-east-1::ontology/data",
},
],
path_segments: [
{
id: "sales",
level: "glueDatabase",
},
],
},
],
created_at: Time.parse("2026-11-02T17:30:00Z"),
description: "Sales pipeline, revenue, and forecast tables for the analytics agents.",
encryption_config: {
encryption_mode: "AWS_OWNED",
},
entity_resolution_config: {
status: "ENABLED",
},
id: "ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53",
status: "ACTIVE",
trace_analysis_config: {
include_context_agent_traces: "ENABLED",
status: "ENABLED",
trace_analysis_role: "arn:aws:iam::111122223333:role/ContextTraceAnalysisRole",
},
updated_at: Time.parse("2026-11-05T10:12:48Z"),
workforce_sign_in_config: {
status: "DISABLED",
},
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_agent_context({
agent_context_id: "AgentContextIdentifier", # required
name: "ResourceName",
description: "UserDefinedString",
connection_mappings: [
{
connection_id: "ConnectionIdentifier", # required
ontology_mappings: [ # required
{
ontology_id: "OntologyIdentifier", # required
},
],
data_filter: {
filters: [
{
file_type: "FileType",
exclude_tags: ["TagString"],
include_tags: ["TagString"],
updated_after: Time.now,
created_after: Time.now,
max_document_size_bytes: 1,
},
],
},
extraction_depth: "ExtractionDepth",
path_segments: [
{
level: "PathSegmentValue", # required
id: "PathSegmentIdValue", # required
},
],
type: "GLUE_DATA_CATALOG", # accepts GLUE_DATA_CATALOG, BEDROCK_KNOWLEDGE_BASE, DATABRICKS, SNOWFLAKE
},
],
trace_analysis_config: {
status: "ENABLED", # accepts ENABLED, DISABLED
trace_analysis_role: "RoleArn",
include_context_agent_traces: "ENABLED", # accepts ENABLED, DISABLED
},
workforce_sign_in_config: {
status: "ENABLED", # accepts ENABLED, DISABLED
sign_in_url: "SignInUrl",
},
entity_resolution_config: {
status: "ENABLED", # accepts ENABLED, DISABLED
},
trusted_identity_sources: [
{
identity_store_arn: "IdentityStoreArn",
identity_provider_arn: "IamIdentityProviderArn",
},
],
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.name #=> String
resp.description #=> String
resp.status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.created_at #=> Time
resp.updated_at #=> Time
resp.connection_mappings #=> Array
resp.connection_mappings[0].connection_id #=> String
resp.connection_mappings[0].ontology_mappings #=> Array
resp.connection_mappings[0].ontology_mappings[0].ontology_id #=> String
resp.connection_mappings[0].data_filter.filters #=> Array
resp.connection_mappings[0].data_filter.filters[0].file_type #=> String
resp.connection_mappings[0].data_filter.filters[0].exclude_tags #=> Array
resp.connection_mappings[0].data_filter.filters[0].exclude_tags[0] #=> String
resp.connection_mappings[0].data_filter.filters[0].include_tags #=> Array
resp.connection_mappings[0].data_filter.filters[0].include_tags[0] #=> String
resp.connection_mappings[0].data_filter.filters[0].updated_after #=> Time
resp.connection_mappings[0].data_filter.filters[0].created_after #=> Time
resp.connection_mappings[0].data_filter.filters[0].max_document_size_bytes #=> Integer
resp.connection_mappings[0].extraction_depth #=> String
resp.connection_mappings[0].path_segments #=> Array
resp.connection_mappings[0].path_segments[0].level #=> String
resp.connection_mappings[0].path_segments[0].id #=> String
resp.connection_mappings[0].type #=> String, one of "GLUE_DATA_CATALOG", "BEDROCK_KNOWLEDGE_BASE", "DATABRICKS", "SNOWFLAKE"
resp.encryption_config.encryption_mode #=> String, one of "AWS_OWNED", "CUSTOMER_MANAGED"
resp.encryption_config.key_arn #=> String
resp.trace_analysis_config.status #=> String, one of "ENABLED", "DISABLED"
resp.trace_analysis_config.trace_analysis_role #=> String
resp.trace_analysis_config.include_context_agent_traces #=> String, one of "ENABLED", "DISABLED"
resp.workforce_sign_in_config.status #=> String, one of "ENABLED", "DISABLED"
resp.workforce_sign_in_config.sign_in_url #=> String
resp.entity_resolution_config.status #=> String, one of "ENABLED", "DISABLED"
resp.mcp_server_url #=> String
resp.trusted_identity_sources #=> Array
resp.trusted_identity_sources[0].identity_store_arn #=> String
resp.trusted_identity_sources[0].identity_provider_arn #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_context_id
(required, String)
—
The agent context to update, by its ID or ARN.
-
:name
(String)
—
The new name. If you omit it, the name is unchanged.
-
:description
(String)
—
The new description. Absent leaves the description unchanged. An empty string removes it.
-
:connection_mappings
(Array<Types::ConnectionMapping>)
—
The connection mappings for this agent context, 0–20 entries. If you provide a list, it replaces the stored set: AWS Context removes entries that are not in the list, adds new entries, and overwrites retained entries with exactly the values that you provide, without merging fields. An empty list removes all connection links. If you omit this member, the existing links are unchanged.
Each newly referenced connection must exist, be owned by your account, and be
ACTIVE. Order is significant. When several connections reach the same AWS Glue Data Catalog table, AWS Context tries the connection mapped first, with its own access, and then the next. -
:trace_analysis_config
(Types::TraceAnalysisConfig)
—
Merged into the agent context's trace analysis settings: an absent member leaves its stored value unchanged.
statusENABLED requires a role, supplied here or already on the agent context. A role supplied withoutstatusrequires the agent context'sstatusto read ENABLED. -
:workforce_sign_in_config
(Types::WorkforceSignInConfig)
—
Merged into the agent context's workforce sign-in settings: an absent member leaves its stored value unchanged.
signInUrlreplaces the stored URL and reads ENABLED.statusDISABLED removes the stored URL.statusENABLED requires a URL, supplied here or already on the agent context. -
:entity_resolution_config
(Types::EntityResolutionConfig)
—
Merged into the agent context's entity resolution settings: an absent member leaves its stored value unchanged.
-
:trusted_identity_sources
(Array<Types::TrustedIdentitySource>)
—
Identity sources to trust in addition to your account. A present list replaces the stored list,
[]clears it so only your account is trusted, and an absent field leaves it unchanged. Order is not significant: a list with the stored entries in another order changes nothing. A change takes effect within about a minute.
Returns:
-
(Types::UpdateAgentContextResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #name => String
- #description => String
- #status => String
- #created_at => Time
- #updated_at => Time
- #connection_mappings => Array<Types::ConnectionMapping>
- #encryption_config => Types::EncryptionConfig
- #trace_analysis_config => Types::TraceAnalysisConfig
- #workforce_sign_in_config => Types::WorkforceSignInConfig
- #entity_resolution_config => Types::EntityResolutionConfig
- #mcp_server_url => String
- #trusted_identity_sources => Array<Types::TrustedIdentitySource>
See Also:
6530 6531 6532 6533 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 6530 def update_agent_context(params = {}, options = {}) req = build_request(:update_agent_context, params) req.send_request(options) end |
#update_change_set(params = {}) ⇒ Types::UpdateChangeSetResponse
Drops operations from a change set that is held for curator review. Returns the updated change set.
Examples:
Example: Drop a link from a change set
Example: Drop a link from a change set
# The following example drops one column link from a grounding change set that is held for review, copying the operation
# unchanged from ListChangeSetOperations, and returns the change set's new version.
resp = client.update_change_set({
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
change_set_id: "cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b",
change_set_version: 1,
client_token: "2c4e6a8b-0d1f-4c3e-a5b7-9d1f3b5d7f0a",
operations_to_remove: [
{
put: {
entity: {
edge_id: {
from: "glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_db%252Forders:region_code",
to: "iri:https://example.com/ontology/sales%23salesRegion",
},
},
properties: {
"edgeType" => {
string_value: "MAPPED_TO",
},
},
},
},
],
})
resp.to_h outputs the following:
{
access_control: "NO_ACL",
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
change_set_version: 2,
created_at: Time.parse("2026-11-18T14:05:12Z"),
generated_by: "ONTOLOGY_GROUNDING",
id: "cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b",
status: "PENDING",
updated_at: Time.parse("2026-11-19T08:58:20Z"),
}
Example: Update a change set with a stale version, which fails with ConflictException
Example: Update a change set with a stale version, which fails with ConflictException
# The following example fails with a ConflictException because the change set was edited after the caller read version 1
# with GetChangeSet.
resp = client.update_change_set({
agent_context_id: "ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c",
change_set_id: "cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b",
change_set_version: 1,
operations_to_remove: [
{
put: {
entity: {
edge_id: {
from: "glueColumn:glueTable%3Aarn%253Aaws%253Aglue%253Aus-east-1%253A111122223333%253Atable%252Fsales_db%252Forders:order_total",
to: "iri:https://example.com/ontology/sales%23orderTotal",
},
},
properties: {
"edgeType" => {
string_value: "MAPPED_TO",
},
},
},
},
],
})
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_change_set({
change_set_id: "ChangeSetId", # required
agent_context_id: "AgentContextIdentifier", # required
change_set_version: 1, # required
client_token: "ClientToken",
operations_to_remove: [ # required
{
put: {
entity: {
node_id: "GenericNodeId",
edge_id: {
from: "GenericNodeId", # required
to: "GenericNodeId", # required
},
},
properties: { # required
"MetadataKey" => {
string_value: "MetadataStringValue",
int_value: 1,
long_value: 1,
bool_value: false,
float_value: 1.0,
double_value: 1.0,
string_list_value: ["MetadataStringValue"],
int_list_value: [1],
long_list_value: [1],
float_list_value: [1.0],
double_list_value: [1.0],
bool_list_value: [false],
},
},
},
update: {
entity: { # required
node_id: "GenericNodeId",
edge_id: {
from: "GenericNodeId", # required
to: "GenericNodeId", # required
},
},
properties: { # required
"MetadataKey" => {
string_value: "MetadataStringValue",
int_value: 1,
long_value: 1,
bool_value: false,
float_value: 1.0,
double_value: 1.0,
string_list_value: ["MetadataStringValue"],
int_list_value: [1],
long_list_value: [1],
float_list_value: [1.0],
double_list_value: [1.0],
bool_list_value: [false],
},
},
},
delete: {
entity: { # required
node_id: "GenericNodeId",
edge_id: {
from: "GenericNodeId", # required
to: "GenericNodeId", # required
},
},
properties: {
"MetadataKey" => {
string_value: "MetadataStringValue",
int_value: 1,
long_value: 1,
bool_value: false,
float_value: 1.0,
double_value: 1.0,
string_list_value: ["MetadataStringValue"],
int_list_value: [1],
long_list_value: [1],
float_list_value: [1.0],
double_list_value: [1.0],
bool_list_value: [false],
},
},
},
},
],
})
Response structure
Response structure
resp.agent_context_id #=> String
resp.status #=> String, one of "DRAFT", "PENDING", "AUTHORIZED", "SUPPRESSED", "PUBLISHED", "FAILED"
resp.created_at #=> Time
resp.updated_at #=> Time
resp.access_control #=> String, one of "ACL_RESTRICTED", "NO_ACL"
resp.generated_by #=> String, one of "DATA_SOURCE_EXTRACTION", "DATA_SOURCE_INGESTION", "ENTITY_RESOLUTION", "ONTOLOGY_GROUNDING", "TRACE_ANALYSIS", "IMPORT_DATA_DICTIONARY_TASK", "IMPORT_VERIFIED_QUERIES_TASK", "IMPORT_ONTOLOGY_TASK", "DIRECT_MODIFICATION"
resp.status_reason.code #=> String, one of "REQUEST_EXPIRED", "CONNECTION_REMOVED"
resp.status_reason.message #=> String
resp.id #=> String
resp.change_set_version #=> Integer
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:change_set_id
(required, String)
—
The change set to edit: the
changeSetIdthat GetCurationProposal returns. -
:agent_context_id
(required, String)
—
The agent context that the change set belongs to, by its ID or ARN. AWS Context authorizes the request on this agent context's ARN. If the change set belongs to another agent context, the request fails with
ResourceNotFoundException. -
:change_set_version
(required, Integer)
—
The change set version that you read with GetChangeSet. The edit applies only if it's still the latest version. Otherwise, the request fails with
ConflictException. -
:client_token
(String)
—
A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry of the same request with the same token returns the change set's latest version without writing again, and the same token used for another change set or a different request returns a
ValidationException.A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:operations_to_remove
(required, Array<Types::ChangeSetOperation>)
—
Operations to remove, copied unchanged from
ListChangeSetOperations. A retry must resend the same list with the same clientToken.
Returns:
-
(Types::UpdateChangeSetResponse)
—
Returns a response object which responds to the following methods:
- #agent_context_id => String
- #status => String
- #created_at => Time
- #updated_at => Time
- #access_control => String
- #generated_by => String
- #status_reason => Types::StatusReason
- #id => String
- #change_set_version => Integer
See Also:
6754 6755 6756 6757 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 6754 def update_change_set(params = {}, options = {}) req = build_request(:update_change_set, params) req.send_request(options) end |
#update_connection(params = {}) ⇒ Types::UpdateConnectionResponse
Updates a connection's configuration.
Examples:
Example: Update the scope of a connection
Example: Update the scope of a connection
# The following example adds the marketing_db database to the scope of the connection
# conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b and keeps its ingestion role, which every update must specify.
resp = client.update_connection({
connection_id: "conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b",
ingestion_config: {
role_arn: "arn:aws:iam::111122223333:role/ContextIngestionRole",
},
scope: {
selectors: [
{
path: [
{
id: "arn:aws:glue:us-east-1:111122223333:catalog",
level: "glueCatalog",
},
{
id: "sales_db",
level: "glueDatabase",
},
],
},
{
path: [
{
id: "arn:aws:glue:us-east-1:111122223333:catalog",
level: "glueCatalog",
},
{
id: "marketing_db",
level: "glueDatabase",
},
],
},
],
},
})
resp.to_h outputs the following:
{
name: "sales-analytics",
access_config: {
iam_role: {
role_arn: "arn:aws:iam::111122223333:role/ContextGlueReadRole",
},
},
arn: "arn:aws:context:us-east-1:111122223333:connection/conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b",
created_at: Time.parse("2026-11-02T17:30:00Z"),
data_source: {
type: "GLUE_DATA_CATALOG",
location: {
arn: "arn:aws:glue:us-east-1:111122223333:catalog",
},
},
id: "conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b",
ingestion_config: {
role_arn: "arn:aws:iam::111122223333:role/ContextIngestionRole",
},
scope: {
selectors: [
{
path: [
{
id: "arn:aws:glue:us-east-1:111122223333:catalog",
level: "glueCatalog",
},
{
id: "sales_db",
level: "glueDatabase",
},
],
},
{
path: [
{
id: "arn:aws:glue:us-east-1:111122223333:catalog",
level: "glueCatalog",
},
{
id: "marketing_db",
level: "glueDatabase",
},
],
},
],
},
status: "ACTIVE",
updated_at: Time.parse("2026-11-05T10:45:00Z"),
}
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_connection({
connection_id: "ConnectionIdentifier", # required
name: "ResourceName",
scope: {
selectors: [
{
path: [ # required
{
level: "PathSegmentValue", # required
id: "PathSegmentIdValue", # required
},
],
},
],
},
access_config: {
iam_role: {
role_arn: "RoleArn", # required
},
},
sync_schedule: {
frequency: "HOURLY", # accepts HOURLY, DAILY, WEEKLY, MONTHLY
cron_expression: "CronExpression",
},
ingestion_config: { # required
role_arn: "RoleArn", # required
},
glue_connection_mappings: [
{
path: [ # required
{
level: "PathSegmentValue", # required
id: "PathSegmentIdValue", # required
},
],
glue_connection_arn: "ArnString", # required
},
],
publish: false,
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.name #=> String
resp.data_source.type #=> String, one of "GLUE_DATA_CATALOG", "BEDROCK_KNOWLEDGE_BASE", "DATABRICKS", "SNOWFLAKE"
resp.data_source.location.arn #=> String
resp.scope.selectors #=> Array
resp.scope.selectors[0].path #=> Array
resp.scope.selectors[0].path[0].level #=> String
resp.scope.selectors[0].path[0].id #=> String
resp.access_config.iam_role.role_arn #=> String
resp.sync_schedule.frequency #=> String, one of "HOURLY", "DAILY", "WEEKLY", "MONTHLY"
resp.sync_schedule.cron_expression #=> String
resp.ingestion_config.role_arn #=> String
resp.glue_connection_mappings #=> Array
resp.glue_connection_mappings[0].path #=> Array
resp.glue_connection_mappings[0].path[0].level #=> String
resp.glue_connection_mappings[0].path[0].id #=> String
resp.glue_connection_mappings[0].glue_connection_arn #=> String
resp.status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.failure.code #=> String, one of "GLUE_CONNECTION_UNAVAILABLE"
resp.failure.message #=> String
resp.sub_status #=> String, one of "GLUE_CONNECTION_CREATED", "GLUE_CONNECTION_VALIDATED", "SYNC_JOB_CREATED"
resp.created_at #=> Time
resp.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:connection_id
(required, String)
—
The connection to update, by its ID (which starts with
conn-) or its ARN. -
:name
(String)
—
The new name. If you omit it, the name is unchanged.
-
:scope
(Types::DataSourceScope)
—
The new ingestion scope for the connection. If you omit it, the existing scope is unchanged. The rules of
CreateConnectionRequest.scopeapply, with the following additions:A
DATABRICKSorSNOWFLAKEscope names at most onedatabricksCatalogorsnowflakeDatabase, unless the existing scope already names each one.If the stored scope has a selector with a
glueServicesegment, the new scope can't be empty. Every selector that it adds must also have aglueServicesegment. Otherwise, the request fails withValidationException. You can keep a selector that the stored scope already has, so resending the stored scope unchanged succeeds.
-
:access_config
(Types::AccessConfig)
—
The updated access configuration for the data source. If you omit it, the existing configuration is unchanged. If you provide one, it replaces the stored configuration, including its variant.
For
DATABRICKSandSNOWFLAKE, a configuration with no variant clears a storediamRole, and the connection is then returned with noaccessConfig.For
GLUE_DATA_CATALOGandBEDROCK_KNOWLEDGE_BASE, you cannot add or remove theiamRole. An update that adds aniamRoleto a connection stored without one fails withValidationException. So does an update that provides a configuration withoutiamRolefor a connection that has one. You can replace a stored role with another role. To change how such a connection reads its data source, delete the connection and create it again. -
:sync_schedule
(Types::SyncSchedule)
—
The new sync schedule for a
DATABRICKSorSNOWFLAKEsource. If you omit it, the existing schedule is unchanged. Not accepted forGLUE_DATA_CATALOGandBEDROCK_KNOWLEDGE_BASEconnections. -
:ingestion_config
(required, Types::IngestionConfig)
—
The ingestion configuration: the IAM role that a data producer assumes to push data into this connection. Required on every update, so that an existing connection always has an ingestion role that AWS Context can authorize. You must have
iam:PassRolepermission to pass this role to the data producer, and the role must be in your account. You can't clear the role. -
:glue_connection_mappings
(Array<Types::GlueConnectionMapping>)
—
The AWS Glue connection for each
redshiftNamespace, and for eachrdsInstanceandrdsDatabasepair, inscope. If you omit it, the stored list is kept. A list replaces the stored list, and an empty list clears it. If the update changesscope, or changes the role of a connection to another account's catalog, AWS Context validates the kept list again. The rules are those ofCreateConnectionRequest.glueConnectionMappings. You can't change the list of aSNOWFLAKEconnection, which is keyed bysnowflakeDatabase: omit it or send it unchanged. -
:publish
(Boolean)
—
Specifies whether to publish a third-party connection created with
publish: false. Iftrue, AWS Context configures catalog synchronization. The connection moves to ACTIVE when AWS Glue finishes provisioning the managed crawler. This has no effect on an ACTIVE connection.falseis not accepted, because a connection can't be unpublished. Delete the connection instead.
Returns:
-
(Types::UpdateConnectionResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #name => String
- #data_source => Types::DataSourceReference
- #scope => Types::DataSourceScope
- #access_config => Types::AccessConfig
- #sync_schedule => Types::SyncSchedule
- #ingestion_config => Types::IngestionConfig
- #glue_connection_mappings => Array<Types::GlueConnectionMapping>
- #status => String
- #failure => Types::ConnectionFailure
- #sub_status => String
- #created_at => Time
- #updated_at => Time
See Also:
7016 7017 7018 7019 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 7016 def update_connection(params = {}, options = {}) req = build_request(:update_connection, params) req.send_request(options) end |
#update_curation_policy(params = {}) ⇒ Types::UpdateCurationPolicyResponse
Updates a curation policy's working copy.
Examples:
Example: Update a curation policy
Example: Update a curation policy
# The following example changes the working copy of a curation policy to also hold change sets that ontology grounding
# generates, and extends the auto-reject window to 14 days.
resp = client.update_curation_policy({
auto_reject_after_seconds: 1209600,
curation_policy_id: "pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
policy_document: "forbid (\n principal,\n action == AWS::Context::Action::\"PublishChangeSet\",\n resource is AWS::Context::ChangeSet\n)\nwhen { resource has generatedBy && (resource.generatedBy == AWS::Context::Activity::\"TRACE_ANALYSIS\" || resource.generatedBy == AWS::Context::Activity::\"ONTOLOGY_GROUNDING\") };",
revision_id: "e3a5c7b9-1d4f-4b6a-8c2e-9f0b1d3a5c7e",
})
resp.to_h outputs the following:
{
name: "hold-trace-analysis-changes",
arn: "arn:aws:context:us-east-1:111122223333:curation-policy/pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
auto_reject_after_seconds: 1209600,
created_at: Time.parse("2026-03-10T16:20:00Z"),
description: "Holds changes that trace analysis generates for review before they are applied.",
id: "pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
last_published_version: "1",
policy_document: "forbid (\n principal,\n action == AWS::Context::Action::\"PublishChangeSet\",\n resource is AWS::Context::ChangeSet\n)\nwhen { resource has generatedBy && (resource.generatedBy == AWS::Context::Activity::\"TRACE_ANALYSIS\" || resource.generatedBy == AWS::Context::Activity::\"ONTOLOGY_GROUNDING\") };",
revision_id: "d41d8cd9-8f00-4b20-9e98-0998ecf8427e",
status: "ACTIVE",
updated_at: Time.parse("2026-03-24T09:15:00Z"),
}
Example: Update a curation policy with a stale revision ID, which fails with ConflictException
Example: Update a curation policy with a stale revision ID, which fails with ConflictException
# The following example fails because another edit changed the policy's working copy after the caller last read it, so the
# revision ID no longer matches.
resp = client.update_curation_policy({
curation_policy_id: "pol-3e7a9c1b5d2f4a6e8b0c2d4f6a8b1c3e",
description: "Holds trace analysis and ontology grounding changes for review.",
revision_id: "8f14e45f-ceea-4e7a-9b1d-2c3a4b5c6d7e",
})
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_curation_policy({
client_token: "ClientToken",
curation_policy_id: "CurationPolicyId", # required
revision_id: "CurationPolicyRevision", # required
name: "ResourceName",
description: "UserDefinedString",
policy_document: "PolicyText",
auto_reject_after_seconds: 1,
})
Response structure
Response structure
resp.id #=> String
resp.arn #=> String
resp.name #=> String
resp.last_published_version #=> String
resp.revision_id #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.auto_reject_after_seconds #=> Integer
resp.description #=> String
resp.policy_document #=> String
resp.status #=> String, one of "DRAFT", "ACTIVE", "DELETED"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
Makes a retry safe: the same token with the same parameters returns the current policy instead of a ConflictException. A token used with different parameters is a ValidationException whose message names
clientToken, checked first. A retry with the same parameters after the policy was deleted is a ConflictException.A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:curation_policy_id
(required, String)
—
The ID of the curation policy to update.
-
:revision_id
(required, String)
—
The
revisionIdof the working copy that you edited, as you last read it. If a concurrent edit advanced the revision, the request fails withConflictException. -
:name
(String)
—
The new name. If you omit it, the name is unchanged. This operation updates only the members that you include. You can't use it to clear an optional member.
-
:description
(String)
—
The new description. If you omit it, the description is unchanged.
-
:policy_document
(String)
—
The new Cedar policy document. If you omit it, the document is unchanged.
-
:auto_reject_after_seconds
(Integer)
—
The new auto-reject window, in seconds, from 86,400 (1 day) to 15,552,000 (180 days). If you omit it, the window is unchanged. You can't clear it with this operation.
Returns:
-
(Types::UpdateCurationPolicyResponse)
—
Returns a response object which responds to the following methods:
- #id => String
- #arn => String
- #name => String
- #last_published_version => String
- #revision_id => String
- #created_at => Time
- #updated_at => Time
- #auto_reject_after_seconds => Integer
- #description => String
- #policy_document => String
- #status => String
See Also:
7141 7142 7143 7144 |
# File 'gems/aws-sdk-context/lib/aws-sdk-context/client.rb', line 7141 def update_curation_policy(params = {}, options = {}) req = build_request(:update_curation_policy, params) req.send_request(options) end |