aws_sdk_bedrockagent/client/
create_prompt.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreatePrompt`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`name(impl Into<String>)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::set_name):<br>required: **true**<br><p>A name for the prompt.</p><br>
    ///   - [`description(impl Into<String>)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::set_description):<br>required: **false**<br><p>A description for the prompt.</p><br>
    ///   - [`customer_encryption_key_arn(impl Into<String>)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::customer_encryption_key_arn) / [`set_customer_encryption_key_arn(Option<String>)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::set_customer_encryption_key_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.</p><br>
    ///   - [`default_variant(impl Into<String>)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::default_variant) / [`set_default_variant(Option<String>)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::set_default_variant):<br>required: **false**<br><p>The name of the default variant for the prompt. This value must match the <code>name</code> field in the relevant <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptVariant.html">PromptVariant</a> object.</p><br>
    ///   - [`variants(PromptVariant)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::variants) / [`set_variants(Option<Vec::<PromptVariant>>)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::set_variants):<br>required: **false**<br><p>A list of objects, each containing details about a variant of the prompt.</p><br>
    ///   - [`client_token(impl Into<String>)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::set_client_token):<br>required: **false**<br><p>A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p><br>
    ///   - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_prompt::builders::CreatePromptFluentBuilder::set_tags):<br>required: **false**<br><p>Any tags that you want to attach to the prompt. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html">Tagging resources in Amazon Bedrock</a>.</p><br>
    /// - On success, responds with [`CreatePromptOutput`](crate::operation::create_prompt::CreatePromptOutput) with field(s):
    ///   - [`name(String)`](crate::operation::create_prompt::CreatePromptOutput::name): <p>The name of the prompt.</p>
    ///   - [`description(Option<String>)`](crate::operation::create_prompt::CreatePromptOutput::description): <p>The description of the prompt.</p>
    ///   - [`customer_encryption_key_arn(Option<String>)`](crate::operation::create_prompt::CreatePromptOutput::customer_encryption_key_arn): <p>The Amazon Resource Name (ARN) of the KMS key that you encrypted the prompt with.</p>
    ///   - [`default_variant(Option<String>)`](crate::operation::create_prompt::CreatePromptOutput::default_variant): <p>The name of the default variant for your prompt.</p>
    ///   - [`variants(Option<Vec::<PromptVariant>>)`](crate::operation::create_prompt::CreatePromptOutput::variants): <p>A list of objects, each containing details about a variant of the prompt.</p>
    ///   - [`id(String)`](crate::operation::create_prompt::CreatePromptOutput::id): <p>The unique identifier of the prompt.</p>
    ///   - [`arn(String)`](crate::operation::create_prompt::CreatePromptOutput::arn): <p>The Amazon Resource Name (ARN) of the prompt.</p>
    ///   - [`version(String)`](crate::operation::create_prompt::CreatePromptOutput::version): <p>The version of the prompt. When you create a prompt, the version created is the <code>DRAFT</code> version.</p>
    ///   - [`created_at(DateTime)`](crate::operation::create_prompt::CreatePromptOutput::created_at): <p>The time at which the prompt was created.</p>
    ///   - [`updated_at(DateTime)`](crate::operation::create_prompt::CreatePromptOutput::updated_at): <p>The time at which the prompt was last updated.</p>
    /// - On failure, responds with [`SdkError<CreatePromptError>`](crate::operation::create_prompt::CreatePromptError)
    pub fn create_prompt(&self) -> crate::operation::create_prompt::builders::CreatePromptFluentBuilder {
        crate::operation::create_prompt::builders::CreatePromptFluentBuilder::new(self.handle.clone())
    }
}