1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateKey`](crate::operation::create_key::builders::CreateKeyFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`key_name(impl Into<String>)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::key_name) / [`set_key_name(Option<String>)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::set_key_name):<br>required: **true**<br><p>A custom name for the API key resource.</p> <p>Requirements:</p> <ul>  <li>   <p>Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).</p></li>  <li>   <p>Must be a unique API key name.</p></li>  <li>   <p>No spaces allowed. For example, <code>ExampleAPIKey</code>.</p></li> </ul><br>
    ///   - [`restrictions(ApiKeyRestrictions)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::restrictions) / [`set_restrictions(Option<ApiKeyRestrictions>)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::set_restrictions):<br>required: **true**<br><p>The API key restrictions for the API key resource.</p><br>
    ///   - [`description(impl Into<String>)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::set_description):<br>required: **false**<br><p>An optional description for the API key resource.</p><br>
    ///   - [`expire_time(DateTime)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::expire_time) / [`set_expire_time(Option<DateTime>)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::set_expire_time):<br>required: **false**<br><p>The optional timestamp for when the API key resource will expire in <a href="https://www.iso.org/iso-8601-date-and-time-format.html"> ISO 8601</a> format: <code>YYYY-MM-DDThh:mm:ss.sssZ</code>. One of <code>NoExpiry</code> or <code>ExpireTime</code> must be set.</p><br>
    ///   - [`no_expiry(bool)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::no_expiry) / [`set_no_expiry(Option<bool>)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::set_no_expiry):<br>required: **false**<br><p>Optionally set to <code>true</code> to set no expiration time for the API key. One of <code>NoExpiry</code> or <code>ExpireTime</code> must be set.</p><br>
    ///   - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_key::builders::CreateKeyFluentBuilder::set_tags):<br>required: **false**<br><p>Applies one or more tags to the map resource. A tag is a key-value pair that helps manage, identify, search, and filter your resources by labelling them.</p> <p>Format: <code>"key" : "value"</code></p> <p>Restrictions:</p> <ul>  <li>   <p>Maximum 50 tags per resource</p></li>  <li>   <p>Each resource tag must be unique with a maximum of one value.</p></li>  <li>   <p>Maximum key length: 128 Unicode characters in UTF-8</p></li>  <li>   <p>Maximum value length: 256 Unicode characters in UTF-8</p></li>  <li>   <p>Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.</p></li>  <li>   <p>Cannot use "aws:" as a prefix for a key.</p></li> </ul><br>
    /// - On success, responds with [`CreateKeyOutput`](crate::operation::create_key::CreateKeyOutput) with field(s):
    ///   - [`key(String)`](crate::operation::create_key::CreateKeyOutput::key): <p>The key value/string of an API key. This value is used when making API calls to authorize the call. For example, see <a href="https://docs.aws.amazon.com/location/latest/APIReference/API_GetMapGlyphs.html">GetMapGlyphs</a>.</p>
    ///   - [`key_arn(String)`](crate::operation::create_key::CreateKeyOutput::key_arn): <p>The Amazon Resource Name (ARN) for the API key resource. Used when you need to specify a resource across all Amazon Web Services.</p> <ul>  <li>   <p>Format example: <code>arn:aws:geo:region:account-id:key/ExampleKey</code></p></li> </ul>
    ///   - [`key_name(String)`](crate::operation::create_key::CreateKeyOutput::key_name): <p>The name of the API key resource.</p>
    ///   - [`create_time(DateTime)`](crate::operation::create_key::CreateKeyOutput::create_time): <p>The timestamp for when the API key resource was created in <a href="https://www.iso.org/iso-8601-date-and-time-format.html"> ISO 8601</a> format: <code>YYYY-MM-DDThh:mm:ss.sssZ</code>.</p>
    /// - On failure, responds with [`SdkError<CreateKeyError>`](crate::operation::create_key::CreateKeyError)
    pub fn create_key(&self) -> crate::operation::create_key::builders::CreateKeyFluentBuilder {
        crate::operation::create_key::builders::CreateKeyFluentBuilder::new(self.handle.clone())
    }
}