pub struct CreateAPIKeyFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateAPIKey
.
Creates an API key that contains a set of token domains.
API keys are required for the integration of the CAPTCHA API in your JavaScript client applications. The API lets you customize the placement and characteristics of the CAPTCHA puzzle for your end users. For more information about the CAPTCHA JavaScript integration, see WAF client application integration in the WAF Developer Guide.
You can use a single key for up to 5 domains. After you generate a key, you can copy it for use in your JavaScript integration.
Implementations§
source§impl CreateAPIKeyFluentBuilder
impl CreateAPIKeyFluentBuilder
sourcepub fn as_input(&self) -> &CreateApiKeyInputBuilder
pub fn as_input(&self) -> &CreateApiKeyInputBuilder
Access the CreateAPIKey as a reference.
sourcepub async fn send(
self
) -> Result<CreateApiKeyOutput, SdkError<CreateAPIKeyError, HttpResponse>>
pub async fn send( self ) -> Result<CreateApiKeyOutput, SdkError<CreateAPIKeyError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<CreateApiKeyOutput, CreateAPIKeyError, Self>
pub fn customize( self ) -> CustomizableOperation<CreateApiKeyOutput, CreateAPIKeyError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn scope(self, input: Scope) -> Self
pub fn scope(self, input: Scope) -> Self
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
sourcepub fn set_scope(self, input: Option<Scope>) -> Self
pub fn set_scope(self, input: Option<Scope>) -> Self
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
sourcepub fn get_scope(&self) -> &Option<Scope>
pub fn get_scope(&self) -> &Option<Scope>
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
sourcepub fn token_domains(self, input: impl Into<String>) -> Self
pub fn token_domains(self, input: impl Into<String>) -> Self
Appends an item to TokenDomains
.
To override the contents of this collection use set_token_domains
.
The client application domains that you want to use this API key for.
Example JSON: "TokenDomains": ["abc.com", "store.abc.com"]
Public suffixes aren't allowed. For example, you can't use gov.au
or co.uk
as token domains.
sourcepub fn set_token_domains(self, input: Option<Vec<String>>) -> Self
pub fn set_token_domains(self, input: Option<Vec<String>>) -> Self
The client application domains that you want to use this API key for.
Example JSON: "TokenDomains": ["abc.com", "store.abc.com"]
Public suffixes aren't allowed. For example, you can't use gov.au
or co.uk
as token domains.
sourcepub fn get_token_domains(&self) -> &Option<Vec<String>>
pub fn get_token_domains(&self) -> &Option<Vec<String>>
The client application domains that you want to use this API key for.
Example JSON: "TokenDomains": ["abc.com", "store.abc.com"]
Public suffixes aren't allowed. For example, you can't use gov.au
or co.uk
as token domains.
Trait Implementations§
source§impl Clone for CreateAPIKeyFluentBuilder
impl Clone for CreateAPIKeyFluentBuilder
source§fn clone(&self) -> CreateAPIKeyFluentBuilder
fn clone(&self) -> CreateAPIKeyFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for CreateAPIKeyFluentBuilder
impl !RefUnwindSafe for CreateAPIKeyFluentBuilder
impl Send for CreateAPIKeyFluentBuilder
impl Sync for CreateAPIKeyFluentBuilder
impl Unpin for CreateAPIKeyFluentBuilder
impl !UnwindSafe for CreateAPIKeyFluentBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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