Skip to main content

Client

Struct Client 

Source
pub struct Client { /* private fields */ }
Expand description

Client for AWS Context

Client for invoking operations on AWS Context. Each operation on AWS Context is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

§Constructing a Client

A Config is required to construct a client. For most use cases, the aws-config crate should be used to automatically resolve this config using aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared across multiple different AWS SDK clients. This config resolution process can be customized by calling aws_config::from_env() instead, which returns a ConfigLoader that uses the builder pattern to customize the default config.

In the simplest case, creating a client looks as follows:

let config = aws_config::load_from_env().await;
let client = aws_sdk_context::Client::new(&config);

Occasionally, SDKs may have additional service-specific values that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Builder struct implements From<&SdkConfig>, so setting these specific settings can be done as follows:

let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_context::config::Builder::from(&sdk_config)
    .some_service_specific_setting("value")
    .build();

See the aws-config docs and Config for more information on customizing configuration.

Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.

§Using the Client

A client has a function for every operation that can be performed by the service. For example, the AcceptCurationProposal operation has a Client::accept_curation_proposal, function which returns a builder for that operation. The fluent builder ultimately has a send() function that returns an async future that returns a result, as illustrated below:

ⓘ
let result = client.accept_curation_proposal()
    .curation_proposal_id("example")
    .send()
    .await;

The underlying HTTP requests that get made by this can be modified with the customize_operation function on the fluent builder. See the customize module for more information.

Implementations§

Source§

impl Client

Source

pub fn accept_curation_proposal(&self) -> AcceptCurationProposalFluentBuilder

Constructs a fluent builder for the AcceptCurationProposal operation.

  • The fluent builder is configurable:
  • On success, responds with AcceptCurationProposalOutput with field(s):
    • change_set_id(String):

      The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.

    • title(Option<String>):

      A one-line English title that AWS Context composes for the proposal, at most 1,024 characters. For example, Add ‘orders’ and 2 more entities, and 20 relationships, Add ‘orders → customers’ and 2 more relationships, or Associate ontology ‘my-ontology’ version 2. The title names the lead node (the node that starts the most edges, otherwise the first node) by its name, or by its ID if it has no name. For an edge-only change, it names the lead relationship’s two node IDs. For an ontology load, it names the ontology ID and version. The title is for display only. It is not translated and is not meant to be parsed.

      For an ACL_RESTRICTED change set (see accessControl), the title contains only the verb and the counts, with no node, edge, type, or ontology. The title is absent when the change set is unreadable or has nothing to describe, such as a change set that records a connection’s removal. A node name or ID, ontology ID, or ontology version longer than 128 characters is truncated to 128 characters, ending in ….

    • generated_by(Option<Activity>):

      The activity that generated the change set (see Activity). This member can be absent, so handle a proposal that has no activity. For example, it’s absent when the change set is unreadable, when AWS Context wrote the change set to load an ontology’s schema, when the change set records a connection’s removal, and when this API version doesn’t recognize the activity.

    • revision_id(String):

      An opaque revision token. Pass it back as revisionId when you accept or reject the proposal.

    • status(CurationProposalStatus):

      The status of the curation proposal, such as PENDING_REVIEW while it waits for a decision, APPROVED or REJECTED once it is decided, or ARCHIVED when the connection that produced it was removed from the agent context. New values can be added, so handle a status that you don’t recognize.

      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 (statusReasonCode REQUEST_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.code is CONNECTION_REMOVED.

    • status_reason_code(Option<StatusReasonCode>):

      Why the service decided the proposal, when it did: REQUEST_EXPIRED when a holding policy’s auto-reject window passed with no decision. Absent when a curator decided it.

      Valid values:

      • REQUEST_EXPIRED - The auto-reject window of a policy that held the proposal passed with no decision, so the service rejected it.

      • CONNECTION_REMOVED - The connection was removed from the agent context. AWS Context removes the data that only that connection produced, and archives the connection’s pending proposals.

    • access_control(Option<AccessControl>):

      Who can read the authorizing change set’s content. See AccessControl. If the value is ACL_RESTRICTED, ListChangeSetOperations on changeSetId returns the operations only to an allowed end user. Any other caller gets AccessDeniedException, and GetChangeSet returns only metadata, and the proposal’s title has no node names or edge endpoints. The service returns accessControl on every proposal.

      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’s title names no nodes or edges.

      • NO_ACL - Every caller can read the content.

    • agent_context_id(String):

      The agent context’s ID.

    • expires_at(Option<DateTime>):

      The date and time when the review window closes, which is when a holding policy’s autoRejectAfterSeconds elapses. If no curator has decided the proposal by then, AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. Present only while status is PENDING_REVIEW and a holding policy set a window. Absent on every other status.

    • created_at(DateTime):

      The date and time when the curation proposal was created.

    • updated_at(DateTime):

      The date and time when the curation proposal was last updated, such as when its change set was edited or the proposal was decided. Equal to createdAt until the first update.

    • status_reason(Option<StatusReason>):

      Why AWS Context closed the proposal. Set on an ARCHIVED proposal. Absent otherwise.

    • id(String):

      The proposal’s opaque instance ID. Requests take it as curationProposalId.

    • triggering_policies(Option<Vec::<TriggeringPolicy>>):

      The policies that routed this change set to review (the HOLD_FOR_REVIEW entries in the change set’s evaluation). Absent if none held it.

  • On failure, responds with SdkError<AcceptCurationProposalError>
Source§

impl Client

Source

pub fn agentic_retrieve(&self) -> AgenticRetrieveFluentBuilder

Constructs a fluent builder for the AgenticRetrieve operation.

Source§

impl Client

Source

pub fn agentic_retrieve_stream(&self) -> AgenticRetrieveStreamFluentBuilder

Constructs a fluent builder for the AgenticRetrieveStream operation.

Source§

impl Client

Source

pub fn associate_curation_policy(&self) -> AssociateCurationPolicyFluentBuilder

Constructs a fluent builder for the AssociateCurationPolicy operation.

Source§

impl Client

Source

pub fn cancel_ontology_induction(&self) -> CancelOntologyInductionFluentBuilder

Constructs a fluent builder for the CancelOntologyInduction operation.

Source§

impl Client

Source

pub fn cancel_task(&self) -> CancelTaskFluentBuilder

Constructs a fluent builder for the CancelTask operation.

Source§

impl Client

Source

pub fn create_agent_context(&self) -> CreateAgentContextFluentBuilder

Constructs a fluent builder for the CreateAgentContext operation.

Source§

impl Client

Source

pub fn create_change_set(&self) -> CreateChangeSetFluentBuilder

Constructs a fluent builder for the CreateChangeSet operation.

Source§

impl Client

Source

pub fn create_connection(&self) -> CreateConnectionFluentBuilder

Constructs a fluent builder for the CreateConnection operation.

  • The fluent builder is configurable:
    • client_token(impl Into<String>) / set_client_token(Option<String>):
      required: false

      A client idempotency token. It is optional, so the AWS SDKs can generate it automatically and reuse it on retries. A retry with an identical request returns the original connection. A different request returns ValidationException. acknowledgements, tags and, once the connection is ACTIVE, publish are not compared with the original request. A create refused for a missing acknowledgement records no token.


    • name(impl Into<String>) / set_name(Option<String>):
      required: true

      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(DataSourceReference) / set_data_source(Option<DataSourceReference>):
      required: true

      The external data source that this connection binds to: its type and location.arn. The ARN must be in your account, except for GLUE_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 (:catalog or :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 specify scope with an AWS Glue connection ARN. While AWS Glue is still validating the connection, the request fails with ConflictException. If its validation failed, the request fails with AccessDeniedException.

      • DATABRICKS or SNOWFLAKE - The ARN of an existing AWS Glue connection whose AWS Glue ConnectionType matches type. AWS Context validates its Credential Broker settings, if present, and doesn’t store them.


    • scope(DataSourceScope) / set_scope(Option<DataSourceScope>):
      required: false

      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 one snowflakeDatabase. A GLUE_DATA_CATALOG scope can select by service with a glueService segment (see DataSourceScope). An unknown service name, a repeated or misplaced glueService segment, a later level of another service, or glueService on another connection type returns ValidationException.


    • access_config(AccessConfig) / set_access_config(Option<AccessConfig>):
      required: false

      The access configuration for the data source, which names the AWS Identity and Access Management (IAM) role for data access. Optional.

      For GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE, iamRole is the IAM role that AWS Context assumes to read the source and the AWS Glue connections in glueConnectionMappings. If you omit accessConfig or 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 that iamRole can read the source, and the request fails if it can’t. A source in another account with no iamRole isn’t checked when the connection is created. An accessConfig with no variant is stored as absent and is not returned on the connection.

      For DATABRICKS and SNOWFLAKE, AWS Glue reads the source with the ROLE_ARN of the AWS Glue connection in dataSource, not with accessConfig. For these types, accessConfig is reserved for other roles.


    • sync_schedule(SyncSchedule) / set_sync_schedule(Option<SyncSchedule>):
      required: false

      How often AWS Context re-syncs a DATABRICKS or SNOWFLAKE source. If you omit it, the default is DAILY. Not accepted for GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections. You can change it with UpdateConnection.


    • ingestion_config(IngestionConfig) / set_ingestion_config(Option<IngestionConfig>):
      required: true

      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 have iam:PassRole permission to pass this role to the data producer, and the role must be in your account.


    • glue_connection_mappings(GlueConnectionMapping) / set_glue_connection_mappings(Option<Vec::<GlueConnectionMapping>>):
      required: false

      The AWS Glue connection to use for each redshiftNamespace, each rdsInstance and rdsDatabase pair, or each snowflakeDatabase in scope, keyed by path. Optional. You can specify 0–20 entries. The following rules apply:

      • Once an entry names a level, every resource of that level in scope needs an entry. While an entry names rdsInstance, every selector that names an rdsInstance must also name its rdsDatabase.

      • redshiftNamespace and rdsInstance entries require dataSource to be an AWS Glue Data Catalog ARN. accessConfig.iamRole is optional.

      • snowflakeDatabase entries require dataSource to be an AWS Glue connection ARN.

      • While any entry is present, scope cannot contain a selector that names only a catalog or a glueService, because such a selector covers every resource of the catalog or service. Otherwise, a selector with a glueService segment follows these rules as it would without that segment. An entry’s path never names glueService.

      • A selector that names only glueService REDSHIFT or RDS, with no namespace or instance, cannot be combined with any entry. Such a connection reads only the service’s metadata, and you cannot query its data.


    • publish(bool) / set_publish(Option<bool>):
      required: false

      Specifies whether to configure catalog synchronization and wait for it to be provisioned during this call. If you omit it, the default is true. For a DATABRICKS or SNOWFLAKE connection, false validates only the AWS Glue connection. The connection is returned as CREATING with subStatus GLUE_CONNECTION_VALIDATED, and you publish it later by calling UpdateConnection with publish set to true. Ignored for GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections, which have no sync job.


    • acknowledgements(impl Into<String>) / set_acknowledgements(Option<Vec::<String>>):
      required: false

      The conditions that you acknowledge AWS Context can’t honor. Specify CUSTOMER_MANAGED_KEY when the knowledge base is encrypted with an AWS KMS customer managed key and you accept that AWS Context stores the ingested data under AWS owned keys. If you omit it, creating a connection to such a knowledge base fails with ValidationException. An unknown or repeated value also fails with ValidationException.


    • tags(impl Into<String>, impl Into<String>) / set_tags(Option<HashMap::<String, String>>):
      required: false

      Tags to add to the connection when you create it: up to 200 in the request, of which at most 50 can be user tags. Keys can’t start with aws:. To add tags, you also need context:TagResource permission on the new connection. If you specify more than 50 user tags, the request fails with ServiceQuotaExceededException, as on TagResource. If an AWS Organizations tag policy refuses a tag, the request fails with ValidationException.


  • On success, responds with CreateConnectionOutput with field(s):
    • id(String):

      The ID of the connection.

    • arn(String):

      The ARN of the connection.

    • name(String):

      The name of the connection. You set it when you create the connection and can change it with UpdateConnection. Uses the same constraints as an agent context name. Always present.

    • data_source(Option<DataSourceReference>):

      The typed reference to the external data source that this connection binds to. Its type, the authoritative kind of data source, is in dataSource.type.

    • scope(Option<DataSourceScope>):

      The hierarchical subset of the data source this connection ingests.

    • access_config(Option<AccessConfig>):

      Per-connection access configuration: the IAM role used for data access.

    • sync_schedule(Option<SyncSchedule>):

      The effective sync schedule. Present for DATABRICKS and SNOWFLAKE connections (DAILY if you didn’t specify one). Absent for GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections, which are event-driven.

    • ingestion_config(Option<IngestionConfig>):

      The connection’s ingestion configuration (the IAM role a data producer assumes to push into this connection). Absent when no ingestion role is configured.

    • glue_connection_mappings(Option<Vec::<GlueConnectionMapping>>):

      The AWS Glue connection for each redshiftNamespace, each rdsInstance and rdsDatabase pair, or each snowflakeDatabase in scope. Absent when none is configured.

    • status(ConnectionStatus):

      The connection’s status. Valid values:

      • CREATING - Validation or provisioning is still in progress.

      • ACTIVE - The data source is reachable and, for a DATABRICKS or SNOWFLAKE connection, AWS Glue has provisioned catalog synchronization and returned its crawler ARN. This doesn’t mean that a crawl has started or completed.

      • UPDATING - The connection is being updated.

      • DELETING - The connection is being deleted.

      • FAILED - Validation or provisioning failed, and the connection can’t recover.

    • failure(Option<ConnectionFailure>):

      The reason the connection is FAILED. Absent in every other status.

    • sub_status(Option<ResourceSubStatus>):

      The last milestone a third-party connection’s lifecycle reached. Present in two statuses: CREATING, where it shows the resources provisioned so far, and DELETING, where it shows the resources removed so far. Absent in every other status and while nothing has been done yet in the current direction. CREATING at GLUE_CONNECTION_VALIDATED on a connection created with publish: false means it is waiting for UpdateConnection publish: true.

    • created_at(DateTime):

      The date and time when the connection was created.

    • updated_at(DateTime):

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

  • On failure, responds with SdkError<CreateConnectionError>
Source§

impl Client

Source

pub fn create_curation_policy(&self) -> CreateCurationPolicyFluentBuilder

Constructs a fluent builder for the CreateCurationPolicy operation.

  • The fluent builder is configurable:
  • On success, responds with CreateCurationPolicyOutput with field(s):
    • id(String):

      The ID of the curation policy. Requests take it as curationPolicyId.

    • arn(String):

      The ARN of the curation policy.

    • name(String):

      The name of the curation policy.

    • last_published_version(Option<String>):

      Newest published version. Absent until the policy’s first version is created (a DRAFT that has never been published has no version).

    • revision_id(String):

      An opaque revision token for the working copy. Pass it as revisionId on UpdateCurationPolicy. The update applies only if the token still matches the current working copy.

    • created_at(DateTime):

      The date and time when the curation policy was created.

    • updated_at(DateTime):

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

    • auto_reject_after_seconds(Option<i64>):

      The number of seconds that a proposal held for review under this policy can wait for a decision before AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. From 86,400 seconds (1 day) to 15,552,000 seconds (180 days). Absent if proposals held under this policy are never rejected automatically.

    • description(Option<String>):

      The description of the curation policy.

    • policy_document(String):

      The policy’s rules, as a Cedar policy document: the rule the engine evaluates. Always present on the resource.

    • status(CurationPolicyStatus):

      The policy’s status.

      Valid values:

      • DRAFT - The policy has never been published, so no agent context enforces it.

      • ACTIVE - The policy has a published version, which the agent contexts associated with it enforce.

      • DELETED - The policy is deleted. Nothing enforces it, and only GetCurationPolicy still returns it.

  • On failure, responds with SdkError<CreateCurationPolicyError>
Source§

impl Client

Source

pub fn create_curation_policy_version( &self, ) -> CreateCurationPolicyVersionFluentBuilder

Constructs a fluent builder for the CreateCurationPolicyVersion operation.

  • The fluent builder is configurable:
  • On success, responds with CreateCurationPolicyVersionOutput with field(s):
    • id(String):

      The ID of the curation policy. Requests take it as curationPolicyId.

    • arn(String):

      The ARN of the curation policy.

    • name(String):

      The name of the curation policy.

    • last_published_version(Option<String>):

      Newest published version. Absent until the policy’s first version is created (a DRAFT that has never been published has no version).

    • revision_id(String):

      An opaque revision token for the working copy. Pass it as revisionId on UpdateCurationPolicy. The update applies only if the token still matches the current working copy.

    • created_at(DateTime):

      The date and time when the curation policy was created.

    • updated_at(DateTime):

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

    • auto_reject_after_seconds(Option<i64>):

      The number of seconds that a proposal held for review under this policy can wait for a decision before AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. From 86,400 seconds (1 day) to 15,552,000 seconds (180 days). Absent if proposals held under this policy are never rejected automatically.

    • description(Option<String>):

      The description of the curation policy.

    • policy_document(String):

      The policy’s rules, as a Cedar policy document: the rule the engine evaluates. Always present on the resource.

    • status(CurationPolicyStatus):

      The policy’s status.

      Valid values:

      • DRAFT - The policy has never been published, so no agent context enforces it.

      • ACTIVE - The policy has a published version, which the agent contexts associated with it enforce.

      • DELETED - The policy is deleted. Nothing enforces it, and only GetCurationPolicy still returns it.

  • On failure, responds with SdkError<CreateCurationPolicyVersionError>
Source§

impl Client

Source

pub fn create_ontology(&self) -> CreateOntologyFluentBuilder

Constructs a fluent builder for the CreateOntology operation.

Source§

impl Client

Source

pub fn delete_agent_context(&self) -> DeleteAgentContextFluentBuilder

Constructs a fluent builder for the DeleteAgentContext operation.

Source§

impl Client

Source

pub fn delete_connection(&self) -> DeleteConnectionFluentBuilder

Constructs a fluent builder for the DeleteConnection operation.

  • The fluent builder is configurable:
    • connection_id(impl Into<String>) / set_connection_id(Option<String>):
      required: true

      The connection to delete, by its ID (which starts with conn-) or its ARN.


    • deletion_mode(DeletionMode) / set_deletion_mode(Option<DeletionMode>):
      required: false

      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 is RETAIN. It has no effect on GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections.


  • On success, responds with DeleteConnectionOutput
  • On failure, responds with SdkError<DeleteConnectionError>
Source§

impl Client

Source

pub fn delete_curation_policy(&self) -> DeleteCurationPolicyFluentBuilder

Constructs a fluent builder for the DeleteCurationPolicy operation.

Source§

impl Client

Source

pub fn delete_ontology(&self) -> DeleteOntologyFluentBuilder

Constructs a fluent builder for the DeleteOntology operation.

Source§

impl Client

Source

pub fn delete_ontology_induction(&self) -> DeleteOntologyInductionFluentBuilder

Constructs a fluent builder for the DeleteOntologyInduction operation.

Source§

impl Client

Source

pub fn delete_resource_policy(&self) -> DeleteResourcePolicyFluentBuilder

Constructs a fluent builder for the DeleteResourcePolicy operation.

Source§

impl Client

Source

pub fn disassociate_curation_policy( &self, ) -> DisassociateCurationPolicyFluentBuilder

Constructs a fluent builder for the DisassociateCurationPolicy operation.

Source§

impl Client

Source

pub fn execute_sql(&self) -> ExecuteSqlFluentBuilder

Constructs a fluent builder for the ExecuteSql operation.

Source§

impl Client

Source

pub fn get_agent_context(&self) -> GetAgentContextFluentBuilder

Constructs a fluent builder for the GetAgentContext operation.

Source§

impl Client

Source

pub fn get_change_set(&self) -> GetChangeSetFluentBuilder

Constructs a fluent builder for the GetChangeSet operation.

  • The fluent builder is configurable:
  • On success, responds with GetChangeSetOutput with field(s):
    • agent_context_id(String):

      The agent context’s ID.

    • status(ChangeSetStatus):

      The status of the change set. Valid values:

      • DRAFT - AWS Context is evaluating the change set against the agent context’s curation policies.

      • PENDING - Held for review as a curation proposal. While the change set is PENDING, you can remove operations from it with UpdateChangeSet.

      • AUTHORIZED - The change set is approved, and AWS Context is applying it.

      • SUPPRESSED - AWS Context won’t apply the change set, because a curation policy denied it or its curation proposal was closed without approval.

      • PUBLISHED - AWS Context applied the change set to the agent context.

      • FAILED - AWS Context couldn’t apply the change set.

      SUPPRESSED and PUBLISHED are final. A FAILED change set can still change to PUBLISHED or PENDING if AWS Context retries applying it. New values can be added, so handle a status that you don’t recognize.

    • created_at(DateTime):

      The date and time when the change set was created.

    • updated_at(DateTime):

      The date and time when the change set was last updated, such as when its status changed or its operations were edited.

    • access_control(Option<AccessControl>):

      See AccessControl. The service returns it on every item.

      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’s title names no nodes or edges.

      • NO_ACL - Every caller can read the content.

    • generated_by(Option<Activity>):

      The activity that generated the change set. A change set that an IMPORT_ONTOLOGY task writes carries IMPORT_ONTOLOGY_TASK, and one that a CreateChangeSet call makes carries DIRECT_MODIFICATION. A sync of a connected data source’s own metadata, such as an AWS Glue Data Catalog sync, carries DATA_SOURCE_INGESTION. To list the change sets that carry a value, filter ListChangeSets on it.

      This member can be absent, so handle a change set that has no activity. For example, it’s absent on a change set that records a connection’s removal, on a change set that AWS Context wrote when it loaded an ontology’s schema, and on a change set whose activity this API version doesn’t recognize.

    • status_reason(Option<StatusReason>):

      Why AWS Context created or closed the change set, for example because a connection was removed from the agent context. AWS Context keeps it across later status changes, including a curator’s decision. Absent when AWS Context gave no reason.

    • id(String):

      The change set’s opaque instance ID. Requests take it as changeSetId.

    • change_set_version(Option<i32>):

      The change set’s latest version. Pass it to UpdateChangeSet. Each version is immutable. The number increases by one on each edit and each status change.

    • connection_arn(Option<String>):

      The ARN of the connection that produced this change set. Absent for a change that no connection produced, such as a direct CreateChangeSet call, and for every ACL_RESTRICTED change set, because the connection would identify the source of the restricted content.

  • On failure, responds with SdkError<GetChangeSetError>
Source§

impl Client

Source

pub fn get_connection(&self) -> GetConnectionFluentBuilder

Constructs a fluent builder for the GetConnection operation.

  • The fluent builder is configurable:
  • On success, responds with GetConnectionOutput with field(s):
    • id(String):

      The ID of the connection.

    • arn(String):

      The ARN of the connection.

    • name(String):

      The name of the connection. You set it when you create the connection and can change it with UpdateConnection. Uses the same constraints as an agent context name. Always present.

    • data_source(Option<DataSourceReference>):

      The typed reference to the external data source that this connection binds to. Its type, the authoritative kind of data source, is in dataSource.type.

    • scope(Option<DataSourceScope>):

      The hierarchical subset of the data source this connection ingests.

    • access_config(Option<AccessConfig>):

      Per-connection access configuration: the IAM role used for data access.

    • sync_schedule(Option<SyncSchedule>):

      The effective sync schedule. Present for DATABRICKS and SNOWFLAKE connections (DAILY if you didn’t specify one). Absent for GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections, which are event-driven.

    • ingestion_config(Option<IngestionConfig>):

      The connection’s ingestion configuration (the IAM role a data producer assumes to push into this connection). Absent when no ingestion role is configured.

    • glue_connection_mappings(Option<Vec::<GlueConnectionMapping>>):

      The AWS Glue connection for each redshiftNamespace, each rdsInstance and rdsDatabase pair, or each snowflakeDatabase in scope. Absent when none is configured.

    • status(ConnectionStatus):

      The connection’s status. Valid values:

      • CREATING - Validation or provisioning is still in progress.

      • ACTIVE - The data source is reachable and, for a DATABRICKS or SNOWFLAKE connection, AWS Glue has provisioned catalog synchronization and returned its crawler ARN. This doesn’t mean that a crawl has started or completed.

      • UPDATING - The connection is being updated.

      • DELETING - The connection is being deleted.

      • FAILED - Validation or provisioning failed, and the connection can’t recover.

    • failure(Option<ConnectionFailure>):

      The reason the connection is FAILED. Absent in every other status.

    • sub_status(Option<ResourceSubStatus>):

      The last milestone a third-party connection’s lifecycle reached. Present in two statuses: CREATING, where it shows the resources provisioned so far, and DELETING, where it shows the resources removed so far. Absent in every other status and while nothing has been done yet in the current direction. CREATING at GLUE_CONNECTION_VALIDATED on a connection created with publish: false means it is waiting for UpdateConnection publish: true.

    • created_at(DateTime):

      The date and time when the connection was created.

    • updated_at(DateTime):

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

  • On failure, responds with SdkError<GetConnectionError>
Source§

impl Client

Source

pub fn get_curation_policy(&self) -> GetCurationPolicyFluentBuilder

Constructs a fluent builder for the GetCurationPolicy operation.

Source§

impl Client

Source

pub fn get_curation_proposal(&self) -> GetCurationProposalFluentBuilder

Constructs a fluent builder for the GetCurationProposal operation.

  • The fluent builder is configurable:
  • On success, responds with GetCurationProposalOutput with field(s):
    • change_set_id(String):

      The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.

    • title(Option<String>):

      A one-line English title that AWS Context composes for the proposal, at most 1,024 characters. For example, Add ‘orders’ and 2 more entities, and 20 relationships, Add ‘orders → customers’ and 2 more relationships, or Associate ontology ‘my-ontology’ version 2. The title names the lead node (the node that starts the most edges, otherwise the first node) by its name, or by its ID if it has no name. For an edge-only change, it names the lead relationship’s two node IDs. For an ontology load, it names the ontology ID and version. The title is for display only. It is not translated and is not meant to be parsed.

      For an ACL_RESTRICTED change set (see accessControl), the title contains only the verb and the counts, with no node, edge, type, or ontology. The title is absent when the change set is unreadable or has nothing to describe, such as a change set that records a connection’s removal. A node name or ID, ontology ID, or ontology version longer than 128 characters is truncated to 128 characters, ending in ….

    • generated_by(Option<Activity>):

      The activity that generated the change set (see Activity). This member can be absent, so handle a proposal that has no activity. For example, it’s absent when the change set is unreadable, when AWS Context wrote the change set to load an ontology’s schema, when the change set records a connection’s removal, and when this API version doesn’t recognize the activity.

    • revision_id(String):

      An opaque revision token. Pass it back as revisionId when you accept or reject the proposal.

    • status(CurationProposalStatus):

      The status of the curation proposal, such as PENDING_REVIEW while it waits for a decision, APPROVED or REJECTED once it is decided, or ARCHIVED when the connection that produced it was removed from the agent context. New values can be added, so handle a status that you don’t recognize.

      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 (statusReasonCode REQUEST_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.code is CONNECTION_REMOVED.

    • status_reason_code(Option<StatusReasonCode>):

      Why the service decided the proposal, when it did: REQUEST_EXPIRED when a holding policy’s auto-reject window passed with no decision. Absent when a curator decided it.

      Valid values:

      • REQUEST_EXPIRED - The auto-reject window of a policy that held the proposal passed with no decision, so the service rejected it.

      • CONNECTION_REMOVED - The connection was removed from the agent context. AWS Context removes the data that only that connection produced, and archives the connection’s pending proposals.

    • access_control(Option<AccessControl>):

      Who can read the authorizing change set’s content. See AccessControl. If the value is ACL_RESTRICTED, ListChangeSetOperations on changeSetId returns the operations only to an allowed end user. Any other caller gets AccessDeniedException, and GetChangeSet returns only metadata, and the proposal’s title has no node names or edge endpoints. The service returns accessControl on every proposal.

      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’s title names no nodes or edges.

      • NO_ACL - Every caller can read the content.

    • agent_context_id(String):

      The agent context’s ID.

    • expires_at(Option<DateTime>):

      The date and time when the review window closes, which is when a holding policy’s autoRejectAfterSeconds elapses. If no curator has decided the proposal by then, AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. Present only while status is PENDING_REVIEW and a holding policy set a window. Absent on every other status.

    • created_at(DateTime):

      The date and time when the curation proposal was created.

    • updated_at(DateTime):

      The date and time when the curation proposal was last updated, such as when its change set was edited or the proposal was decided. Equal to createdAt until the first update.

    • status_reason(Option<StatusReason>):

      Why AWS Context closed the proposal. Set on an ARCHIVED proposal. Absent otherwise.

    • id(String):

      The proposal’s opaque instance ID. Requests take it as curationProposalId.

    • triggering_policies(Option<Vec::<TriggeringPolicy>>):

      The policies that routed this change set to review (the HOLD_FOR_REVIEW entries in the change set’s evaluation). Absent if none held it.

  • On failure, responds with SdkError<GetCurationProposalError>
Source§

impl Client

Source

pub fn get_ontology(&self) -> GetOntologyFluentBuilder

Constructs a fluent builder for the GetOntology operation.

  • The fluent builder is configurable:
  • On success, responds with GetOntologyOutput with field(s):
    • arn(String):

      The ARN of the ontology. It has no account for an AWS managed ontology, and includes the account for a customer-owned one. Use it to address the same ontology again.

    • version(String):

      The version of the ontology, in MAJOR.MINOR.PATCH form, for example 1.0.0.

    • template(Option<String>):

      The serialized template JSON for this version (see OntologyTemplate).

    • created_at(Option<DateTime>):

      When this version was created. Absent when the stored version carries no creation time.

    • published_at(Option<DateTime>):

      Publish time of the DEFAULT version. Absent for non-default versions, and while the ontology is DRAFT: a DRAFT ontology stays a draft until you publish it in the AWS Context console.

    • name(Option<String>):

      The ontology’s current display name. The same for every version. Absent for an AWS managed ontology, which has no name, and for a customer-owned ontology that was created without a name and hasn’t been named since.

    • description(Option<String>):

      The ontology’s description. The same for every version. Absent when the ontology has none.

    • derivation_version(Option<String>):

      Identifies the derivation rules that produced this template. Node ID formulas don’t change after a version is published.

    • id(String):

      The ID of the ontology, assigned by AWS Context.

    • status(OntologyStatus):

      The ontology’s status. PUBLISHED for every ontology CreateOntology made. Check it before using the template: a DRAFT ontology stays a draft until you publish it in the AWS Context console, and until then its template is the empty template of version 1.0.0 and GetOntology returns the draft.

    • updated_at(DateTime):

      When the ontology itself last changed. Equal to the ontology’s creation time until the first update. The top-level createdAt (from the version fields) is the returned version’s creation time, not the ontology’s.

    • ontology_induction_id(Option<String>):

      The induction that made the ontology. Absent for an ontology CreateOntology made.

    • source(Option<String>):

      The source document of the returned version, or the draft of a DRAFT ontology, with or without version. Set only when the request set sourceFormat. Absent otherwise.

    • source_format(Option<OntologySourceFormat>):

      The format of the version’s source document. On a DRAFT, TURTLE, the format of the draft. Set whether or not the request asked for source, and a source in the response is in this format. On an AWS managed ontology, it names the format that its template was derived from, but its source is never returned (see sourceFormat on the request).

    • revision_id(Option<String>):

      The revision of the draft. Set only for a DRAFT ontology.

    • validation_issues(Option<Vec::<OntologyValidationIssue>>):

      Non-fatal warnings raised while deriving the returned version. On a DRAFT, the warnings from deriving the draft.

  • On failure, responds with SdkError<GetOntologyError>
Source§

impl Client

Source

pub fn get_ontology_induction(&self) -> GetOntologyInductionFluentBuilder

Constructs a fluent builder for the GetOntologyInduction operation.

Source§

impl Client

Source

pub fn get_resource_policy(&self) -> GetResourcePolicyFluentBuilder

Constructs a fluent builder for the GetResourcePolicy operation.

Source§

impl Client

Source

pub fn get_task(&self) -> GetTaskFluentBuilder

Constructs a fluent builder for the GetTask operation.

Source§

impl Client

Source

pub fn list_agent_contexts(&self) -> ListAgentContextsFluentBuilder

Constructs a fluent builder for the ListAgentContexts operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn list_change_set_operations(&self) -> ListChangeSetOperationsFluentBuilder

Constructs a fluent builder for the ListChangeSetOperations operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • change_set_id(impl Into<String>) / set_change_set_id(Option<String>):
      required: true

      The change set whose operations to page through, by its opaque instance ID.


    • agent_context_id(impl Into<String>) / set_agent_context_id(Option<String>):
      required: true

      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(i32) / set_max_results(Option<i32>):
      required: false

      Maximum number of operations per page (upper bound, not a target). Defaults to 50. A value outside 1–100 fails with ValidationException.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      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 UpdateChangeSet edit, and the change set is still PENDING.

      • 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_RESTRICTED change set, AWS Context checks access before it reads the token, so a caller without access gets AccessDeniedException whatever 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.


  • On success, responds with ListChangeSetOperationsOutput with field(s):
  • On failure, responds with SdkError<ListChangeSetOperationsError>
Source§

impl Client

Source

pub fn list_change_sets(&self) -> ListChangeSetsFluentBuilder

Constructs a fluent builder for the ListChangeSets operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • agent_context_id(impl Into<String>) / set_agent_context_id(Option<String>):
      required: true

      The agent context whose change sets you want to list, by its ID or ARN.


    • status(ChangeSetStatus) / set_status(Option<ChangeSetStatus>):
      required: true

      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 with ValidationException.


    • access_control(AccessControl) / set_access_control(Option<AccessControl>):
      required: false

      The accessControl value to list change sets for. If you omit it, every change set in the status is listed, each with its accessControl. If you specify a value that isn’t listed, the request fails with ValidationException.

      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’s title names no nodes or edges.

      • NO_ACL - Every caller can read the content.


    • generated_by(Activity) / set_generated_by(Option<Activity>):
      required: false

      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 with ValidationException. A change set without a generatedBy, 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 - An IMPORT_DATA_DICTIONARY task wrote the content. Change sets from earlier IMPORT_VERIFIED_QUERIES tasks can also carry this value.

      • IMPORT_VERIFIED_QUERIES_TASK - An IMPORT_VERIFIED_QUERIES task wrote the content.

      • IMPORT_ONTOLOGY_TASK - An IMPORT_ONTOLOGY task imported an ontology.

      • DIRECT_MODIFICATION - A person, an agent, or an application called CreateChangeSet directly.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      Maximum number of results per page (upper bound, not a target). The service might return fewer.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      Opaque pagination cursor from a prior response. Omit for the first page.


  • On success, responds with ListChangeSetsOutput with field(s):
  • On failure, responds with SdkError<ListChangeSetsError>
Source§

impl Client

Source

pub fn list_connections(&self) -> ListConnectionsFluentBuilder

Constructs a fluent builder for the ListConnections operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn list_curation_policies(&self) -> ListCurationPoliciesFluentBuilder

Constructs a fluent builder for the ListCurationPolicies operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn list_curation_proposals(&self) -> ListCurationProposalsFluentBuilder

Constructs a fluent builder for the ListCurationProposals operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • agent_context_id(impl Into<String>) / set_agent_context_id(Option<String>):
      required: true

      The agent context whose proposals you want to list, by its ID or ARN.


    • status(CurationProposalStatus) / set_status(Option<CurationProposalStatus>):
      required: true

      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 (statusReasonCode REQUEST_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.code is CONNECTION_REMOVED.


    • access_control(AccessControl) / set_access_control(Option<AccessControl>):
      required: false

      The accessControl value to list proposals for. If you omit it, every proposal in the status is listed, each with its accessControl. If you specify a value that isn’t listed, the request fails with ValidationException.

      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’s title names no nodes or edges.

      • NO_ACL - Every caller can read the content.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      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(impl Into<String>) / set_next_token(Option<String>):
      required: false

      Opaque pagination cursor from a prior response. Omit for the first page.


  • On success, responds with ListCurationProposalsOutput with field(s):
  • On failure, responds with SdkError<ListCurationProposalsError>
Source§

impl Client

Source

pub fn list_ontologies(&self) -> ListOntologiesFluentBuilder

Constructs a fluent builder for the ListOntologies operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn list_ontology_inductions(&self) -> ListOntologyInductionsFluentBuilder

Constructs a fluent builder for the ListOntologyInductions operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn list_tags_for_resource(&self) -> ListTagsForResourceFluentBuilder

Constructs a fluent builder for the ListTagsForResource operation.

Source§

impl Client

Source

pub fn list_tasks(&self) -> ListTasksFluentBuilder

Constructs a fluent builder for the ListTasks operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder

Constructs a fluent builder for the PutResourcePolicy operation.

Source§

impl Client

Source

pub fn put_trace(&self) -> PutTraceFluentBuilder

Constructs a fluent builder for the PutTrace operation.

  • The fluent builder is configurable:
    • session_id(impl Into<String>) / set_session_id(Option<String>):
      required: false

      The agent session this trace belongs to and the grouping key: multiple PutTrace calls with the same sessionId are one session. Optional. If you omit it, the service generates one and returns it in the response. It is not the traceId: an OTLP batch carries many trace_ids under one session.


    • client_token(impl Into<String>) / set_client_token(Option<String>):
      required: false

      Makes the call idempotent. A retry with the same token and the same request returns the same sessionId and does not write the traces again. Reusing the token fails with ValidationException if the request is different, or if another caller reuses it when accessControlConfig names no entries. A token is honored for 8 hours after its first use. When accessControlConfig names no entries and the caller’s end user cannot be resolved at the time of the retry, the retry fails with ValidationException even if the first attempt stored traces. To complete them, resend with explicit entries under a new token.


    • format(TraceFormat) / set_format(Option<TraceFormat>):
      required: true

      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 (role and content) per document, in conversation order.

      • KIRO - Kiro IDE or Kiro CLI session logs.


    • trace_documents(Blob) / set_trace_documents(Option<Vec::<Blob>>):
      required: true

      The raw trace documents, in the trace schema that format selects. 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(impl Into<String>) / set_agent_context_arns(Option<Vec::<String>>):
      required: true

      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 with ValidationException. AWS Context authorizes context:PutTrace once for each agent context. If any authorization is denied, the whole call fails with AccessDeniedException, and nothing is stored. After authorization, if trace analysis is disabled for an agent context, the call fails with ValidationException, and nothing is stored.


    • trace_metadata(impl Into<String>, impl Into<String>) / set_trace_metadata(Option<HashMap::<String, String>>):
      required: false

      Client-supplied key-value pairs, stored with the traces as-is. The key analysisMode is reserved. A request that sets it fails with AccessDeniedException.


    • access_control_config(AccessControlConfig) / set_access_control_config(Option<AccessControlConfig>):
      required: false

      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 (accessControlConfig absent, or accessControlList absent 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 with ValidationException and stores nothing. In that case, name the principals, or send ALLOW for so that every reader of the agent contexts can see the insights.

      An entry other than without principalType, a principalId that is not valid Unicode, or entries that total more than 65,536 bytes of UTF-8 are rejected with ValidationException. 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 with ValidationException and stores nothing.


  • On success, responds with PutTraceOutput with field(s):
    • session_id(String):

      The session ID for the traces: the sessionId that you specified, or one that AWS Context generated if you omitted it. A successful response means that AWS Context stored every document. A failed call might leave some documents stored. To store the rest without duplicates, retry with the same clientToken.

  • On failure, responds with SdkError<PutTraceError>
Source§

impl Client

Source

pub fn reject_curation_proposal(&self) -> RejectCurationProposalFluentBuilder

Constructs a fluent builder for the RejectCurationProposal operation.

  • The fluent builder is configurable:
  • On success, responds with RejectCurationProposalOutput with field(s):
    • change_set_id(String):

      The change set this proposal reviews. UpdateChangeSet edits that change set in place, so this ID never changes.

    • title(Option<String>):

      A one-line English title that AWS Context composes for the proposal, at most 1,024 characters. For example, Add ‘orders’ and 2 more entities, and 20 relationships, Add ‘orders → customers’ and 2 more relationships, or Associate ontology ‘my-ontology’ version 2. The title names the lead node (the node that starts the most edges, otherwise the first node) by its name, or by its ID if it has no name. For an edge-only change, it names the lead relationship’s two node IDs. For an ontology load, it names the ontology ID and version. The title is for display only. It is not translated and is not meant to be parsed.

      For an ACL_RESTRICTED change set (see accessControl), the title contains only the verb and the counts, with no node, edge, type, or ontology. The title is absent when the change set is unreadable or has nothing to describe, such as a change set that records a connection’s removal. A node name or ID, ontology ID, or ontology version longer than 128 characters is truncated to 128 characters, ending in ….

    • generated_by(Option<Activity>):

      The activity that generated the change set (see Activity). This member can be absent, so handle a proposal that has no activity. For example, it’s absent when the change set is unreadable, when AWS Context wrote the change set to load an ontology’s schema, when the change set records a connection’s removal, and when this API version doesn’t recognize the activity.

    • revision_id(String):

      An opaque revision token. Pass it back as revisionId when you accept or reject the proposal.

    • status(CurationProposalStatus):

      The status of the curation proposal, such as PENDING_REVIEW while it waits for a decision, APPROVED or REJECTED once it is decided, or ARCHIVED when the connection that produced it was removed from the agent context. New values can be added, so handle a status that you don’t recognize.

      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 (statusReasonCode REQUEST_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.code is CONNECTION_REMOVED.

    • status_reason_code(Option<StatusReasonCode>):

      Why the service decided the proposal, when it did: REQUEST_EXPIRED when a holding policy’s auto-reject window passed with no decision. Absent when a curator decided it.

      Valid values:

      • REQUEST_EXPIRED - The auto-reject window of a policy that held the proposal passed with no decision, so the service rejected it.

      • CONNECTION_REMOVED - The connection was removed from the agent context. AWS Context removes the data that only that connection produced, and archives the connection’s pending proposals.

    • access_control(Option<AccessControl>):

      Who can read the authorizing change set’s content. See AccessControl. If the value is ACL_RESTRICTED, ListChangeSetOperations on changeSetId returns the operations only to an allowed end user. Any other caller gets AccessDeniedException, and GetChangeSet returns only metadata, and the proposal’s title has no node names or edge endpoints. The service returns accessControl on every proposal.

      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’s title names no nodes or edges.

      • NO_ACL - Every caller can read the content.

    • agent_context_id(String):

      The agent context’s ID.

    • expires_at(Option<DateTime>):

      The date and time when the review window closes, which is when a holding policy’s autoRejectAfterSeconds elapses. If no curator has decided the proposal by then, AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. Present only while status is PENDING_REVIEW and a holding policy set a window. Absent on every other status.

    • created_at(DateTime):

      The date and time when the curation proposal was created.

    • updated_at(DateTime):

      The date and time when the curation proposal was last updated, such as when its change set was edited or the proposal was decided. Equal to createdAt until the first update.

    • status_reason(Option<StatusReason>):

      Why AWS Context closed the proposal. Set on an ARCHIVED proposal. Absent otherwise.

    • id(String):

      The proposal’s opaque instance ID. Requests take it as curationProposalId.

    • triggering_policies(Option<Vec::<TriggeringPolicy>>):

      The policies that routed this change set to review (the HOLD_FOR_REVIEW entries in the change set’s evaluation). Absent if none held it.

  • On failure, responds with SdkError<RejectCurationProposalError>
Source§

impl Client

Source

pub fn search_agent_context(&self) -> SearchAgentContextFluentBuilder

Constructs a fluent builder for the SearchAgentContext operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn start_ontology_induction(&self) -> StartOntologyInductionFluentBuilder

Constructs a fluent builder for the StartOntologyInduction operation.

Source§

impl Client

Source

pub fn start_task(&self) -> StartTaskFluentBuilder

Constructs a fluent builder for the StartTask operation.

Source§

impl Client

Source

pub fn tag_resource(&self) -> TagResourceFluentBuilder

Constructs a fluent builder for the TagResource operation.

Source§

impl Client

Source

pub fn traverse_agent_context(&self) -> TraverseAgentContextFluentBuilder

Constructs a fluent builder for the TraverseAgentContext operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn untag_resource(&self) -> UntagResourceFluentBuilder

Constructs a fluent builder for the UntagResource operation.

Source§

impl Client

Source

pub fn update_agent_context(&self) -> UpdateAgentContextFluentBuilder

Constructs a fluent builder for the UpdateAgentContext operation.

Source§

impl Client

Source

pub fn update_change_set(&self) -> UpdateChangeSetFluentBuilder

Constructs a fluent builder for the UpdateChangeSet operation.

  • The fluent builder is configurable:
  • On success, responds with UpdateChangeSetOutput with field(s):
    • agent_context_id(String):

      The agent context’s ID.

    • status(ChangeSetStatus):

      The status of the change set. Valid values:

      • DRAFT - AWS Context is evaluating the change set against the agent context’s curation policies.

      • PENDING - Held for review as a curation proposal. While the change set is PENDING, you can remove operations from it with UpdateChangeSet.

      • AUTHORIZED - The change set is approved, and AWS Context is applying it.

      • SUPPRESSED - AWS Context won’t apply the change set, because a curation policy denied it or its curation proposal was closed without approval.

      • PUBLISHED - AWS Context applied the change set to the agent context.

      • FAILED - AWS Context couldn’t apply the change set.

      SUPPRESSED and PUBLISHED are final. A FAILED change set can still change to PUBLISHED or PENDING if AWS Context retries applying it. New values can be added, so handle a status that you don’t recognize.

    • created_at(DateTime):

      The date and time when the change set was created.

    • updated_at(DateTime):

      The date and time when the change set was last updated, such as when its status changed or its operations were edited.

    • access_control(Option<AccessControl>):

      See AccessControl. The service returns it on every item.

      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’s title names no nodes or edges.

      • NO_ACL - Every caller can read the content.

    • generated_by(Option<Activity>):

      The activity that generated the change set. A change set that an IMPORT_ONTOLOGY task writes carries IMPORT_ONTOLOGY_TASK, and one that a CreateChangeSet call makes carries DIRECT_MODIFICATION. A sync of a connected data source’s own metadata, such as an AWS Glue Data Catalog sync, carries DATA_SOURCE_INGESTION. To list the change sets that carry a value, filter ListChangeSets on it.

      This member can be absent, so handle a change set that has no activity. For example, it’s absent on a change set that records a connection’s removal, on a change set that AWS Context wrote when it loaded an ontology’s schema, and on a change set whose activity this API version doesn’t recognize.

    • status_reason(Option<StatusReason>):

      Why AWS Context created or closed the change set, for example because a connection was removed from the agent context. AWS Context keeps it across later status changes, including a curator’s decision. Absent when AWS Context gave no reason.

    • id(String):

      The change set’s opaque instance ID. Requests take it as changeSetId.

    • change_set_version(i32):

      The version the edit created. Pass it to the next UpdateChangeSet.

  • On failure, responds with SdkError<UpdateChangeSetError>
Source§

impl Client

Source

pub fn update_connection(&self) -> UpdateConnectionFluentBuilder

Constructs a fluent builder for the UpdateConnection operation.

  • The fluent builder is configurable:
    • connection_id(impl Into<String>) / set_connection_id(Option<String>):
      required: true

      The connection to update, by its ID (which starts with conn-) or its ARN.


    • name(impl Into<String>) / set_name(Option<String>):
      required: false

      The new name. If you omit it, the name is unchanged.


    • scope(DataSourceScope) / set_scope(Option<DataSourceScope>):
      required: false

      The new ingestion scope for the connection. If you omit it, the existing scope is unchanged. The rules of CreateConnectionRequest.scope apply, with the following additions:

      • A DATABRICKS or SNOWFLAKE scope names at most one databricksCatalog or snowflakeDatabase, unless the existing scope already names each one.

      • If the stored scope has a selector with a glueService segment, the new scope can’t be empty. Every selector that it adds must also have a glueService segment. Otherwise, the request fails with ValidationException. You can keep a selector that the stored scope already has, so resending the stored scope unchanged succeeds.


    • access_config(AccessConfig) / set_access_config(Option<AccessConfig>):
      required: false

      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 DATABRICKS and SNOWFLAKE, a configuration with no variant clears a stored iamRole, and the connection is then returned with no accessConfig.

      For GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE, you cannot add or remove the iamRole. An update that adds an iamRole to a connection stored without one fails with ValidationException. So does an update that provides a configuration without iamRole for 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(SyncSchedule) / set_sync_schedule(Option<SyncSchedule>):
      required: false

      The new sync schedule for a DATABRICKS or SNOWFLAKE source. If you omit it, the existing schedule is unchanged. Not accepted for GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections.


    • ingestion_config(IngestionConfig) / set_ingestion_config(Option<IngestionConfig>):
      required: true

      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:PassRole permission 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(GlueConnectionMapping) / set_glue_connection_mappings(Option<Vec::<GlueConnectionMapping>>):
      required: false

      The AWS Glue connection for each redshiftNamespace, and for each rdsInstance and rdsDatabase pair, in scope. If you omit it, the stored list is kept. A list replaces the stored list, and an empty list clears it. If the update changes scope, or changes the role of a connection to another account’s catalog, AWS Context validates the kept list again. The rules are those of CreateConnectionRequest.glueConnectionMappings. You can’t change the list of a SNOWFLAKE connection, which is keyed by snowflakeDatabase: omit it or send it unchanged.


    • publish(bool) / set_publish(Option<bool>):
      required: false

      Specifies whether to publish a third-party connection created with publish: false. If true, 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. false is not accepted, because a connection can’t be unpublished. Delete the connection instead.


  • On success, responds with UpdateConnectionOutput with field(s):
    • id(String):

      The ID of the connection.

    • arn(String):

      The ARN of the connection.

    • name(String):

      The name of the connection. You set it when you create the connection and can change it with UpdateConnection. Uses the same constraints as an agent context name. Always present.

    • data_source(Option<DataSourceReference>):

      The typed reference to the external data source that this connection binds to. Its type, the authoritative kind of data source, is in dataSource.type.

    • scope(Option<DataSourceScope>):

      The hierarchical subset of the data source this connection ingests.

    • access_config(Option<AccessConfig>):

      Per-connection access configuration: the IAM role used for data access.

    • sync_schedule(Option<SyncSchedule>):

      The effective sync schedule. Present for DATABRICKS and SNOWFLAKE connections (DAILY if you didn’t specify one). Absent for GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections, which are event-driven.

    • ingestion_config(Option<IngestionConfig>):

      The connection’s ingestion configuration (the IAM role a data producer assumes to push into this connection). Absent when no ingestion role is configured.

    • glue_connection_mappings(Option<Vec::<GlueConnectionMapping>>):

      The AWS Glue connection for each redshiftNamespace, each rdsInstance and rdsDatabase pair, or each snowflakeDatabase in scope. Absent when none is configured.

    • status(ConnectionStatus):

      The connection’s status. Valid values:

      • CREATING - Validation or provisioning is still in progress.

      • ACTIVE - The data source is reachable and, for a DATABRICKS or SNOWFLAKE connection, AWS Glue has provisioned catalog synchronization and returned its crawler ARN. This doesn’t mean that a crawl has started or completed.

      • UPDATING - The connection is being updated.

      • DELETING - The connection is being deleted.

      • FAILED - Validation or provisioning failed, and the connection can’t recover.

    • failure(Option<ConnectionFailure>):

      The reason the connection is FAILED. Absent in every other status.

    • sub_status(Option<ResourceSubStatus>):

      The last milestone a third-party connection’s lifecycle reached. Present in two statuses: CREATING, where it shows the resources provisioned so far, and DELETING, where it shows the resources removed so far. Absent in every other status and while nothing has been done yet in the current direction. CREATING at GLUE_CONNECTION_VALIDATED on a connection created with publish: false means it is waiting for UpdateConnection publish: true.

    • created_at(DateTime):

      The date and time when the connection was created.

    • updated_at(DateTime):

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

  • On failure, responds with SdkError<UpdateConnectionError>
Source§

impl Client

Source

pub fn update_curation_policy(&self) -> UpdateCurationPolicyFluentBuilder

Constructs a fluent builder for the UpdateCurationPolicy operation.

Source§

impl Client

Source

pub fn from_conf(conf: Config) -> Self

Creates a new client from the service Config.

§Panics

This method will panic in the following cases:

  • Retries or timeouts are enabled without a sleep_impl configured.
  • Identity caching is enabled without a sleep_impl and time_source configured.
  • No behavior_version is provided.

The panic message for each of these will have instructions on how to resolve them.

Source

pub fn config(&self) -> &Config

Returns the client’s configuration.

Source§

impl Client

Source

pub fn new(sdk_config: &SdkConfig) -> Self

Creates a new client from an SDK Config.

§Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.
  • This method will panic if no BehaviorVersion is provided. If you experience this panic, set behavior_version on the Config or enable the behavior-version-latest Cargo feature.

Trait Implementations§

Source§

impl Clone for Client

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Client

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Client

§

impl !UnwindSafe for Client

§

impl Forget for Client

§

impl Freeze for Client
where *const ArcInner<Handle> is !null: Freeze, PhantomData<ArcInner<Handle>>: Freeze,

§

impl Move for Client

§

impl Send for Client
where Arc<Handle>: Send,

§

impl Sync for Client
where Arc<Handle>: Sync,

§

impl Unpin for Client
where Arc<Handle>: Unpin,

§

impl UnsafeUnpin for Client
where *const ArcInner<Handle> is !null: UnsafeUnpin, PhantomData<ArcInner<Handle>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> Paint for T
where T: ?Sized,

Source§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
Source§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
Source§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
Source§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling Attribute value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
Source§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi Quirk value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
Source§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
Source§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1:

renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the Condition value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more