aws_sdk_licensemanager/client/create_grant.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateGrant`](crate::operation::create_grant::builders::CreateGrantFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`client_token(impl Into<String>)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::set_client_token):<br>required: **true**<br><p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p><br>
7 /// - [`grant_name(impl Into<String>)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::grant_name) / [`set_grant_name(Option<String>)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::set_grant_name):<br>required: **true**<br><p>Grant name.</p><br>
8 /// - [`license_arn(impl Into<String>)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::license_arn) / [`set_license_arn(Option<String>)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::set_license_arn):<br>required: **true**<br><p>Amazon Resource Name (ARN) of the license.</p><br>
9 /// - [`principals(impl Into<String>)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::principals) / [`set_principals(Option<Vec::<String>>)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::set_principals):<br>required: **true**<br><p>The grant principals. You can specify one of the following as an Amazon Resource Name (ARN):</p> <ul> <li> <p>An Amazon Web Services account, which includes only the account specified.</p></li> </ul> <ul> <li> <p>An organizational unit (OU), which includes all accounts in the OU.</p></li> </ul> <ul> <li> <p>An organization, which will include all accounts across your organization.</p></li> </ul><br>
10 /// - [`home_region(impl Into<String>)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::home_region) / [`set_home_region(Option<String>)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::set_home_region):<br>required: **true**<br><p>Home Region of the grant.</p><br>
11 /// - [`allowed_operations(AllowedOperation)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::allowed_operations) / [`set_allowed_operations(Option<Vec::<AllowedOperation>>)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::set_allowed_operations):<br>required: **true**<br><p>Allowed operations for the grant.</p><br>
12 /// - [`tags(Tag)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_grant::builders::CreateGrantFluentBuilder::set_tags):<br>required: **false**<br><p>Tags to add to the grant. For more information about tagging support in License Manager, see the <a href="https://docs.aws.amazon.com/license-manager/latest/APIReference/API_TagResource.html">TagResource</a> operation.</p><br>
13 /// - On success, responds with [`CreateGrantOutput`](crate::operation::create_grant::CreateGrantOutput) with field(s):
14 /// - [`grant_arn(Option<String>)`](crate::operation::create_grant::CreateGrantOutput::grant_arn): <p>Grant ARN.</p>
15 /// - [`status(Option<GrantStatus>)`](crate::operation::create_grant::CreateGrantOutput::status): <p>Grant status.</p>
16 /// - [`version(Option<String>)`](crate::operation::create_grant::CreateGrantOutput::version): <p>Grant version.</p>
17 /// - On failure, responds with [`SdkError<CreateGrantError>`](crate::operation::create_grant::CreateGrantError)
18 pub fn create_grant(&self) -> crate::operation::create_grant::builders::CreateGrantFluentBuilder {
19 crate::operation::create_grant::builders::CreateGrantFluentBuilder::new(self.handle.clone())
20 }
21}