pub struct Client { /* private fields */ }Expand description
Client for AWS Network Security Manager Customer API
Client for invoking operations on AWS Network Security Manager Customer API. Each operation on AWS Network Security Manager Customer API 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_networksecuritymanager::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_networksecuritymanager::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 CreateDeployment operation has
a Client::create_deployment, 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.create_deployment()
.client_token("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
impl Client
Sourcepub fn create_deployment(&self) -> CreateDeploymentFluentBuilder
pub fn create_deployment(&self) -> CreateDeploymentFluentBuilder
Constructs a fluent builder for the CreateDeployment operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
deployment_name(impl Into<String>)/set_deployment_name(Option<String>):
required: trueThe name of the deployment.
deployment_description(impl Into<String>)/set_deployment_description(Option<String>):
required: falseA description of the deployment.
deployment_configuration(DeploymentConfiguration)/set_deployment_configuration(Option<DeploymentConfiguration>):
required: trueThe configuration settings for the deployment.
associated_policy_list(PolicyReference)/set_associated_policy_list(Option<Vec::<PolicyReference>>):
required: trueThe policies associated with the deployment.
associated_scope_list(ScopeReference)/set_associated_scope_list(Option<Vec::<ScopeReference>>):
required: trueThe scope associated with the deployment. A deployment has exactly one scope.
is_published(bool)/set_is_published(Option<bool>):
required: falseSpecifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). Default:true.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to add to the resource when it is created.
- On success, responds with
CreateDeploymentOutputwith field(s):deployment_id(String):The service-generated id of the deployment.
deployment_arn(String):The Amazon Resource Name (ARN) of the deployment.
deployment_name(String):The name of the deployment.
deployment_description(Option<String>):A description of the deployment.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).deployment_configuration(Option<DeploymentConfiguration>):The configuration settings for the deployment.
associated_policy_list(Vec::<AssociatedPolicy>):The policies associated with the deployment.
associated_scope_list(Vec::<AssociatedScope>):The scope associated with the deployment. A deployment has exactly one scope.
version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
deployment_coverage(Option<Vec::<DeploymentCoverageEntry>>):The coverage information for the deployment. For each firewall type, it shows which policies have that firewall type and which in-scope resource types the firewall type protects.
warnings(Option<Vec::<DeploymentWarningEntry>>):Warnings about potential issues, such as a policy that has no applicable resources in the deployment’s scope.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<CreateDeploymentError>
Source§impl Client
impl Client
Sourcepub fn create_deployment_snapshot(
&self,
) -> CreateDeploymentSnapshotFluentBuilder
pub fn create_deployment_snapshot( &self, ) -> CreateDeploymentSnapshotFluentBuilder
Constructs a fluent builder for the CreateDeploymentSnapshot operation.
- The fluent builder is configurable:
deployment_identifier(impl Into<String>)/set_deployment_identifier(Option<String>):
required: trueThe identifier of the deployment. This is the deployment’s Amazon Resource Name (ARN).
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to add to the snapshot when it is created.
- On success, responds with
CreateDeploymentSnapshotOutputwith field(s):deployment_id(String):The service-generated id of the deployment.
deployment_arn(String):The Amazon Resource Name (ARN) of the deployment.
deployment_name(String):The name of the deployment.
deployment_description(Option<String>):A description of the deployment.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).deployment_configuration(Option<DeploymentConfiguration>):The configuration settings for the deployment.
associated_policy_list(Vec::<AssociatedPolicy>):The policies associated with the deployment.
associated_scope_list(Vec::<AssociatedScope>):The scope associated with the deployment. A deployment has exactly one scope.
version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
updated_at(Option<DateTime>):The time when the snapshot was created.
- On failure, responds with
SdkError<CreateDeploymentSnapshotError>
Source§impl Client
impl Client
Sourcepub fn create_policy(&self) -> CreatePolicyFluentBuilder
pub fn create_policy(&self) -> CreatePolicyFluentBuilder
Constructs a fluent builder for the CreatePolicy operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
policy_name(impl Into<String>)/set_policy_name(Option<String>):
required: trueThe name of the policy.
policy_description(impl Into<String>)/set_policy_description(Option<String>):
required: falseA description of the policy.
priority(i32)/set_priority(Option<i32>):
required: trueThe priority of the resource. A lower number indicates a higher priority.
associated_template_and_rule_list(TemplateOrRuleReference)/set_associated_template_and_rule_list(Option<Vec::<TemplateOrRuleReference>>):
required: falseThe templates and rules to associate with the policy. For AWS WAF policies, specify 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list must be empty.
firewall_type(PolicyFirewallType)/set_firewall_type(Option<PolicyFirewallType>):
required: trueThe firewall type associated with the resource.
policy_configuration(PolicyConfiguration)/set_policy_configuration(Option<PolicyConfiguration>):
required: trueThe configuration settings that control the policy’s behavior, including remediation and firewall-type-specific settings.
is_published(bool)/set_is_published(Option<bool>):
required: falseSpecifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). Default:true.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to add to the resource when it is created.
- On success, responds with
CreatePolicyOutputwith field(s):policy_id(String):The service-generated id of the policy.
policy_arn(String):The Amazon Resource Name (ARN) of the policy.
policy_name(String):The name of the policy.
policy_description(Option<String>):A description of the policy.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).priority(i32):The priority of the resource. A lower number indicates a higher priority.
associated_template_and_rule_list(Vec::<AssociatedTemplateOrRule>):The templates and rules associated with the policy. For AWS WAF policies, this list contains 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list is empty.
version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
firewall_type(PolicyFirewallType):The firewall type associated with the resource.
policy_configuration(Option<PolicyConfiguration>):The configuration settings that control the policy’s behavior, including remediation and firewall-type-specific settings.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<CreatePolicyError>
Source§impl Client
impl Client
Sourcepub fn create_policy_snapshot(&self) -> CreatePolicySnapshotFluentBuilder
pub fn create_policy_snapshot(&self) -> CreatePolicySnapshotFluentBuilder
Constructs a fluent builder for the CreatePolicySnapshot operation.
- The fluent builder is configurable:
policy_identifier(impl Into<String>)/set_policy_identifier(Option<String>):
required: trueThe identifier of the policy. This is the policy’s Amazon Resource Name (ARN).
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to add to the snapshot when it is created.
- On success, responds with
CreatePolicySnapshotOutputwith field(s):policy_id(String):The service-generated id of the policy.
policy_arn(String):The Amazon Resource Name (ARN) of the policy.
policy_name(String):The name of the policy.
policy_description(Option<String>):A description of the policy.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).priority(i32):The priority of the resource. A lower number indicates a higher priority.
associated_template_and_rule_list(Vec::<AssociatedTemplateOrRule>):The templates and rules associated with the policy. For AWS WAF policies, this list contains 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list is empty.
version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
firewall_type(PolicyFirewallType):The firewall type associated with the resource.
policy_configuration(Option<PolicyConfiguration>):The configuration settings that control the policy’s behavior, including remediation and firewall-type-specific settings.
updated_at(Option<DateTime>):The time when the snapshot was created.
- On failure, responds with
SdkError<CreatePolicySnapshotError>
Source§impl Client
impl Client
Sourcepub fn create_rule(&self) -> CreateRuleFluentBuilder
pub fn create_rule(&self) -> CreateRuleFluentBuilder
Constructs a fluent builder for the CreateRule operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
rule_name(impl Into<String>)/set_rule_name(Option<String>):
required: trueThe name of the rule.
firewall_type(RuleFirewallType)/set_firewall_type(Option<RuleFirewallType>):
required: trueThe firewall type associated with the resource.
rule_type(RuleType)/set_rule_type(Option<RuleType>):
required: trueThe type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups.rule_description(impl Into<String>)/set_rule_description(Option<String>):
required: falseA description of the rule.
configuration(Document)/set_configuration(Option<Document>):
required: trueThe firewall configuration for the rule, as a JSON document. The structure depends on the rule’s firewall type and rule type. For an AWS WAF
INSPECTIONrule, provide an AWS WAF rule group. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig; usewafConfigDataTypeto declare which setting the document contains. For the schema of each setting and complete examples, see Writing rule configurations in the AWS Network Security Manager Developer Guide.is_published(bool)/set_is_published(Option<bool>):
required: falseSpecifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). Default:true.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to add to the resource when it is created.
- On success, responds with
CreateRuleOutputwith field(s):rule_id(String):The service-generated id of the rule.
rule_arn(String):The Amazon Resource Name (ARN) of the rule.
rule_name(String):The name of the rule.
firewall_type(RuleFirewallType):The firewall type associated with the resource.
rule_type(Option<RuleType>):The type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups.rule_description(Option<String>):A description of the rule.
configuration(Document):The firewall configuration for the rule, as a JSON document. The structure depends on the rule’s firewall type and rule type.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<CreateRuleError>
Source§impl Client
impl Client
Sourcepub fn create_rule_snapshot(&self) -> CreateRuleSnapshotFluentBuilder
pub fn create_rule_snapshot(&self) -> CreateRuleSnapshotFluentBuilder
Constructs a fluent builder for the CreateRuleSnapshot operation.
- The fluent builder is configurable:
rule_identifier(impl Into<String>)/set_rule_identifier(Option<String>):
required: trueThe identifier of the rule. This is the rule’s Amazon Resource Name (ARN).
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to add to the snapshot when it is created.
- On success, responds with
CreateRuleSnapshotOutputwith field(s):rule_id(String):The service-generated id of the rule.
rule_arn(String):The Amazon Resource Name (ARN) of the rule.
rule_name(String):The name of the rule.
firewall_type(RuleFirewallType):The firewall type associated with the resource.
rule_type(Option<RuleType>):The type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups.rule_description(Option<String>):A description of the rule.
configuration(Document):The firewall configuration for the rule, as a JSON document. The structure depends on the rule’s firewall type and rule type.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
updated_at(Option<DateTime>):The time when the snapshot was created.
- On failure, responds with
SdkError<CreateRuleSnapshotError>
Source§impl Client
impl Client
Sourcepub fn create_scope(&self) -> CreateScopeFluentBuilder
pub fn create_scope(&self) -> CreateScopeFluentBuilder
Constructs a fluent builder for the CreateScope operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
scope_name(impl Into<String>)/set_scope_name(Option<String>):
required: trueThe name of the scope.
scope_description(impl Into<String>)/set_scope_description(Option<String>):
required: falseA description of the scope.
scope_configuration(ScopeConfiguration)/set_scope_configuration(Option<ScopeConfiguration>):
required: trueThe configuration that defines which accounts and resources are in scope.
is_published(bool)/set_is_published(Option<bool>):
required: falseSpecifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). Default:true.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to add to the resource when it is created.
- On success, responds with
CreateScopeOutputwith field(s):scope_id(String):The service-generated id of the scope.
scope_arn(String):The Amazon Resource Name (ARN) of the scope.
scope_name(String):The name of the scope.
scope_description(Option<String>):A description of the scope.
scope_configuration(Option<ScopeConfiguration>):The configuration that defines which accounts and resources are in scope.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<CreateScopeError>
Source§impl Client
impl Client
Sourcepub fn create_scope_snapshot(&self) -> CreateScopeSnapshotFluentBuilder
pub fn create_scope_snapshot(&self) -> CreateScopeSnapshotFluentBuilder
Constructs a fluent builder for the CreateScopeSnapshot operation.
- The fluent builder is configurable:
scope_identifier(impl Into<String>)/set_scope_identifier(Option<String>):
required: trueThe identifier of the scope. This is the scope’s Amazon Resource Name (ARN).
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to add to the snapshot when it is created.
- On success, responds with
CreateScopeSnapshotOutputwith field(s):scope_id(String):The service-generated id of the scope.
scope_arn(String):The Amazon Resource Name (ARN) of the scope.
scope_name(String):The name of the scope.
scope_description(Option<String>):A description of the scope.
scope_configuration(Option<ScopeConfiguration>):The configuration that defines which accounts and resources are in scope.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
updated_at(Option<DateTime>):The time when the snapshot was created.
- On failure, responds with
SdkError<CreateScopeSnapshotError>
Source§impl Client
impl Client
Sourcepub fn create_template(&self) -> CreateTemplateFluentBuilder
pub fn create_template(&self) -> CreateTemplateFluentBuilder
Constructs a fluent builder for the CreateTemplate operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
template_name(impl Into<String>)/set_template_name(Option<String>):
required: trueThe name of the template.
template_description(impl Into<String>)/set_template_description(Option<String>):
required: falseA description of the template.
associated_rule_list(RuleReference)/set_associated_rule_list(Option<Vec::<RuleReference>>):
required: trueThe rules associated with the template.
firewall_type(TemplateFirewallType)/set_firewall_type(Option<TemplateFirewallType>):
required: trueThe firewall type associated with the resource.
is_published(bool)/set_is_published(Option<bool>):
required: falseSpecifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). Default:true.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to add to the resource when it is created.
- On success, responds with
CreateTemplateOutputwith field(s):template_id(String):The service-generated id of the template.
template_arn(String):The Amazon Resource Name (ARN) of the template.
template_name(String):The name of the template.
template_description(Option<String>):A description of the template.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).version(String):The version of the resource.
associated_rule_list(Vec::<AssociatedRule>):The rules associated with the template.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
firewall_type(TemplateFirewallType):The firewall type associated with the resource.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<CreateTemplateError>
Source§impl Client
impl Client
Sourcepub fn create_template_snapshot(&self) -> CreateTemplateSnapshotFluentBuilder
pub fn create_template_snapshot(&self) -> CreateTemplateSnapshotFluentBuilder
Constructs a fluent builder for the CreateTemplateSnapshot operation.
- The fluent builder is configurable:
template_identifier(impl Into<String>)/set_template_identifier(Option<String>):
required: trueThe identifier of the template. This is the template’s Amazon Resource Name (ARN).
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to add to the snapshot when it is created.
- On success, responds with
CreateTemplateSnapshotOutputwith field(s):template_id(String):The service-generated id of the template.
template_arn(String):The Amazon Resource Name (ARN) of the template.
template_name(String):The name of the template.
template_description(Option<String>):A description of the template.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).version(String):The version of the resource.
associated_rule_list(Vec::<AssociatedRule>):The rules associated with the template.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
firewall_type(TemplateFirewallType):The firewall type associated with the resource.
updated_at(Option<DateTime>):The time when the snapshot was created.
- On failure, responds with
SdkError<CreateTemplateSnapshotError>
Source§impl Client
impl Client
Sourcepub fn delete_admin_account(&self) -> DeleteAdminAccountFluentBuilder
pub fn delete_admin_account(&self) -> DeleteAdminAccountFluentBuilder
Constructs a fluent builder for the DeleteAdminAccount operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe AWS account ID of the administrator account to remove.
- On success, responds with
DeleteAdminAccountOutput - On failure, responds with
SdkError<DeleteAdminAccountError>
Source§impl Client
impl Client
Sourcepub fn delete_deployment(&self) -> DeleteDeploymentFluentBuilder
pub fn delete_deployment(&self) -> DeleteDeploymentFluentBuilder
Constructs a fluent builder for the DeleteDeployment operation.
- The fluent builder is configurable:
deployment_identifier(impl Into<String>)/set_deployment_identifier(Option<String>):
required: trueThe identifier of the deployment. This is the deployment’s Amazon Resource Name (ARN).
- On success, responds with
DeleteDeploymentOutput - On failure, responds with
SdkError<DeleteDeploymentError>
Source§impl Client
impl Client
Sourcepub fn delete_policy(&self) -> DeletePolicyFluentBuilder
pub fn delete_policy(&self) -> DeletePolicyFluentBuilder
Constructs a fluent builder for the DeletePolicy operation.
- The fluent builder is configurable:
policy_identifier(impl Into<String>)/set_policy_identifier(Option<String>):
required: trueThe identifier of the policy. This is the policy’s Amazon Resource Name (ARN).
- On success, responds with
DeletePolicyOutput - On failure, responds with
SdkError<DeletePolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_rule(&self) -> DeleteRuleFluentBuilder
pub fn delete_rule(&self) -> DeleteRuleFluentBuilder
Constructs a fluent builder for the DeleteRule operation.
- The fluent builder is configurable:
rule_identifier(impl Into<String>)/set_rule_identifier(Option<String>):
required: trueThe identifier of the rule. This is the rule’s Amazon Resource Name (ARN).
- On success, responds with
DeleteRuleOutput - On failure, responds with
SdkError<DeleteRuleError>
Source§impl Client
impl Client
Sourcepub fn delete_scope(&self) -> DeleteScopeFluentBuilder
pub fn delete_scope(&self) -> DeleteScopeFluentBuilder
Constructs a fluent builder for the DeleteScope operation.
- The fluent builder is configurable:
scope_identifier(impl Into<String>)/set_scope_identifier(Option<String>):
required: trueThe identifier of the scope. This is the scope’s Amazon Resource Name (ARN).
- On success, responds with
DeleteScopeOutput - On failure, responds with
SdkError<DeleteScopeError>
Source§impl Client
impl Client
Sourcepub fn delete_template(&self) -> DeleteTemplateFluentBuilder
pub fn delete_template(&self) -> DeleteTemplateFluentBuilder
Constructs a fluent builder for the DeleteTemplate operation.
- The fluent builder is configurable:
template_identifier(impl Into<String>)/set_template_identifier(Option<String>):
required: trueThe identifier of the template. This is the template’s Amazon Resource Name (ARN).
- On success, responds with
DeleteTemplateOutput - On failure, responds with
SdkError<DeleteTemplateError>
Source§impl Client
impl Client
Sourcepub fn generate_rule_configuration(
&self,
) -> GenerateRuleConfigurationFluentBuilder
pub fn generate_rule_configuration( &self, ) -> GenerateRuleConfigurationFluentBuilder
Constructs a fluent builder for the GenerateRuleConfiguration operation.
- The fluent builder is configurable:
prompt(impl Into<String>)/set_prompt(Option<String>):
required: trueA natural-language description of the configuration that you want to generate.
rule_firewall_type(RuleFirewallType)/set_rule_firewall_type(Option<RuleFirewallType>):
required: trueThe firewall type of the rule.
rule_type(RuleType)/set_rule_type(Option<RuleType>):
required: trueThe type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups.waf_config_data_type(WafConfigDataType)/set_waf_config_data_type(Option<WafConfigDataType>):
required: falseFor AWS WAF configuration rules, the specific AWS WAF configuration variant to generate. This is optional; if you omit it, the service selects the variant.
current_configuration(impl Into<String>)/set_current_configuration(Option<String>):
required: falseAn existing configuration to edit, as a JSON string. When you provide this value, the operation edits the configuration. When you omit it, the operation generates a new configuration.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
- On success, responds with
GenerateRuleConfigurationOutputwith field(s):configuration(String):The generated configuration, as a JSON string. You can use this value in the
configurationfield of a rule.description(Option<String>):Reserved for a future human-readable description of the generated configuration. This field is currently not populated.
- On failure, responds with
SdkError<GenerateRuleConfigurationError>
Source§impl Client
impl Client
Sourcepub fn get_admin_account(&self) -> GetAdminAccountFluentBuilder
pub fn get_admin_account(&self) -> GetAdminAccountFluentBuilder
Constructs a fluent builder for the GetAdminAccount operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe AWS account ID of the administrator account to retrieve.
- On success, responds with
GetAdminAccountOutputwith field(s):admin_account_details(Option<AdminAccountDetails>):The details of the administrator account.
- On failure, responds with
SdkError<GetAdminAccountError>
Source§impl Client
impl Client
Sourcepub fn get_deployment(&self) -> GetDeploymentFluentBuilder
pub fn get_deployment(&self) -> GetDeploymentFluentBuilder
Constructs a fluent builder for the GetDeployment operation.
- The fluent builder is configurable:
deployment_identifier(impl Into<String>)/set_deployment_identifier(Option<String>):
required: trueThe identifier of the deployment. This is the deployment’s Amazon Resource Name (ARN).
- On success, responds with
GetDeploymentOutputwith field(s):deployment_id(String):The service-generated id of the deployment.
deployment_arn(String):The Amazon Resource Name (ARN) of the deployment.
deployment_name(String):The name of the deployment.
deployment_description(Option<String>):A description of the deployment.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable),ACTIVE(published, in use), orDISABLED(deactivated; changes cannot be published until the resource is re-enabled).deployment_configuration(Option<DeploymentConfiguration>):The configuration settings for the deployment.
associated_policy_list(Vec::<AssociatedPolicy>):The policies associated with the deployment.
associated_scope_list(Vec::<AssociatedScope>):The scope associated with the deployment. A deployment has exactly one scope.
version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
updated_at(Option<DateTime>):The time when the resource was last updated.
deployment_coverage(Option<Vec::<DeploymentCoverageEntry>>):The coverage information for the deployment. For each firewall type, it shows which policies have that firewall type and which in-scope resource types the firewall type protects.
warnings(Option<Vec::<DeploymentWarningEntry>>):Warnings about potential issues, such as a policy that has no applicable resources in the deployment’s scope.
- On failure, responds with
SdkError<GetDeploymentError>
Source§impl Client
impl Client
Sourcepub fn get_policy(&self) -> GetPolicyFluentBuilder
pub fn get_policy(&self) -> GetPolicyFluentBuilder
Constructs a fluent builder for the GetPolicy operation.
- The fluent builder is configurable:
policy_identifier(impl Into<String>)/set_policy_identifier(Option<String>):
required: trueThe identifier of the policy. This is the policy’s Amazon Resource Name (ARN).
- On success, responds with
GetPolicyOutputwith field(s):policy_id(String):The service-generated id of the policy.
policy_arn(String):The Amazon Resource Name (ARN) of the policy.
policy_name(String):The name of the policy.
policy_description(Option<String>):A description of the policy.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).priority(i32):The priority of the resource. A lower number indicates a higher priority.
associated_template_and_rule_list(Vec::<AssociatedTemplateOrRule>):The templates and rules associated with the policy. For AWS WAF policies, this list contains 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list is empty.
version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
firewall_type(PolicyFirewallType):The firewall type associated with the resource.
policy_configuration(Option<PolicyConfiguration>):The configuration settings that control the policy’s behavior, including remediation and firewall-type-specific settings.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<GetPolicyError>
Source§impl Client
impl Client
Sourcepub fn get_rule(&self) -> GetRuleFluentBuilder
pub fn get_rule(&self) -> GetRuleFluentBuilder
Constructs a fluent builder for the GetRule operation.
- The fluent builder is configurable:
rule_identifier(impl Into<String>)/set_rule_identifier(Option<String>):
required: trueThe identifier of the rule. This is the rule’s Amazon Resource Name (ARN).
- On success, responds with
GetRuleOutputwith field(s):rule_id(String):The service-generated id of the rule.
rule_arn(String):The Amazon Resource Name (ARN) of the rule.
rule_name(String):The name of the rule.
firewall_type(RuleFirewallType):The firewall type associated with the resource.
rule_type(Option<RuleType>):The type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups.rule_description(Option<String>):A description of the rule.
configuration(Document):The firewall configuration for the rule, as a JSON document. The structure depends on the rule’s firewall type and rule type.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<GetRuleError>
Source§impl Client
impl Client
Sourcepub fn get_scope(&self) -> GetScopeFluentBuilder
pub fn get_scope(&self) -> GetScopeFluentBuilder
Constructs a fluent builder for the GetScope operation.
- The fluent builder is configurable:
scope_identifier(impl Into<String>)/set_scope_identifier(Option<String>):
required: trueThe identifier of the scope. This is the scope’s Amazon Resource Name (ARN).
- On success, responds with
GetScopeOutputwith field(s):scope_id(String):The service-generated id of the scope.
scope_arn(String):The Amazon Resource Name (ARN) of the scope.
scope_name(String):The name of the scope.
scope_description(Option<String>):A description of the scope.
scope_configuration(Option<ScopeConfiguration>):The configuration that defines which accounts and resources are in scope.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable),ACTIVE(published, in use), orDISABLED(deactivated; changes cannot be published until the resource is re-enabled).version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<GetScopeError>
Source§impl Client
impl Client
Sourcepub fn get_template(&self) -> GetTemplateFluentBuilder
pub fn get_template(&self) -> GetTemplateFluentBuilder
Constructs a fluent builder for the GetTemplate operation.
- The fluent builder is configurable:
template_identifier(impl Into<String>)/set_template_identifier(Option<String>):
required: trueThe identifier of the template. This is the template’s Amazon Resource Name (ARN).
- On success, responds with
GetTemplateOutputwith field(s):template_id(String):The service-generated id of the template.
template_arn(String):The Amazon Resource Name (ARN) of the template.
template_name(String):The name of the template.
template_description(Option<String>):A description of the template.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).version(String):The version of the resource.
associated_rule_list(Vec::<AssociatedRule>):The rules associated with the template.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
firewall_type(TemplateFirewallType):The firewall type associated with the resource.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<GetTemplateError>
Source§impl Client
impl Client
Sourcepub fn list_admin_accounts(&self) -> ListAdminAccountsFluentBuilder
pub fn list_admin_accounts(&self) -> ListAdminAccountsFluentBuilder
Constructs a fluent builder for the ListAdminAccounts operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
- On success, responds with
ListAdminAccountsOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
admin_accounts(Vec::<AdminAccountSummary>):The list of administrator accounts.
- On failure, responds with
SdkError<ListAdminAccountsError>
Source§impl Client
impl Client
Sourcepub fn list_aggregate_resource_synchronization_statuses(
&self,
) -> ListAggregateResourceSynchronizationStatusesFluentBuilder
pub fn list_aggregate_resource_synchronization_statuses( &self, ) -> ListAggregateResourceSynchronizationStatusesFluentBuilder
Constructs a fluent builder for the ListAggregateResourceSynchronizationStatuses operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
synchronization_status(SynchronizationStatus)/set_synchronization_status(Option<SynchronizationStatus>):
required: falseFilters the results by synchronization status, such as
IN_SYNCorOUT_OF_SYNC.max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
- On success, responds with
ListAggregateResourceSynchronizationStatusesOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
resource_synchronization_statuses(Vec::<ResourceSynchronizationStatusSummary>):The list of resource synchronization statuses.
- On failure, responds with
SdkError<ListAggregateResourceSynchronizationStatusesError>
Source§impl Client
impl Client
Sourcepub fn list_deployment_snapshots(&self) -> ListDeploymentSnapshotsFluentBuilder
pub fn list_deployment_snapshots(&self) -> ListDeploymentSnapshotsFluentBuilder
Constructs a fluent builder for the ListDeploymentSnapshots operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
deployment_identifier(impl Into<String>)/set_deployment_identifier(Option<String>):
required: trueThe identifier of the deployment. This is the deployment’s Amazon Resource Name (ARN).
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
- On success, responds with
ListDeploymentSnapshotsOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
snapshots(Vec::<DeploymentSummary>):The snapshots of the deployment.
- On failure, responds with
SdkError<ListDeploymentSnapshotsError>
Source§impl Client
impl Client
Sourcepub fn list_deployments(&self) -> ListDeploymentsFluentBuilder
pub fn list_deployments(&self) -> ListDeploymentsFluentBuilder
Constructs a fluent builder for the ListDeployments operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
status(EntityStatusFilter)/set_status(Option<EntityStatusFilter>):
required: falseFilters the results by status:
ACTIVE,DRAFT, orDISABLED.
- On success, responds with
ListDeploymentsOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
deployments(Vec::<DeploymentSummary>):The list of deployments.
- On failure, responds with
SdkError<ListDeploymentsError>
Source§impl Client
impl Client
Sourcepub fn list_policies(&self) -> ListPoliciesFluentBuilder
pub fn list_policies(&self) -> ListPoliciesFluentBuilder
Constructs a fluent builder for the ListPolicies operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
status(EntityStatusFilter)/set_status(Option<EntityStatusFilter>):
required: falseFilters the results by status, either
ACTIVEorDRAFT.
- On success, responds with
ListPoliciesOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
policies(Vec::<PolicySummary>):The list of policies.
- On failure, responds with
SdkError<ListPoliciesError>
Source§impl Client
impl Client
Sourcepub fn list_policy_snapshots(&self) -> ListPolicySnapshotsFluentBuilder
pub fn list_policy_snapshots(&self) -> ListPolicySnapshotsFluentBuilder
Constructs a fluent builder for the ListPolicySnapshots operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
policy_identifier(impl Into<String>)/set_policy_identifier(Option<String>):
required: trueThe identifier of the policy. This is the policy’s Amazon Resource Name (ARN).
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
- On success, responds with
ListPolicySnapshotsOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
snapshots(Vec::<PolicySummary>):The snapshots of the policy.
- On failure, responds with
SdkError<ListPolicySnapshotsError>
Source§impl Client
impl Client
Sourcepub fn list_resource_associations(
&self,
) -> ListResourceAssociationsFluentBuilder
pub fn list_resource_associations( &self, ) -> ListResourceAssociationsFluentBuilder
Constructs a fluent builder for the ListResourceAssociations operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
resource_identifier(impl Into<String>)/set_resource_identifier(Option<String>):
required: trueThe identifier of the resource to list associations for. This is the resource’s Amazon Resource Name (ARN).
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
- On success, responds with
ListResourceAssociationsOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
resource_associations(Vec::<ResourceAssociation>):The list of resource associations.
- On failure, responds with
SdkError<ListResourceAssociationsError>
Source§impl Client
impl Client
Sourcepub fn list_resource_synchronization_statuses(
&self,
) -> ListResourceSynchronizationStatusesFluentBuilder
pub fn list_resource_synchronization_statuses( &self, ) -> ListResourceSynchronizationStatusesFluentBuilder
Constructs a fluent builder for the ListResourceSynchronizationStatuses operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
deployment_identifier(impl Into<String>)/set_deployment_identifier(Option<String>):
required: trueThe identifier of the deployment to list synchronization statuses for. This is the deployment’s Amazon Resource Name (ARN).
synchronization_status(SynchronizationStatus)/set_synchronization_status(Option<SynchronizationStatus>):
required: falseFilters the results by synchronization status, such as
IN_SYNCorOUT_OF_SYNC.max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
- On success, responds with
ListResourceSynchronizationStatusesOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
resource_synchronization_statuses(Vec::<ResourceSynchronizationStatusSummary>):The list of resource synchronization statuses.
- On failure, responds with
SdkError<ListResourceSynchronizationStatusesError>
Source§impl Client
impl Client
Sourcepub fn list_rule_snapshots(&self) -> ListRuleSnapshotsFluentBuilder
pub fn list_rule_snapshots(&self) -> ListRuleSnapshotsFluentBuilder
Constructs a fluent builder for the ListRuleSnapshots operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
rule_identifier(impl Into<String>)/set_rule_identifier(Option<String>):
required: trueThe identifier of the rule. This is the rule’s Amazon Resource Name (ARN).
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
- On success, responds with
ListRuleSnapshotsOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
snapshots(Vec::<RuleSummary>):The snapshots of the rule.
- On failure, responds with
SdkError<ListRuleSnapshotsError>
Source§impl Client
impl Client
Sourcepub fn list_rules(&self) -> ListRulesFluentBuilder
pub fn list_rules(&self) -> ListRulesFluentBuilder
Constructs a fluent builder for the ListRules operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
status(EntityStatusFilter)/set_status(Option<EntityStatusFilter>):
required: falseFilters the results by status, either
ACTIVEorDRAFT.
- On success, responds with
ListRulesOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
rules(Vec::<RuleSummary>):The list of rules.
- On failure, responds with
SdkError<ListRulesError>
Source§impl Client
impl Client
Sourcepub fn list_scope_snapshots(&self) -> ListScopeSnapshotsFluentBuilder
pub fn list_scope_snapshots(&self) -> ListScopeSnapshotsFluentBuilder
Constructs a fluent builder for the ListScopeSnapshots operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
scope_identifier(impl Into<String>)/set_scope_identifier(Option<String>):
required: trueThe identifier of the scope. This is the scope’s Amazon Resource Name (ARN).
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
- On success, responds with
ListScopeSnapshotsOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
snapshots(Vec::<ScopeSummary>):The snapshots of the scope.
- On failure, responds with
SdkError<ListScopeSnapshotsError>
Source§impl Client
impl Client
Sourcepub fn list_scopes(&self) -> ListScopesFluentBuilder
pub fn list_scopes(&self) -> ListScopesFluentBuilder
Constructs a fluent builder for the ListScopes operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
status(EntityStatusFilter)/set_status(Option<EntityStatusFilter>):
required: falseFilters the results by status:
ACTIVE,DRAFT, orDISABLED.
- On success, responds with
ListScopesOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
scopes(Vec::<ScopeSummary>):The list of scopes.
- On failure, responds with
SdkError<ListScopesError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe ARN of the resource to list tags for. The ARN must not include a
:DRAFTqualifier.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap::<String, String>>):The tags associated with the resource. Each tag is a key-value pair.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn list_template_snapshots(&self) -> ListTemplateSnapshotsFluentBuilder
pub fn list_template_snapshots(&self) -> ListTemplateSnapshotsFluentBuilder
Constructs a fluent builder for the ListTemplateSnapshots operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
template_identifier(impl Into<String>)/set_template_identifier(Option<String>):
required: trueThe identifier of the template. This is the template’s Amazon Resource Name (ARN).
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
- On success, responds with
ListTemplateSnapshotsOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
snapshots(Vec::<TemplateSummary>):The snapshots of the template.
- On failure, responds with
SdkError<ListTemplateSnapshotsError>
Source§impl Client
impl Client
Sourcepub fn list_templates(&self) -> ListTemplatesFluentBuilder
pub fn list_templates(&self) -> ListTemplatesFluentBuilder
Constructs a fluent builder for the ListTemplates operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
status(EntityStatusFilter)/set_status(Option<EntityStatusFilter>):
required: falseFilters the results by status, either
ACTIVEorDRAFT.
- On success, responds with
ListTemplatesOutputwith field(s):next_token(Option<String>):The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
templates(Vec::<TemplateSummary>):The list of templates.
- On failure, responds with
SdkError<ListTemplatesError>
Source§impl Client
impl Client
Sourcepub fn put_admin_account(&self) -> PutAdminAccountFluentBuilder
pub fn put_admin_account(&self) -> PutAdminAccountFluentBuilder
Constructs a fluent builder for the PutAdminAccount operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe AWS account ID to set as the AWS Network Security Manager administrator account.
priority(i32)/set_priority(Option<i32>):
required: trueThe priority to assign to the administrator account.
admin_scope(AdminScopeInput)/set_admin_scope(Option<AdminScopeInput>):
required: falseThe scope of accounts, organizational units, and firewall types that the administrator can manage.
- On success, responds with
PutAdminAccountOutputwith field(s):admin_account_details(Option<AdminAccountDetails>):The details of the administrator account that was set.
- On failure, responds with
SdkError<PutAdminAccountError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe ARN of the resource to tag. The ARN must not include a
:DRAFTqualifier.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: trueThe tags to add to the resource.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe ARN of the resource to remove tags from. The ARN must not include a
:DRAFTqualifier.tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueThe keys of the tags to remove from the resource.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_deployment(&self) -> UpdateDeploymentFluentBuilder
pub fn update_deployment(&self) -> UpdateDeploymentFluentBuilder
Constructs a fluent builder for the UpdateDeployment operation.
- The fluent builder is configurable:
deployment_identifier(impl Into<String>)/set_deployment_identifier(Option<String>):
required: trueThe identifier of the deployment. This is the deployment’s Amazon Resource Name (ARN).
update_token(impl Into<String>)/set_update_token(Option<String>):
required: trueA token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.deployment_description(impl Into<String>)/set_deployment_description(Option<String>):
required: falseA description of the deployment.
deployment_configuration(DeploymentConfiguration)/set_deployment_configuration(Option<DeploymentConfiguration>):
required: falseThe configuration settings for the deployment.
associated_policy_list(PolicyReference)/set_associated_policy_list(Option<Vec::<PolicyReference>>):
required: falseThe policies associated with the deployment.
associated_scope_list(ScopeReference)/set_associated_scope_list(Option<Vec::<ScopeReference>>):
required: falseThe scope associated with the deployment. A deployment has exactly one scope.
is_published(bool)/set_is_published(Option<bool>):
required: trueSpecifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT).client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
- On success, responds with
UpdateDeploymentOutputwith field(s):deployment_id(String):The service-generated id of the deployment.
deployment_arn(String):The Amazon Resource Name (ARN) of the deployment.
deployment_name(String):The name of the deployment.
deployment_description(Option<String>):A description of the deployment.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).deployment_configuration(Option<DeploymentConfiguration>):The configuration settings for the deployment.
associated_policy_list(Vec::<AssociatedPolicy>):The policies associated with the deployment.
associated_scope_list(Vec::<AssociatedScope>):The scope associated with the deployment. A deployment has exactly one scope.
version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
deployment_coverage(Option<Vec::<DeploymentCoverageEntry>>):The coverage information for the deployment. For each firewall type, it shows which policies have that firewall type and which in-scope resource types the firewall type protects.
warnings(Option<Vec::<DeploymentWarningEntry>>):Warnings about potential issues, such as a policy that has no applicable resources in the deployment’s scope.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<UpdateDeploymentError>
Source§impl Client
impl Client
Sourcepub fn update_policy(&self) -> UpdatePolicyFluentBuilder
pub fn update_policy(&self) -> UpdatePolicyFluentBuilder
Constructs a fluent builder for the UpdatePolicy operation.
- The fluent builder is configurable:
policy_identifier(impl Into<String>)/set_policy_identifier(Option<String>):
required: trueThe identifier of the policy. This is the policy’s Amazon Resource Name (ARN).
update_token(impl Into<String>)/set_update_token(Option<String>):
required: trueA token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.policy_description(impl Into<String>)/set_policy_description(Option<String>):
required: falseA description of the policy.
priority(i32)/set_priority(Option<i32>):
required: falseThe priority of the resource. A lower number indicates a higher priority.
associated_template_and_rule_list(TemplateOrRuleReference)/set_associated_template_and_rule_list(Option<Vec::<TemplateOrRuleReference>>):
required: falseThe templates and rules to associate with the policy. For AWS WAF policies, specify 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list must be empty.
policy_configuration(PolicyConfiguration)/set_policy_configuration(Option<PolicyConfiguration>):
required: falseThe configuration settings that control the policy’s behavior, including remediation and firewall-type-specific settings.
is_published(bool)/set_is_published(Option<bool>):
required: trueSpecifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT).client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
- On success, responds with
UpdatePolicyOutputwith field(s):policy_id(String):The service-generated id of the policy.
policy_arn(String):The Amazon Resource Name (ARN) of the policy.
policy_name(String):The name of the policy.
policy_description(Option<String>):A description of the policy.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).priority(i32):The priority of the resource. A lower number indicates a higher priority.
associated_template_and_rule_list(Vec::<AssociatedTemplateOrRule>):The templates and rules associated with the policy. For AWS WAF policies, this list contains 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list is empty.
version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
firewall_type(PolicyFirewallType):The firewall type associated with the resource.
policy_configuration(Option<PolicyConfiguration>):The configuration settings that control the policy’s behavior, including remediation and firewall-type-specific settings.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<UpdatePolicyError>
Source§impl Client
impl Client
Sourcepub fn update_rule(&self) -> UpdateRuleFluentBuilder
pub fn update_rule(&self) -> UpdateRuleFluentBuilder
Constructs a fluent builder for the UpdateRule operation.
- The fluent builder is configurable:
rule_identifier(impl Into<String>)/set_rule_identifier(Option<String>):
required: trueThe identifier of the rule. This is the rule’s Amazon Resource Name (ARN).
update_token(impl Into<String>)/set_update_token(Option<String>):
required: trueA token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.rule_type(RuleType)/set_rule_type(Option<RuleType>):
required: falseThe type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups.rule_description(impl Into<String>)/set_rule_description(Option<String>):
required: falseA description of the rule.
configuration(Document)/set_configuration(Option<Document>):
required: falseThe firewall configuration for the rule, as a JSON document. The structure depends on the rule’s firewall type and rule type. For an AWS WAF
INSPECTIONrule, provide an AWS WAF rule group. For an AWS WAFCONFIGURATIONrule, provide a single web ACL setting, such asDefaultActionorVisibilityConfig; usewafConfigDataTypeto declare which setting the document contains. For the schema of each setting and complete examples, see Writing rule configurations in the AWS Network Security Manager Developer Guide.is_published(bool)/set_is_published(Option<bool>):
required: trueSpecifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT).client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
- On success, responds with
UpdateRuleOutputwith field(s):rule_id(String):The service-generated id of the rule.
rule_arn(String):The Amazon Resource Name (ARN) of the rule.
rule_name(String):The name of the rule.
firewall_type(RuleFirewallType):The firewall type associated with the resource.
rule_type(Option<RuleType>):The type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups.rule_description(Option<String>):A description of the rule.
configuration(Document):The firewall configuration for the rule, as a JSON document. The structure depends on the rule’s firewall type and rule type.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<UpdateRuleError>
Source§impl Client
impl Client
Sourcepub fn update_scope(&self) -> UpdateScopeFluentBuilder
pub fn update_scope(&self) -> UpdateScopeFluentBuilder
Constructs a fluent builder for the UpdateScope operation.
- The fluent builder is configurable:
scope_identifier(impl Into<String>)/set_scope_identifier(Option<String>):
required: trueThe identifier of the scope. This is the scope’s Amazon Resource Name (ARN).
update_token(impl Into<String>)/set_update_token(Option<String>):
required: trueA token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.scope_description(impl Into<String>)/set_scope_description(Option<String>):
required: falseA description of the scope.
scope_configuration(ScopeConfiguration)/set_scope_configuration(Option<ScopeConfiguration>):
required: falseThe configuration that defines which accounts and resources are in scope. If you don’t include this member, the scope keeps its existing configuration.
A new configuration can change which accounts and resources are selected, but it can’t add or remove the account filter itself: a scope created for multi-account use stays multi-account, and a scope created for single-account use stays single-account.
is_published(bool)/set_is_published(Option<bool>):
required: trueSpecifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT).client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
- On success, responds with
UpdateScopeOutputwith field(s):scope_id(String):The service-generated id of the scope.
scope_arn(String):The Amazon Resource Name (ARN) of the scope.
scope_name(String):The name of the scope.
scope_description(Option<String>):A description of the scope.
scope_configuration(Option<ScopeConfiguration>):The configuration that defines which accounts and resources are in scope.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).version(String):The version of the resource.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<UpdateScopeError>
Source§impl Client
impl Client
Sourcepub fn update_template(&self) -> UpdateTemplateFluentBuilder
pub fn update_template(&self) -> UpdateTemplateFluentBuilder
Constructs a fluent builder for the UpdateTemplate operation.
- The fluent builder is configurable:
template_identifier(impl Into<String>)/set_template_identifier(Option<String>):
required: trueThe identifier of the template. This is the template’s Amazon Resource Name (ARN).
update_token(impl Into<String>)/set_update_token(Option<String>):
required: trueA token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.template_description(impl Into<String>)/set_template_description(Option<String>):
required: falseA description of the template.
associated_rule_list(RuleReference)/set_associated_rule_list(Option<Vec::<RuleReference>>):
required: falseThe rules associated with the template.
is_published(bool)/set_is_published(Option<bool>):
required: trueSpecifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT).client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
- On success, responds with
UpdateTemplateOutputwith field(s):template_id(String):The service-generated id of the template.
template_arn(String):The Amazon Resource Name (ARN) of the template.
template_name(String):The name of the template.
template_description(Option<String>):A description of the template.
status(EntityStatus):The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use).version(String):The version of the resource.
associated_rule_list(Vec::<AssociatedRule>):The rules associated with the template.
update_token(Option<String>):A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.is_snapshot(Option<bool>):Specifies whether the resource is a snapshot of a published version.
has_published_version(Option<bool>):Specifies whether a published version of the resource exists.
firewall_type(TemplateFirewallType):The firewall type associated with the resource.
updated_at(Option<DateTime>):The time when the resource was last updated.
- On failure, responds with
SdkError<UpdateTemplateError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
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_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
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 bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
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>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
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 rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
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 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.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
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);