#[non_exhaustive]pub struct Builder { /* private fields */ }
Expand description
A builder for Policy
Implementations
sourceimpl Builder
impl Builder
sourcepub fn policy_id(self, input: impl Into<String>) -> Self
pub fn policy_id(self, input: impl Into<String>) -> Self
The ID of the Firewall Manager policy.
sourcepub fn set_policy_id(self, input: Option<String>) -> Self
pub fn set_policy_id(self, input: Option<String>) -> Self
The ID of the Firewall Manager policy.
sourcepub fn policy_name(self, input: impl Into<String>) -> Self
pub fn policy_name(self, input: impl Into<String>) -> Self
The name of the Firewall Manager policy.
sourcepub fn set_policy_name(self, input: Option<String>) -> Self
pub fn set_policy_name(self, input: Option<String>) -> Self
The name of the Firewall Manager policy.
sourcepub fn policy_update_token(self, input: impl Into<String>) -> Self
pub fn policy_update_token(self, input: impl Into<String>) -> Self
A unique identifier for each update to the policy. When issuing a PutPolicy
request, the PolicyUpdateToken
in the request must match the PolicyUpdateToken
of the current policy version. To get the PolicyUpdateToken
of the current policy version, use a GetPolicy
request.
sourcepub fn set_policy_update_token(self, input: Option<String>) -> Self
pub fn set_policy_update_token(self, input: Option<String>) -> Self
A unique identifier for each update to the policy. When issuing a PutPolicy
request, the PolicyUpdateToken
in the request must match the PolicyUpdateToken
of the current policy version. To get the PolicyUpdateToken
of the current policy version, use a GetPolicy
request.
sourcepub fn security_service_policy_data(
self,
input: SecurityServicePolicyData
) -> Self
pub fn security_service_policy_data(
self,
input: SecurityServicePolicyData
) -> Self
Details about the security service that is being used to protect the resources.
sourcepub fn set_security_service_policy_data(
self,
input: Option<SecurityServicePolicyData>
) -> Self
pub fn set_security_service_policy_data(
self,
input: Option<SecurityServicePolicyData>
) -> Self
Details about the security service that is being used to protect the resources.
sourcepub fn resource_type(self, input: impl Into<String>) -> Self
pub fn resource_type(self, input: impl Into<String>) -> Self
The type of resource protected by or in scope of the policy. This is in the format shown in the Amazon Web Services Resource Types Reference. To apply this policy to multiple resource types, specify a resource type of ResourceTypeList
and then specify the resource types in a ResourceTypeList
.
For WAF and Shield Advanced, resource types include AWS::ElasticLoadBalancingV2::LoadBalancer
, AWS::ElasticLoadBalancing::LoadBalancer
, AWS::EC2::EIP
, and AWS::CloudFront::Distribution
. For a security group common policy, valid values are AWS::EC2::NetworkInterface
and AWS::EC2::Instance
. For a security group content audit policy, valid values are AWS::EC2::SecurityGroup
, AWS::EC2::NetworkInterface
, and AWS::EC2::Instance
. For a security group usage audit policy, the value is AWS::EC2::SecurityGroup
. For an Network Firewall policy or DNS Firewall policy, the value is AWS::EC2::VPC
.
sourcepub fn set_resource_type(self, input: Option<String>) -> Self
pub fn set_resource_type(self, input: Option<String>) -> Self
The type of resource protected by or in scope of the policy. This is in the format shown in the Amazon Web Services Resource Types Reference. To apply this policy to multiple resource types, specify a resource type of ResourceTypeList
and then specify the resource types in a ResourceTypeList
.
For WAF and Shield Advanced, resource types include AWS::ElasticLoadBalancingV2::LoadBalancer
, AWS::ElasticLoadBalancing::LoadBalancer
, AWS::EC2::EIP
, and AWS::CloudFront::Distribution
. For a security group common policy, valid values are AWS::EC2::NetworkInterface
and AWS::EC2::Instance
. For a security group content audit policy, valid values are AWS::EC2::SecurityGroup
, AWS::EC2::NetworkInterface
, and AWS::EC2::Instance
. For a security group usage audit policy, the value is AWS::EC2::SecurityGroup
. For an Network Firewall policy or DNS Firewall policy, the value is AWS::EC2::VPC
.
sourcepub fn resource_type_list(self, input: impl Into<String>) -> Self
pub fn resource_type_list(self, input: impl Into<String>) -> Self
Appends an item to resource_type_list
.
To override the contents of this collection use set_resource_type_list
.
An array of ResourceType
objects. Use this only to specify multiple resource types. To specify a single resource type, use ResourceType
.
sourcepub fn set_resource_type_list(self, input: Option<Vec<String>>) -> Self
pub fn set_resource_type_list(self, input: Option<Vec<String>>) -> Self
An array of ResourceType
objects. Use this only to specify multiple resource types. To specify a single resource type, use ResourceType
.
Appends an item to resource_tags
.
To override the contents of this collection use set_resource_tags
.
An array of ResourceTag
objects.
An array of ResourceTag
objects.
If set to True
, resources with the tags that are specified in the ResourceTag
array are not in scope of the policy. If set to False
, and the ResourceTag
array is not null, only resources with the specified tags are in scope of the policy.
If set to True
, resources with the tags that are specified in the ResourceTag
array are not in scope of the policy. If set to False
, and the ResourceTag
array is not null, only resources with the specified tags are in scope of the policy.
sourcepub fn remediation_enabled(self, input: bool) -> Self
pub fn remediation_enabled(self, input: bool) -> Self
Indicates if the policy should be automatically applied to new resources.
sourcepub fn set_remediation_enabled(self, input: Option<bool>) -> Self
pub fn set_remediation_enabled(self, input: Option<bool>) -> Self
Indicates if the policy should be automatically applied to new resources.
sourcepub fn delete_unused_fm_managed_resources(self, input: bool) -> Self
pub fn delete_unused_fm_managed_resources(self, input: bool) -> Self
Indicates whether Firewall Manager should automatically remove protections from resources that leave the policy scope and clean up resources that Firewall Manager is managing for accounts when those accounts leave policy scope. For example, Firewall Manager will disassociate a Firewall Manager managed web ACL from a protected customer resource when the customer resource leaves policy scope.
By default, Firewall Manager doesn't remove protections or delete Firewall Manager managed resources.
This option is not available for Shield Advanced or WAF Classic policies.
sourcepub fn set_delete_unused_fm_managed_resources(self, input: Option<bool>) -> Self
pub fn set_delete_unused_fm_managed_resources(self, input: Option<bool>) -> Self
Indicates whether Firewall Manager should automatically remove protections from resources that leave the policy scope and clean up resources that Firewall Manager is managing for accounts when those accounts leave policy scope. For example, Firewall Manager will disassociate a Firewall Manager managed web ACL from a protected customer resource when the customer resource leaves policy scope.
By default, Firewall Manager doesn't remove protections or delete Firewall Manager managed resources.
This option is not available for Shield Advanced or WAF Classic policies.
sourcepub fn include_map(self, k: CustomerPolicyScopeIdType, v: Vec<String>) -> Self
pub fn include_map(self, k: CustomerPolicyScopeIdType, v: Vec<String>) -> Self
Adds a key-value pair to include_map
.
To override the contents of this collection use set_include_map
.
Specifies the Amazon Web Services account IDs and Organizations organizational units (OUs) to include in the policy. Specifying an OU is the equivalent of specifying all accounts in the OU and in any of its child OUs, including any child OUs and accounts that are added at a later time.
You can specify inclusions or exclusions, but not both. If you specify an IncludeMap
, Firewall Manager applies the policy to all accounts specified by the IncludeMap
, and does not evaluate any ExcludeMap
specifications. If you do not specify an IncludeMap
, then Firewall Manager applies the policy to all accounts except for those specified by the ExcludeMap
.
You can specify account IDs, OUs, or a combination:
-
Specify account IDs by setting the key to
ACCOUNT
. For example, the following is a valid map:{“ACCOUNT” : [“accountID1”, “accountID2”]}
. -
Specify OUs by setting the key to
ORG_UNIT
. For example, the following is a valid map:{“ORG_UNIT” : [“ouid111”, “ouid112”]}
. -
Specify accounts and OUs together in a single map, separated with a comma. For example, the following is a valid map:
{“ACCOUNT” : [“accountID1”, “accountID2”], “ORG_UNIT” : [“ouid111”, “ouid112”]}
.
sourcepub fn set_include_map(
self,
input: Option<HashMap<CustomerPolicyScopeIdType, Vec<String>>>
) -> Self
pub fn set_include_map(
self,
input: Option<HashMap<CustomerPolicyScopeIdType, Vec<String>>>
) -> Self
Specifies the Amazon Web Services account IDs and Organizations organizational units (OUs) to include in the policy. Specifying an OU is the equivalent of specifying all accounts in the OU and in any of its child OUs, including any child OUs and accounts that are added at a later time.
You can specify inclusions or exclusions, but not both. If you specify an IncludeMap
, Firewall Manager applies the policy to all accounts specified by the IncludeMap
, and does not evaluate any ExcludeMap
specifications. If you do not specify an IncludeMap
, then Firewall Manager applies the policy to all accounts except for those specified by the ExcludeMap
.
You can specify account IDs, OUs, or a combination:
-
Specify account IDs by setting the key to
ACCOUNT
. For example, the following is a valid map:{“ACCOUNT” : [“accountID1”, “accountID2”]}
. -
Specify OUs by setting the key to
ORG_UNIT
. For example, the following is a valid map:{“ORG_UNIT” : [“ouid111”, “ouid112”]}
. -
Specify accounts and OUs together in a single map, separated with a comma. For example, the following is a valid map:
{“ACCOUNT” : [“accountID1”, “accountID2”], “ORG_UNIT” : [“ouid111”, “ouid112”]}
.
sourcepub fn exclude_map(self, k: CustomerPolicyScopeIdType, v: Vec<String>) -> Self
pub fn exclude_map(self, k: CustomerPolicyScopeIdType, v: Vec<String>) -> Self
Adds a key-value pair to exclude_map
.
To override the contents of this collection use set_exclude_map
.
Specifies the Amazon Web Services account IDs and Organizations organizational units (OUs) to exclude from the policy. Specifying an OU is the equivalent of specifying all accounts in the OU and in any of its child OUs, including any child OUs and accounts that are added at a later time.
You can specify inclusions or exclusions, but not both. If you specify an IncludeMap
, Firewall Manager applies the policy to all accounts specified by the IncludeMap
, and does not evaluate any ExcludeMap
specifications. If you do not specify an IncludeMap
, then Firewall Manager applies the policy to all accounts except for those specified by the ExcludeMap
.
You can specify account IDs, OUs, or a combination:
-
Specify account IDs by setting the key to
ACCOUNT
. For example, the following is a valid map:{“ACCOUNT” : [“accountID1”, “accountID2”]}
. -
Specify OUs by setting the key to
ORG_UNIT
. For example, the following is a valid map:{“ORG_UNIT” : [“ouid111”, “ouid112”]}
. -
Specify accounts and OUs together in a single map, separated with a comma. For example, the following is a valid map:
{“ACCOUNT” : [“accountID1”, “accountID2”], “ORG_UNIT” : [“ouid111”, “ouid112”]}
.
sourcepub fn set_exclude_map(
self,
input: Option<HashMap<CustomerPolicyScopeIdType, Vec<String>>>
) -> Self
pub fn set_exclude_map(
self,
input: Option<HashMap<CustomerPolicyScopeIdType, Vec<String>>>
) -> Self
Specifies the Amazon Web Services account IDs and Organizations organizational units (OUs) to exclude from the policy. Specifying an OU is the equivalent of specifying all accounts in the OU and in any of its child OUs, including any child OUs and accounts that are added at a later time.
You can specify inclusions or exclusions, but not both. If you specify an IncludeMap
, Firewall Manager applies the policy to all accounts specified by the IncludeMap
, and does not evaluate any ExcludeMap
specifications. If you do not specify an IncludeMap
, then Firewall Manager applies the policy to all accounts except for those specified by the ExcludeMap
.
You can specify account IDs, OUs, or a combination:
-
Specify account IDs by setting the key to
ACCOUNT
. For example, the following is a valid map:{“ACCOUNT” : [“accountID1”, “accountID2”]}
. -
Specify OUs by setting the key to
ORG_UNIT
. For example, the following is a valid map:{“ORG_UNIT” : [“ouid111”, “ouid112”]}
. -
Specify accounts and OUs together in a single map, separated with a comma. For example, the following is a valid map:
{“ACCOUNT” : [“accountID1”, “accountID2”], “ORG_UNIT” : [“ouid111”, “ouid112”]}
.
Trait Implementations
impl StructuralPartialEq for Builder
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more