AWS Network Security Manager Customer API 2025-10-30
- Client: Aws\NetworkSecurityManager\NetworkSecurityManagerClient
- Service ID: network-security-manager
- Version: 2025-10-30
This page describes the parameters and results for the operations of the AWS Network Security Manager Customer API (2025-10-30), and shows how to use the Aws\NetworkSecurityManager\NetworkSecurityManagerClient object to call the described operations. This documentation is specific to the 2025-10-30 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName'), where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */).
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */).
- CreateDeployment ( array $params = [] )
- Creates a deployment.
- CreateDeploymentSnapshot ( array $params = [] )
- Creates a snapshot of the current published version of the specified deployment.
- CreatePolicy ( array $params = [] )
- Creates a policy.
- CreatePolicySnapshot ( array $params = [] )
- Creates a snapshot of the current published version of the specified policy.
- CreateRule ( array $params = [] )
- Creates a rule.
- CreateRuleSnapshot ( array $params = [] )
- Creates a snapshot of the current published version of the specified rule.
- CreateScope ( array $params = [] )
- Creates a scope.
- CreateScopeSnapshot ( array $params = [] )
- Creates a snapshot of the current published version of the specified scope.
- CreateTemplate ( array $params = [] )
- Creates a template.
- CreateTemplateSnapshot ( array $params = [] )
- Creates a snapshot of the current published version of the specified template.
- DeleteAdminAccount ( array $params = [] )
- Removes the specified AWS Network Security Manager administrator account.
- DeleteDeployment ( array $params = [] )
- Deletes the specified deployment.
- DeletePolicy ( array $params = [] )
- Deletes the specified policy.
- DeleteRule ( array $params = [] )
- Deletes the specified rule.
- DeleteScope ( array $params = [] )
- Deletes the specified scope.
- DeleteTemplate ( array $params = [] )
- Deletes the specified template.
- GenerateRuleConfiguration ( array $params = [] )
- Generates a rule configuration from a natural-language description.
- GetAdminAccount ( array $params = [] )
- Retrieves the details of the specified AWS Network Security Manager administrator account.
- GetDeployment ( array $params = [] )
- Retrieves the details of the specified deployment, including coverage information and any warnings.
- GetPolicy ( array $params = [] )
- Retrieves the details of the specified policy.
- GetRule ( array $params = [] )
- Retrieves the details of the specified rule.
- GetScope ( array $params = [] )
- Retrieves the details of the specified scope.
- GetTemplate ( array $params = [] )
- Retrieves the details of the specified template.
- ListAdminAccounts ( array $params = [] )
- Lists the AWS Network Security Manager administrator accounts in the organization.
- ListAggregateResourceSynchronizationStatuses ( array $params = [] )
- Lists the aggregated synchronization statuses of resources across the deployments in your administrator account.
- ListDeploymentSnapshots ( array $params = [] )
- Lists the snapshots of the specified deployment.
- ListDeployments ( array $params = [] )
- Lists the deployments in the account.
- ListPolicies ( array $params = [] )
- Lists the policies in the account.
- ListPolicySnapshots ( array $params = [] )
- Lists the snapshots of the specified policy.
- ListResourceAssociations ( array $params = [] )
- Lists the resources associated with the specified resource.
- ListResourceSynchronizationStatuses ( array $params = [] )
- Lists the synchronization statuses of the resources covered by the specified deployment.
- ListRuleSnapshots ( array $params = [] )
- Lists the snapshots of the specified rule.
- ListRules ( array $params = [] )
- Lists the rules in the account.
- ListScopeSnapshots ( array $params = [] )
- Lists the snapshots of the specified scope.
- ListScopes ( array $params = [] )
- Lists the scopes in the account.
- ListTagsForResource ( array $params = [] )
- Lists the tags associated with the specified resource.
- ListTemplateSnapshots ( array $params = [] )
- Lists the snapshots of the specified template.
- ListTemplates ( array $params = [] )
- Lists the templates in the account.
- PutAdminAccount ( array $params = [] )
- Sets the AWS account that serves as an AWS Network Security Manager administrator account, and optionally configures the scope of resources that the administrator can manage.
- TagResource ( array $params = [] )
- Adds or overwrites the specified tags on the given resource.
- UntagResource ( array $params = [] )
- Removes the specified tags from the given resource.
- UpdateDeployment ( array $params = [] )
- Updates the specified deployment.
- UpdatePolicy ( array $params = [] )
- Updates the specified policy.
- UpdateRule ( array $params = [] )
- Updates the specified rule.
- UpdateScope ( array $params = [] )
- Updates the specified scope.
- UpdateTemplate ( array $params = [] )
- Updates the specified template.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
- ListAdminAccounts
- ListAggregateResourceSynchronizationStatuses
- ListDeploymentSnapshots
- ListDeployments
- ListPolicies
- ListPolicySnapshots
- ListResourceAssociations
- ListResourceSynchronizationStatuses
- ListRuleSnapshots
- ListRules
- ListScopeSnapshots
- ListScopes
- ListTemplateSnapshots
- ListTemplates
Operations
CreateDeployment
$result = $client->createDeployment([/* ... */]); $promise = $client->createDeploymentAsync([/* ... */]);
Creates a deployment. A deployment applies one or more policies to the accounts and resources selected by a scope. Use isPublished to create the deployment in published (ACTIVE) or draft (DRAFT) state. The response includes coverage information and any warnings about the deployment.
Parameter Syntax
$result = $client->createDeployment([
'associatedPolicyList' => [ // REQUIRED
[
'policyIdentifier' => '<string>', // REQUIRED
],
// ...
],
'associatedScopeList' => [ // REQUIRED
[
'scopeIdentifier' => '<string>', // REQUIRED
],
// ...
],
'clientToken' => '<string>',
'deploymentConfiguration' => [ // REQUIRED
'enableCrossAccountVisibility' => true || false, // REQUIRED
],
'deploymentDescription' => '<string>',
'deploymentName' => '<string>', // REQUIRED
'isPublished' => true || false,
'tags' => ['<string>', ...],
]);
Parameter Details
Members
- associatedPolicyList
-
- Required: Yes
- Type: Array of PolicyReference structures
The policies associated with the deployment.
- associatedScopeList
-
- Required: Yes
- Type: Array of ScopeReference structures
The scope associated with the deployment. A deployment has exactly one scope.
- clientToken
-
- Type: string
A 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.
- deploymentConfiguration
-
- Required: Yes
- Type: DeploymentConfiguration structure
The configuration settings for the deployment.
- deploymentDescription
-
- Type: string
A description of the deployment.
- deploymentName
-
- Required: Yes
- Type: string
The name of the deployment.
- isPublished
-
- Type: boolean
Specifies 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
-
- Type: Associative array of custom strings keys (TagKey) to strings
The tags to add to the resource when it is created.
Result Syntax
[
'associatedPolicyList' => [
[
'policyArn' => '<string>',
],
// ...
],
'associatedScopeList' => [
[
'scopeArn' => '<string>',
],
// ...
],
'deploymentArn' => '<string>',
'deploymentConfiguration' => [
'enableCrossAccountVisibility' => true || false,
],
'deploymentCoverage' => [
[
'firewallType' => 'WAF|SHIELD_ADVANCED',
'inScopeResourceTypes' => ['<string>', ...],
'policyArns' => ['<string>', ...],
],
// ...
],
'deploymentDescription' => '<string>',
'deploymentId' => '<string>',
'deploymentName' => '<string>',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
'warnings' => [
[
'code' => '<string>',
'message' => '<string>',
'policyArn' => '<string>',
],
// ...
],
]
Result Details
Members
- associatedPolicyList
-
- Required: Yes
- Type: Array of AssociatedPolicy structures
The policies associated with the deployment.
- associatedScopeList
-
- Required: Yes
- Type: Array of AssociatedScope structures
The scope associated with the deployment. A deployment has exactly one scope.
- deploymentArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the deployment.
- deploymentConfiguration
-
- Type: DeploymentConfiguration structure
The configuration settings for the deployment.
- deploymentCoverage
-
- Type: Array of DeploymentCoverageEntry structures
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.
- deploymentDescription
-
- Type: string
A description of the deployment.
- deploymentId
-
- Required: Yes
- Type: string
The service-generated id of the deployment.
- deploymentName
-
- Required: Yes
- Type: string
The name of the deployment.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
- warnings
-
- Type: Array of DeploymentWarningEntry structures
Warnings about potential issues, such as a policy that has no applicable resources in the deployment's scope.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- ServiceUnavailableException:
The service is temporarily unavailable. This is a retryable error.
- TagPolicyViolationException:
The request violates a tag policy that is in effect for the account or organization.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Create a deployment
Creates a new deployment in draft state.
$result = $client->createDeployment([
'associatedPolicyList' => [
[
'policyIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
],
],
'associatedScopeList' => [
[
'scopeIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
],
],
'clientToken' => '550e8400-e29b-41d4-a716-446655440003',
'deploymentConfiguration' => [
'enableCrossAccountVisibility' => ,
],
'deploymentDescription' => 'Production deployment for US East 1 region',
'deploymentName' => 'prod-us-east-1-deployment',
'isPublished' => ,
]);
Result syntax:
[
'version' => '1',
'associatedPolicyList' => [
[
'policyArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
],
],
'associatedScopeList' => [
[
'scopeArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
],
],
'deploymentArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456',
'deploymentConfiguration' => [
'enableCrossAccountVisibility' => ,
],
'deploymentDescription' => 'Production deployment for US East 1 region',
'deploymentId' => 'def456',
'deploymentName' => 'prod-us-east-1-deployment',
'hasPublishedVersion' => ,
'isSnapshot' => ,
'status' => 'DRAFT',
'updateToken' => 'f4a5b6c7-7d8e-4f9a-8b1c-1d2e3f4a5b6c',
]
CreateDeploymentSnapshot
$result = $client->createDeploymentSnapshot([/* ... */]); $promise = $client->createDeploymentSnapshotAsync([/* ... */]);
Creates a snapshot of the current published version of the specified deployment.
Parameter Syntax
$result = $client->createDeploymentSnapshot([
'clientToken' => '<string>',
'deploymentIdentifier' => '<string>', // REQUIRED
'tags' => ['<string>', ...],
]);
Parameter Details
Members
- clientToken
-
- Type: string
A 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.
- deploymentIdentifier
-
- Required: Yes
- Type: string
The identifier of the deployment. This is the deployment's Amazon Resource Name (ARN).
- tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
The tags to add to the snapshot when it is created.
Result Syntax
[
'associatedPolicyList' => [
[
'policyArn' => '<string>',
],
// ...
],
'associatedScopeList' => [
[
'scopeArn' => '<string>',
],
// ...
],
'deploymentArn' => '<string>',
'deploymentConfiguration' => [
'enableCrossAccountVisibility' => true || false,
],
'deploymentDescription' => '<string>',
'deploymentId' => '<string>',
'deploymentName' => '<string>',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- associatedPolicyList
-
- Required: Yes
- Type: Array of AssociatedPolicy structures
The policies associated with the deployment.
- associatedScopeList
-
- Required: Yes
- Type: Array of AssociatedScope structures
The scope associated with the deployment. A deployment has exactly one scope.
- deploymentArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the deployment.
- deploymentConfiguration
-
- Type: DeploymentConfiguration structure
The configuration settings for the deployment.
- deploymentDescription
-
- Type: string
A description of the deployment.
- deploymentId
-
- Required: Yes
- Type: string
The service-generated id of the deployment.
- deploymentName
-
- Required: Yes
- Type: string
The name of the deployment.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the snapshot was created.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Create a deployment snapshot
Creates an immutable snapshot of the current published version of a deployment. The snapshot is addressable by a version-qualified ARN.
$result = $client->createDeploymentSnapshot([
'clientToken' => '550e8400-e29b-41d4-a716-446655440014',
'deploymentIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456',
]);
Result syntax:
[
'version' => '2',
'associatedPolicyList' => [
[
'policyArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
],
],
'associatedScopeList' => [
[
'scopeArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
],
],
'deploymentArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456:2',
'deploymentConfiguration' => [
'enableCrossAccountVisibility' => 1,
],
'deploymentId' => 'def456',
'deploymentName' => 'prod-us-east-1-deployment',
'isSnapshot' => 1,
'status' => 'ACTIVE',
'updatedAt' => ,
]
CreatePolicy
$result = $client->createPolicy([/* ... */]); $promise = $client->createPolicyAsync([/* ... */]);
Creates a policy. A policy combines templates and rules with enforcement settings for a firewall type, such as AWS WAF or AWS Shield Advanced. Use isPublished to create the policy in published (ACTIVE) or draft (DRAFT) state.
Parameter Syntax
$result = $client->createPolicy([
'associatedTemplateAndRuleList' => [
[
'ruleIdentifier' => '<string>',
'templateIdentifier' => '<string>',
],
// ...
],
'clientToken' => '<string>',
'firewallType' => 'WAF|SHIELD_ADVANCED', // REQUIRED
'isPublished' => true || false,
'policyConfiguration' => [ // REQUIRED
'remediationEnabled' => true || false, // REQUIRED
'resourcesCleanUp' => true || false, // REQUIRED
'wafConfig' => [
'conflictResolution' => 'MERGE_WHERE_APPLICABLE', // REQUIRED
'existingCustomerWebACLResolution' => 'RETROFIT|OVERRIDE_ASSOCIATION|NO_REMEDIATION', // REQUIRED
],
],
'policyDescription' => '<string>',
'policyName' => '<string>', // REQUIRED
'priority' => <integer>, // REQUIRED
'tags' => ['<string>', ...],
]);
Parameter Details
Members
- associatedTemplateAndRuleList
-
- Type: Array of TemplateOrRuleReference structures
The 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.
- clientToken
-
- Type: string
A 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.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- isPublished
-
- Type: boolean
Specifies 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. - policyConfiguration
-
- Required: Yes
- Type: PolicyConfiguration structure
The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.
- policyDescription
-
- Type: string
A description of the policy.
- policyName
-
- Required: Yes
- Type: string
The name of the policy.
- priority
-
- Required: Yes
- Type: int
The priority of the resource. A lower number indicates a higher priority.
- tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
The tags to add to the resource when it is created.
Result Syntax
[
'associatedTemplateAndRuleList' => [
[
'ruleArn' => '<string>',
'templateArn' => '<string>',
],
// ...
],
'firewallType' => 'WAF|SHIELD_ADVANCED',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'policyArn' => '<string>',
'policyConfiguration' => [
'remediationEnabled' => true || false,
'resourcesCleanUp' => true || false,
'wafConfig' => [
'conflictResolution' => 'MERGE_WHERE_APPLICABLE',
'existingCustomerWebACLResolution' => 'RETROFIT|OVERRIDE_ASSOCIATION|NO_REMEDIATION',
],
],
'policyDescription' => '<string>',
'policyId' => '<string>',
'policyName' => '<string>',
'priority' => <integer>,
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- associatedTemplateAndRuleList
-
- Required: Yes
- Type: Array of AssociatedTemplateOrRule structures
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.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- policyArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the policy.
- policyConfiguration
-
- Type: PolicyConfiguration structure
The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.
- policyDescription
-
- Type: string
A description of the policy.
- policyId
-
- Required: Yes
- Type: string
The service-generated id of the policy.
- policyName
-
- Required: Yes
- Type: string
The name of the policy.
- priority
-
- Required: Yes
- Type: int
The priority of the resource. A lower number indicates a higher priority.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- ServiceUnavailableException:
The service is temporarily unavailable. This is a retryable error.
- TagPolicyViolationException:
The request violates a tag policy that is in effect for the account or organization.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Create a WAF policy
Creates a new WAF policy in draft state with a template association.
$result = $client->createPolicy([
'associatedTemplateAndRuleList' => [
[
'templateIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
],
],
'clientToken' => '550e8400-e29b-41d4-a716-446655440002',
'firewallType' => 'WAF',
'isPublished' => ,
'policyConfiguration' => [
'remediationEnabled' => ,
'resourcesCleanUp' => ,
'wafConfig' => [
'conflictResolution' => 'MERGE_WHERE_APPLICABLE',
'existingCustomerWebACLResolution' => 'NO_REMEDIATION',
],
],
'policyDescription' => 'WAF policy for web application protection',
'policyName' => 'web-app-waf-policy',
'priority' => 1,
]);
Result syntax:
[
'version' => '1',
'associatedTemplateAndRuleList' => [
[
'templateArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
],
],
'firewallType' => 'WAF',
'hasPublishedVersion' => ,
'isSnapshot' => ,
'policyArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
'policyConfiguration' => [
'remediationEnabled' => ,
'resourcesCleanUp' => ,
'wafConfig' => [
'conflictResolution' => 'MERGE_WHERE_APPLICABLE',
'existingCustomerWebACLResolution' => 'NO_REMEDIATION',
],
],
'policyDescription' => 'WAF policy for web application protection',
'policyId' => 'xyz789',
'policyName' => 'web-app-waf-policy',
'priority' => 1,
'status' => 'DRAFT',
'updateToken' => 'e3f4a5b6-6c7d-4e8f-9a0b-0c1d2e3f4a5b',
]
CreatePolicySnapshot
$result = $client->createPolicySnapshot([/* ... */]); $promise = $client->createPolicySnapshotAsync([/* ... */]);
Creates a snapshot of the current published version of the specified policy.
Parameter Syntax
$result = $client->createPolicySnapshot([
'clientToken' => '<string>',
'policyIdentifier' => '<string>', // REQUIRED
'tags' => ['<string>', ...],
]);
Parameter Details
Members
- clientToken
-
- Type: string
A 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.
- policyIdentifier
-
- Required: Yes
- Type: string
The identifier of the policy. This is the policy's Amazon Resource Name (ARN).
- tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
The tags to add to the snapshot when it is created.
Result Syntax
[
'associatedTemplateAndRuleList' => [
[
'ruleArn' => '<string>',
'templateArn' => '<string>',
],
// ...
],
'firewallType' => 'WAF|SHIELD_ADVANCED',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'policyArn' => '<string>',
'policyConfiguration' => [
'remediationEnabled' => true || false,
'resourcesCleanUp' => true || false,
'wafConfig' => [
'conflictResolution' => 'MERGE_WHERE_APPLICABLE',
'existingCustomerWebACLResolution' => 'RETROFIT|OVERRIDE_ASSOCIATION|NO_REMEDIATION',
],
],
'policyDescription' => '<string>',
'policyId' => '<string>',
'policyName' => '<string>',
'priority' => <integer>,
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- associatedTemplateAndRuleList
-
- Required: Yes
- Type: Array of AssociatedTemplateOrRule structures
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.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- policyArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the policy.
- policyConfiguration
-
- Type: PolicyConfiguration structure
The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.
- policyDescription
-
- Type: string
A description of the policy.
- policyId
-
- Required: Yes
- Type: string
The service-generated id of the policy.
- policyName
-
- Required: Yes
- Type: string
The name of the policy.
- priority
-
- Required: Yes
- Type: int
The priority of the resource. A lower number indicates a higher priority.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the snapshot was created.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Create a policy snapshot
Creates an immutable snapshot of the current published version of a policy. The snapshot is addressable by a version-qualified ARN.
$result = $client->createPolicySnapshot([
'clientToken' => '550e8400-e29b-41d4-a716-446655440013',
'policyIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
]);
Result syntax:
[
'version' => '2',
'associatedTemplateAndRuleList' => [
[
'templateArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
],
],
'firewallType' => 'WAF',
'isSnapshot' => 1,
'policyArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789:2',
'policyConfiguration' => [
'remediationEnabled' => 1,
'resourcesCleanUp' => ,
'wafConfig' => [
'conflictResolution' => 'MERGE_WHERE_APPLICABLE',
'existingCustomerWebACLResolution' => 'NO_REMEDIATION',
],
],
'policyId' => 'xyz789',
'policyName' => 'web-app-waf-policy',
'priority' => 2,
'status' => 'ACTIVE',
'updatedAt' => ,
]
CreateRule
$result = $client->createRule([/* ... */]); $promise = $client->createRuleAsync([/* ... */]);
Creates a rule. A rule defines a network security configuration to enforce, such as an AWS WAF rule group or configuration data. Use isPublished to create the rule in published (ACTIVE) or draft (DRAFT) state.
Parameter Syntax
$result = $client->createRule([
'clientToken' => '<string>',
'configuration' => [ // REQUIRED
],
'firewallType' => 'WAF', // REQUIRED
'isPublished' => true || false,
'ruleDescription' => '<string>',
'ruleName' => '<string>', // REQUIRED
'ruleType' => 'CONFIGURATION|INSPECTION', // REQUIRED
'tags' => ['<string>', ...],
]);
Parameter Details
Members
- clientToken
-
- Type: string
A 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.
- configuration
-
- Required: Yes
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
The 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. - firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- isPublished
-
- Type: boolean
Specifies 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. - ruleDescription
-
- Type: string
A description of the rule.
- ruleName
-
- Required: Yes
- Type: string
The name of the rule.
- ruleType
-
- Required: Yes
- Type: string
The type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups. - tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
The tags to add to the resource when it is created.
Result Syntax
[
'configuration' => [
],
'firewallType' => 'WAF',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'ruleArn' => '<string>',
'ruleDescription' => '<string>',
'ruleId' => '<string>',
'ruleName' => '<string>',
'ruleType' => 'CONFIGURATION|INSPECTION',
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- configuration
-
- Required: Yes
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
The firewall configuration for the rule, as a JSON document. The structure depends on the rule's firewall type and rule type.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- ruleArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the rule.
- ruleDescription
-
- Type: string
A description of the rule.
- ruleId
-
- Required: Yes
- Type: string
The service-generated id of the rule.
- ruleName
-
- Required: Yes
- Type: string
The name of the rule.
- ruleType
-
- Type: string
The type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups. - status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- ServiceUnavailableException:
The service is temporarily unavailable. This is a retryable error.
- TagPolicyViolationException:
The request violates a tag policy that is in effect for the account or organization.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Create a WAF rule
Creates a new WAF inspection rule in draft state.
$result = $client->createRule([
'clientToken' => '550e8400-e29b-41d4-a716-446655440000',
'configuration' => [
],
'firewallType' => 'WAF',
'isPublished' => ,
'ruleDescription' => 'Blocks requests from known malicious IP addresses',
'ruleName' => 'block-known-bad-ips',
'ruleType' => 'INSPECTION',
]);
Result syntax:
[
'version' => '1',
'configuration' => [
],
'firewallType' => 'WAF',
'hasPublishedVersion' => ,
'isSnapshot' => ,
'ruleArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
'ruleDescription' => 'Blocks requests from known malicious IP addresses',
'ruleId' => 'abc123',
'ruleName' => 'block-known-bad-ips',
'ruleType' => 'INSPECTION',
'status' => 'DRAFT',
'updateToken' => 'c1d2e3f4-4a5b-4c6d-9e7f-8a9b0c1d2e3f',
]
CreateRuleSnapshot
$result = $client->createRuleSnapshot([/* ... */]); $promise = $client->createRuleSnapshotAsync([/* ... */]);
Creates a snapshot of the current published version of the specified rule. A snapshot is an immutable, versioned copy that other resources can reference.
Parameter Syntax
$result = $client->createRuleSnapshot([
'clientToken' => '<string>',
'ruleIdentifier' => '<string>', // REQUIRED
'tags' => ['<string>', ...],
]);
Parameter Details
Members
- clientToken
-
- Type: string
A 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.
- ruleIdentifier
-
- Required: Yes
- Type: string
The identifier of the rule. This is the rule's Amazon Resource Name (ARN).
- tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
The tags to add to the snapshot when it is created.
Result Syntax
[
'configuration' => [
],
'firewallType' => 'WAF',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'ruleArn' => '<string>',
'ruleDescription' => '<string>',
'ruleId' => '<string>',
'ruleName' => '<string>',
'ruleType' => 'CONFIGURATION|INSPECTION',
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- configuration
-
- Required: Yes
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
The firewall configuration for the rule, as a JSON document. The structure depends on the rule's firewall type and rule type.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- ruleArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the rule.
- ruleDescription
-
- Type: string
A description of the rule.
- ruleId
-
- Required: Yes
- Type: string
The service-generated id of the rule.
- ruleName
-
- Required: Yes
- Type: string
The name of the rule.
- ruleType
-
- Type: string
The type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups. - status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the snapshot was created.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Create a rule snapshot
Creates an immutable snapshot of the current published version of a rule. The snapshot is addressable by a version-qualified ARN.
$result = $client->createRuleSnapshot([
'clientToken' => '550e8400-e29b-41d4-a716-446655440011',
'ruleIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
]);
Result syntax:
[
'version' => '2',
'configuration' => [
],
'firewallType' => 'WAF',
'isSnapshot' => 1,
'ruleArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123:2',
'ruleId' => 'abc123',
'ruleName' => 'block-known-bad-ips',
'ruleType' => 'INSPECTION',
'status' => 'ACTIVE',
'updatedAt' => ,
]
CreateScope
$result = $client->createScope([/* ... */]); $promise = $client->createScopeAsync([/* ... */]);
Creates a scope. A scope selects the accounts and resources that a deployment applies to. Use isPublished to create the scope in published (ACTIVE) or draft (DRAFT) state.
Parameter Syntax
$result = $client->createScope([
'clientToken' => '<string>',
'isPublished' => true || false,
'scopeConfiguration' => [ // REQUIRED
'accountFilter' => [
'exclude' => [
'accountIds' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
'include' => [
'accountIds' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
'includeAll' => [
],
],
'resourceScopes' => [ // REQUIRED
'<ScopeResourceType>' => [
'exclude' => [
'explicitArns' => ['<string>', ...],
'expression' => [
'and' => [
[...], // RECURSIVE
// ...
],
'criteria' => [
'albConfig' => [
'ipAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
'scheme' => 'internet-facing|internal',
],
'tags' => ['<string>', ...],
],
'not' => [...], // RECURSIVE
'or' => [
[...], // RECURSIVE
// ...
],
],
],
'include' => [
'explicitArns' => ['<string>', ...],
'expression' => [
'and' => [
[...], // RECURSIVE
// ...
],
'criteria' => [
'albConfig' => [
'ipAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
'scheme' => 'internet-facing|internal',
],
'tags' => ['<string>', ...],
],
'not' => [...], // RECURSIVE
'or' => [
[...], // RECURSIVE
// ...
],
],
],
'includeAll' => true || false,
],
// ...
],
],
'scopeDescription' => '<string>',
'scopeName' => '<string>', // REQUIRED
'tags' => ['<string>', ...],
]);
Parameter Details
Members
- clientToken
-
- Type: string
A 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.
- isPublished
-
- Type: boolean
Specifies 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. - scopeConfiguration
-
- Required: Yes
- Type: ScopeConfiguration structure
The configuration that defines which accounts and resources are in scope.
- scopeDescription
-
- Type: string
A description of the scope.
- scopeName
-
- Required: Yes
- Type: string
The name of the scope.
- tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
The tags to add to the resource when it is created.
Result Syntax
[
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'scopeArn' => '<string>',
'scopeConfiguration' => [
'accountFilter' => [
'exclude' => [
'accountIds' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
'include' => [
'accountIds' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
'includeAll' => [
],
],
'resourceScopes' => [
'<ScopeResourceType>' => [
'exclude' => [
'explicitArns' => ['<string>', ...],
'expression' => [
'and' => [
[...], // RECURSIVE
// ...
],
'criteria' => [
'albConfig' => [
'ipAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
'scheme' => 'internet-facing|internal',
],
'tags' => ['<string>', ...],
],
'not' => [...], // RECURSIVE
'or' => [
[...], // RECURSIVE
// ...
],
],
],
'include' => [
'explicitArns' => ['<string>', ...],
'expression' => [
'and' => [
[...], // RECURSIVE
// ...
],
'criteria' => [
'albConfig' => [
'ipAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
'scheme' => 'internet-facing|internal',
],
'tags' => ['<string>', ...],
],
'not' => [...], // RECURSIVE
'or' => [
[...], // RECURSIVE
// ...
],
],
],
'includeAll' => true || false,
],
// ...
],
],
'scopeDescription' => '<string>',
'scopeId' => '<string>',
'scopeName' => '<string>',
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- scopeArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the scope.
- scopeConfiguration
-
- Type: ScopeConfiguration structure
The configuration that defines which accounts and resources are in scope.
- scopeDescription
-
- Type: string
A description of the scope.
- scopeId
-
- Required: Yes
- Type: string
The service-generated id of the scope.
- scopeName
-
- Required: Yes
- Type: string
The name of the scope.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- ServiceUnavailableException:
The service is temporarily unavailable. This is a retryable error.
- TagPolicyViolationException:
The request violates a tag policy that is in effect for the account or organization.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Create a scope
Creates a new scope in published (ACTIVE) state.
$result = $client->createScope([
'clientToken' => '550e8400-e29b-41d4-a716-446655440001',
'isPublished' => 1,
'scopeConfiguration' => [
'accountFilter' => [
'includeAll' => [
],
],
'resourceScopes' => [
],
],
'scopeDescription' => 'Scope covering all production web application resources',
'scopeName' => 'production-web-apps',
]);
Result syntax:
[
'version' => '1',
'hasPublishedVersion' => 1,
'isSnapshot' => ,
'scopeArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
'scopeConfiguration' => [
'accountFilter' => [
'includeAll' => [
],
],
'resourceScopes' => [
],
],
'scopeDescription' => 'Scope covering all production web application resources',
'scopeId' => 'abc123',
'scopeName' => 'production-web-apps',
'status' => 'ACTIVE',
'updateToken' => 'b0c4d1e2-3f4a-4b5c-8d6e-7f8a9b0c1d2e',
]
CreateScopeSnapshot
$result = $client->createScopeSnapshot([/* ... */]); $promise = $client->createScopeSnapshotAsync([/* ... */]);
Creates a snapshot of the current published version of the specified scope.
Parameter Syntax
$result = $client->createScopeSnapshot([
'clientToken' => '<string>',
'scopeIdentifier' => '<string>', // REQUIRED
'tags' => ['<string>', ...],
]);
Parameter Details
Members
- clientToken
-
- Type: string
A 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.
- scopeIdentifier
-
- Required: Yes
- Type: string
The identifier of the scope. This is the scope's Amazon Resource Name (ARN).
- tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
The tags to add to the snapshot when it is created.
Result Syntax
[
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'scopeArn' => '<string>',
'scopeConfiguration' => [
'accountFilter' => [
'exclude' => [
'accountIds' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
'include' => [
'accountIds' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
'includeAll' => [
],
],
'resourceScopes' => [
'<ScopeResourceType>' => [
'exclude' => [
'explicitArns' => ['<string>', ...],
'expression' => [
'and' => [
[...], // RECURSIVE
// ...
],
'criteria' => [
'albConfig' => [
'ipAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
'scheme' => 'internet-facing|internal',
],
'tags' => ['<string>', ...],
],
'not' => [...], // RECURSIVE
'or' => [
[...], // RECURSIVE
// ...
],
],
],
'include' => [
'explicitArns' => ['<string>', ...],
'expression' => [
'and' => [
[...], // RECURSIVE
// ...
],
'criteria' => [
'albConfig' => [
'ipAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
'scheme' => 'internet-facing|internal',
],
'tags' => ['<string>', ...],
],
'not' => [...], // RECURSIVE
'or' => [
[...], // RECURSIVE
// ...
],
],
],
'includeAll' => true || false,
],
// ...
],
],
'scopeDescription' => '<string>',
'scopeId' => '<string>',
'scopeName' => '<string>',
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- scopeArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the scope.
- scopeConfiguration
-
- Type: ScopeConfiguration structure
The configuration that defines which accounts and resources are in scope.
- scopeDescription
-
- Type: string
A description of the scope.
- scopeId
-
- Required: Yes
- Type: string
The service-generated id of the scope.
- scopeName
-
- Required: Yes
- Type: string
The name of the scope.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the snapshot was created.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Create a scope snapshot
Creates an immutable snapshot of the current published version of a scope. The snapshot is addressable by a version-qualified ARN.
$result = $client->createScopeSnapshot([
'clientToken' => '550e8400-e29b-41d4-a716-446655440010',
'scopeIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
]);
Result syntax:
[
'version' => '2',
'isSnapshot' => 1,
'scopeArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123:2',
'scopeConfiguration' => [
'accountFilter' => [
'includeAll' => [
],
],
'resourceScopes' => [
],
],
'scopeId' => 'abc123',
'scopeName' => 'production-web-apps',
'status' => 'ACTIVE',
'updatedAt' => ,
]
CreateTemplate
$result = $client->createTemplate([/* ... */]); $promise = $client->createTemplateAsync([/* ... */]);
Creates a template. A template groups one or more rules to simplify reuse across policies. You can also associate rules with a policy directly, without a template. Use isPublished to create the template in published (ACTIVE) or draft (DRAFT) state.
Parameter Syntax
$result = $client->createTemplate([
'associatedRuleList' => [ // REQUIRED
[
'ruleIdentifier' => '<string>', // REQUIRED
],
// ...
],
'clientToken' => '<string>',
'firewallType' => 'WAF', // REQUIRED
'isPublished' => true || false,
'tags' => ['<string>', ...],
'templateDescription' => '<string>',
'templateName' => '<string>', // REQUIRED
]);
Parameter Details
Members
- associatedRuleList
-
- Required: Yes
- Type: Array of RuleReference structures
The rules associated with the template.
- clientToken
-
- Type: string
A 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.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- isPublished
-
- Type: boolean
Specifies 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
-
- Type: Associative array of custom strings keys (TagKey) to strings
The tags to add to the resource when it is created.
- templateDescription
-
- Type: string
A description of the template.
- templateName
-
- Required: Yes
- Type: string
The name of the template.
Result Syntax
[
'associatedRuleList' => [
[
'ruleArn' => '<string>',
],
// ...
],
'firewallType' => 'WAF',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'status' => 'DRAFT|ACTIVE|DISABLED',
'templateArn' => '<string>',
'templateDescription' => '<string>',
'templateId' => '<string>',
'templateName' => '<string>',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- associatedRuleList
-
- Required: Yes
- Type: Array of AssociatedRule structures
The rules associated with the template.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - templateArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the template.
- templateDescription
-
- Type: string
A description of the template.
- templateId
-
- Required: Yes
- Type: string
The service-generated id of the template.
- templateName
-
- Required: Yes
- Type: string
The name of the template.
- updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- ServiceUnavailableException:
The service is temporarily unavailable. This is a retryable error.
- TagPolicyViolationException:
The request violates a tag policy that is in effect for the account or organization.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Create a WAF template
Creates a new WAF template in published (ACTIVE) state with an associated rule.
$result = $client->createTemplate([
'associatedRuleList' => [
[
'ruleIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
],
],
'clientToken' => '550e8400-e29b-41d4-a716-446655440004',
'firewallType' => 'WAF',
'isPublished' => 1,
'templateDescription' => 'Standard WAF template with baseline rule groups',
'templateName' => 'standard-waf-template',
]);
Result syntax:
[
'version' => '1',
'associatedRuleList' => [
[
'ruleArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
],
],
'firewallType' => 'WAF',
'hasPublishedVersion' => 1,
'isSnapshot' => ,
'status' => 'ACTIVE',
'templateArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
'templateDescription' => 'Standard WAF template with baseline rule groups',
'templateId' => 'xyz789',
'templateName' => 'standard-waf-template',
'updateToken' => 'd2e3f4a5-5b6c-4d7e-8f9a-9b0c1d2e3f4a',
]
CreateTemplateSnapshot
$result = $client->createTemplateSnapshot([/* ... */]); $promise = $client->createTemplateSnapshotAsync([/* ... */]);
Creates a snapshot of the current published version of the specified template.
Parameter Syntax
$result = $client->createTemplateSnapshot([
'clientToken' => '<string>',
'tags' => ['<string>', ...],
'templateIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- clientToken
-
- Type: string
A 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
-
- Type: Associative array of custom strings keys (TagKey) to strings
The tags to add to the snapshot when it is created.
- templateIdentifier
-
- Required: Yes
- Type: string
The identifier of the template. This is the template's Amazon Resource Name (ARN).
Result Syntax
[
'associatedRuleList' => [
[
'ruleArn' => '<string>',
],
// ...
],
'firewallType' => 'WAF',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'status' => 'DRAFT|ACTIVE|DISABLED',
'templateArn' => '<string>',
'templateDescription' => '<string>',
'templateId' => '<string>',
'templateName' => '<string>',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- associatedRuleList
-
- Required: Yes
- Type: Array of AssociatedRule structures
The rules associated with the template.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - templateArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the template.
- templateDescription
-
- Type: string
A description of the template.
- templateId
-
- Required: Yes
- Type: string
The service-generated id of the template.
- templateName
-
- Required: Yes
- Type: string
The name of the template.
- updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the snapshot was created.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Create a template snapshot
Creates an immutable snapshot of the current published version of a template. The snapshot is addressable by a version-qualified ARN.
$result = $client->createTemplateSnapshot([
'clientToken' => '550e8400-e29b-41d4-a716-446655440012',
'templateIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
]);
Result syntax:
[
'version' => '2',
'associatedRuleList' => [
[
'ruleArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
],
],
'firewallType' => 'WAF',
'isSnapshot' => 1,
'status' => 'ACTIVE',
'templateArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789:2',
'templateId' => 'xyz789',
'templateName' => 'standard-waf-template',
'updatedAt' => ,
]
DeleteAdminAccount
$result = $client->deleteAdminAccount([/* ... */]); $promise = $client->deleteAdminAccountAsync([/* ... */]);
Removes the specified AWS Network Security Manager administrator account.
Parameter Syntax
$result = $client->deleteAdminAccount([
'accountId' => '<string>', // REQUIRED
]);
Parameter Details
Members
- accountId
-
- Required: Yes
- Type: string
The AWS account ID of the administrator account to remove.
Result Syntax
[]
Result Details
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Remove an administrator account
Removes an account's Network Security Manager administrator designation.
$result = $client->deleteAdminAccount([
'accountId' => '234567890123',
]);
DeleteDeployment
$result = $client->deleteDeployment([/* ... */]); $promise = $client->deleteDeploymentAsync([/* ... */]);
Deletes the specified deployment.
Parameter Syntax
$result = $client->deleteDeployment([
'deploymentIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- deploymentIdentifier
-
- Required: Yes
- Type: string
The identifier of the deployment. This is the deployment's Amazon Resource Name (ARN).
Result Syntax
[]
Result Details
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Delete a deployment
Deletes a deployment by its ARN. Deleting an active deployment stops enforcement and triggers cleanup of managed firewall resources.
$result = $client->deleteDeployment([
'deploymentIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456',
]);
DeletePolicy
$result = $client->deletePolicy([/* ... */]); $promise = $client->deletePolicyAsync([/* ... */]);
Deletes the specified policy.
Parameter Syntax
$result = $client->deletePolicy([
'policyIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- policyIdentifier
-
- Required: Yes
- Type: string
The identifier of the policy. This is the policy's Amazon Resource Name (ARN).
Result Syntax
[]
Result Details
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Delete a policy
Deletes a policy by its ARN. The policy must not be associated with any deployment.
$result = $client->deletePolicy([
'policyIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
]);
DeleteRule
$result = $client->deleteRule([/* ... */]); $promise = $client->deleteRuleAsync([/* ... */]);
Deletes the specified rule.
Parameter Syntax
$result = $client->deleteRule([
'ruleIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- ruleIdentifier
-
- Required: Yes
- Type: string
The identifier of the rule. This is the rule's Amazon Resource Name (ARN).
Result Syntax
[]
Result Details
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Delete a rule
Deletes a rule by its ARN. The rule must not be associated with any template or policy.
$result = $client->deleteRule([
'ruleIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
]);
DeleteScope
$result = $client->deleteScope([/* ... */]); $promise = $client->deleteScopeAsync([/* ... */]);
Deletes the specified scope.
Parameter Syntax
$result = $client->deleteScope([
'scopeIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- scopeIdentifier
-
- Required: Yes
- Type: string
The identifier of the scope. This is the scope's Amazon Resource Name (ARN).
Result Syntax
[]
Result Details
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Delete a scope
Deletes a scope by its ARN. The scope must not be associated with any deployment.
$result = $client->deleteScope([
'scopeIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
]);
DeleteTemplate
$result = $client->deleteTemplate([/* ... */]); $promise = $client->deleteTemplateAsync([/* ... */]);
Deletes the specified template.
Parameter Syntax
$result = $client->deleteTemplate([
'templateIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- templateIdentifier
-
- Required: Yes
- Type: string
The identifier of the template. This is the template's Amazon Resource Name (ARN).
Result Syntax
[]
Result Details
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Delete a template
Deletes a template by its ARN. The template must not be associated with any policy.
$result = $client->deleteTemplate([
'templateIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
]);
GenerateRuleConfiguration
$result = $client->generateRuleConfiguration([/* ... */]); $promise = $client->generateRuleConfigurationAsync([/* ... */]);
Generates a rule configuration from a natural-language description. Provide a prompt along with the rule's firewall type and rule type. The service returns a configuration that you can use when you create or update a rule. If you also provide an existing configuration, the service edits that configuration instead of generating a new one.
Parameter Syntax
$result = $client->generateRuleConfiguration([
'clientToken' => '<string>',
'currentConfiguration' => '<string>',
'prompt' => '<string>', // REQUIRED
'ruleFirewallType' => 'WAF', // REQUIRED
'ruleType' => 'CONFIGURATION|INSPECTION', // REQUIRED
'wafConfigDataType' => 'DefaultAction|VisibilityConfig|CaptchaConfig|ChallengeConfig|CustomResponseBodies|LoggingConfiguration|DataProtectionConfig|AssociationConfig|OnSourceDDoSProtectionConfig|TokenDomains',
]);
Parameter Details
Members
- clientToken
-
- Type: string
A 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.
- currentConfiguration
-
- Type: string
An 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.
- prompt
-
- Required: Yes
- Type: string
A natural-language description of the configuration that you want to generate.
- ruleFirewallType
-
- Required: Yes
- Type: string
The firewall type of the rule.
- ruleType
-
- Required: Yes
- Type: string
The type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups. - wafConfigDataType
-
- Type: string
For AWS WAF configuration rules, the specific AWS WAF configuration variant to generate. This is optional; if you omit it, the service selects the variant.
Result Syntax
[
'configuration' => '<string>',
'description' => '<string>',
]
Result Details
Members
- configuration
-
- Required: Yes
- Type: string
The generated configuration, as a JSON string. You can use this value in the
configurationfield of a rule. - description
-
- Type: string
Reserved for a future human-readable description of the generated configuration. This field is currently not populated.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Generate a rule configuration from a description
Generates a firewall rule configuration from a natural language description. The response contains the generated configuration as a JSON string, ready to use as the configuration of a rule.
$result = $client->generateRuleConfiguration([
'clientToken' => '550e8400-e29b-41d4-a716-446655440015',
'prompt' => 'Create a rate limiting rule that blocks IP addresses sending more than 2000 requests in 5 minutes',
'ruleFirewallType' => 'WAF',
'ruleType' => 'INSPECTION',
]);
Result syntax:
[
'configuration' => '{"name":"rate-limit-rule","priority":1,"statement":{"rateBasedStatement":{"limit":2000,"evaluationWindowSec":300,"aggregateKeyType":"IP"}},"action":{"block":{}}}',
]
GetAdminAccount
$result = $client->getAdminAccount([/* ... */]); $promise = $client->getAdminAccountAsync([/* ... */]);
Retrieves the details of the specified AWS Network Security Manager administrator account.
Parameter Syntax
$result = $client->getAdminAccount([
'accountId' => '<string>', // REQUIRED
]);
Parameter Details
Members
- accountId
-
- Required: Yes
- Type: string
The AWS account ID of the administrator account to retrieve.
Result Syntax
[
'adminAccountDetails' => [
'adminAccount' => '<string>',
'adminScope' => [
'firewallTypeScope' => [
'allFirewallTypesEnabled' => true || false,
'firewallTypes' => ['<string>', ...],
],
'scopeFilter' => [
'excludeOnly' => [
'accounts' => [
[
'accountId' => '<string>',
'email' => '<string>',
'name' => '<string>',
],
// ...
],
'organizationalUnits' => [
[
'name' => '<string>',
'ouId' => '<string>',
],
// ...
],
],
'includeAll' => [
],
'includeOnly' => [
'accounts' => [
[
'accountId' => '<string>',
'email' => '<string>',
'name' => '<string>',
],
// ...
],
'organizationalUnits' => [
[
'name' => '<string>',
'ouId' => '<string>',
],
// ...
],
],
],
],
'priority' => <integer>,
'status' => 'ONBOARDED|OFFBOARDED',
],
]
Result Details
Members
- adminAccountDetails
-
- Type: AdminAccountDetails structure
The details of the administrator account.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Get an administrator account
Retrieves the details and administrative scope of a Network Security Manager administrator account.
$result = $client->getAdminAccount([
'accountId' => '234567890123',
]);
Result syntax:
[
'adminAccountDetails' => [
'adminAccount' => '234567890123',
'adminScope' => [
'firewallTypeScope' => [
'allFirewallTypesEnabled' => ,
'firewallTypes' => [
'WAF',
],
],
'scopeFilter' => [
'includeOnly' => [
'organizationalUnits' => [
[
'name' => 'Production',
'ouId' => 'ou-abcd-12345678',
],
],
],
],
],
'priority' => 2,
'status' => 'ONBOARDED',
],
]
GetDeployment
$result = $client->getDeployment([/* ... */]); $promise = $client->getDeploymentAsync([/* ... */]);
Retrieves the details of the specified deployment, including coverage information and any warnings.
Parameter Syntax
$result = $client->getDeployment([
'deploymentIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- deploymentIdentifier
-
- Required: Yes
- Type: string
The identifier of the deployment. This is the deployment's Amazon Resource Name (ARN).
Result Syntax
[
'associatedPolicyList' => [
[
'policyArn' => '<string>',
],
// ...
],
'associatedScopeList' => [
[
'scopeArn' => '<string>',
],
// ...
],
'deploymentArn' => '<string>',
'deploymentConfiguration' => [
'enableCrossAccountVisibility' => true || false,
],
'deploymentCoverage' => [
[
'firewallType' => 'WAF|SHIELD_ADVANCED',
'inScopeResourceTypes' => ['<string>', ...],
'policyArns' => ['<string>', ...],
],
// ...
],
'deploymentDescription' => '<string>',
'deploymentId' => '<string>',
'deploymentName' => '<string>',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
'warnings' => [
[
'code' => '<string>',
'message' => '<string>',
'policyArn' => '<string>',
],
// ...
],
]
Result Details
Members
- associatedPolicyList
-
- Required: Yes
- Type: Array of AssociatedPolicy structures
The policies associated with the deployment.
- associatedScopeList
-
- Required: Yes
- Type: Array of AssociatedScope structures
The scope associated with the deployment. A deployment has exactly one scope.
- deploymentArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the deployment.
- deploymentConfiguration
-
- Type: DeploymentConfiguration structure
The configuration settings for the deployment.
- deploymentCoverage
-
- Type: Array of DeploymentCoverageEntry structures
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.
- deploymentDescription
-
- Type: string
A description of the deployment.
- deploymentId
-
- Required: Yes
- Type: string
The service-generated id of the deployment.
- deploymentName
-
- Required: Yes
- Type: string
The name of the deployment.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- status
-
- Required: Yes
- Type: string
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). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
- warnings
-
- Type: Array of DeploymentWarningEntry structures
Warnings about potential issues, such as a policy that has no applicable resources in the deployment's scope.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Get a deployment
Retrieves the current published version of a deployment by its base ARN, including per-firewall-type coverage showing which in-scope resource types each policy protects.
$result = $client->getDeployment([
'deploymentIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456',
]);
Result syntax:
[
'version' => '1',
'associatedPolicyList' => [
[
'policyArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
],
],
'associatedScopeList' => [
[
'scopeArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
],
],
'deploymentArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456',
'deploymentConfiguration' => [
'enableCrossAccountVisibility' => ,
],
'deploymentCoverage' => [
[
'firewallType' => 'WAF',
'inScopeResourceTypes' => [
'AWS::ElasticLoadBalancingV2::LoadBalancer::application',
'AWS::CloudFront::Distribution',
],
'policyArns' => [
'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
],
],
],
'deploymentDescription' => 'Production deployment for US East 1 region',
'deploymentId' => 'def456',
'deploymentName' => 'prod-us-east-1-deployment',
'hasPublishedVersion' => 1,
'isSnapshot' => ,
'status' => 'ACTIVE',
'updateToken' => 'f4a5b6c7-7d8e-4f9a-8b1c-1d2e3f4a5b6c',
]
GetPolicy
$result = $client->getPolicy([/* ... */]); $promise = $client->getPolicyAsync([/* ... */]);
Retrieves the details of the specified policy.
Parameter Syntax
$result = $client->getPolicy([
'policyIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- policyIdentifier
-
- Required: Yes
- Type: string
The identifier of the policy. This is the policy's Amazon Resource Name (ARN).
Result Syntax
[
'associatedTemplateAndRuleList' => [
[
'ruleArn' => '<string>',
'templateArn' => '<string>',
],
// ...
],
'firewallType' => 'WAF|SHIELD_ADVANCED',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'policyArn' => '<string>',
'policyConfiguration' => [
'remediationEnabled' => true || false,
'resourcesCleanUp' => true || false,
'wafConfig' => [
'conflictResolution' => 'MERGE_WHERE_APPLICABLE',
'existingCustomerWebACLResolution' => 'RETROFIT|OVERRIDE_ASSOCIATION|NO_REMEDIATION',
],
],
'policyDescription' => '<string>',
'policyId' => '<string>',
'policyName' => '<string>',
'priority' => <integer>,
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- associatedTemplateAndRuleList
-
- Required: Yes
- Type: Array of AssociatedTemplateOrRule structures
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.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- policyArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the policy.
- policyConfiguration
-
- Type: PolicyConfiguration structure
The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.
- policyDescription
-
- Type: string
A description of the policy.
- policyId
-
- Required: Yes
- Type: string
The service-generated id of the policy.
- policyName
-
- Required: Yes
- Type: string
The name of the policy.
- priority
-
- Required: Yes
- Type: int
The priority of the resource. A lower number indicates a higher priority.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Get a policy
Retrieves the current published version of a policy by its base ARN, including its associated templates and rules and its enforcement configuration.
$result = $client->getPolicy([
'policyIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
]);
Result syntax:
[
'version' => '1',
'associatedTemplateAndRuleList' => [
[
'templateArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
],
],
'firewallType' => 'WAF',
'hasPublishedVersion' => 1,
'isSnapshot' => ,
'policyArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
'policyConfiguration' => [
'remediationEnabled' => 1,
'resourcesCleanUp' => ,
'wafConfig' => [
'conflictResolution' => 'MERGE_WHERE_APPLICABLE',
'existingCustomerWebACLResolution' => 'NO_REMEDIATION',
],
],
'policyDescription' => 'WAF policy for web application protection',
'policyId' => 'xyz789',
'policyName' => 'web-app-waf-policy',
'priority' => 1,
'status' => 'ACTIVE',
'updateToken' => 'e3f4a5b6-6c7d-4e8f-9a0b-0c1d2e3f4a5b',
]
GetRule
$result = $client->getRule([/* ... */]); $promise = $client->getRuleAsync([/* ... */]);
Retrieves the details of the specified rule.
Parameter Syntax
$result = $client->getRule([
'ruleIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- ruleIdentifier
-
- Required: Yes
- Type: string
The identifier of the rule. This is the rule's Amazon Resource Name (ARN).
Result Syntax
[
'configuration' => [
],
'firewallType' => 'WAF',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'ruleArn' => '<string>',
'ruleDescription' => '<string>',
'ruleId' => '<string>',
'ruleName' => '<string>',
'ruleType' => 'CONFIGURATION|INSPECTION',
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- configuration
-
- Required: Yes
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
The firewall configuration for the rule, as a JSON document. The structure depends on the rule's firewall type and rule type.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- ruleArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the rule.
- ruleDescription
-
- Type: string
A description of the rule.
- ruleId
-
- Required: Yes
- Type: string
The service-generated id of the rule.
- ruleName
-
- Required: Yes
- Type: string
The name of the rule.
- ruleType
-
- Type: string
The type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups. - status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Get a rule
Retrieves the current published version of a rule by its base ARN.
$result = $client->getRule([
'ruleIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
]);
Result syntax:
[
'version' => '1',
'configuration' => [
],
'firewallType' => 'WAF',
'hasPublishedVersion' => 1,
'isSnapshot' => ,
'ruleArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
'ruleDescription' => 'Blocks requests from known malicious IP addresses',
'ruleId' => 'abc123',
'ruleName' => 'block-known-bad-ips',
'ruleType' => 'INSPECTION',
'status' => 'ACTIVE',
'updateToken' => 'c1d2e3f4-4a5b-4c6d-9e7f-8a9b0c1d2e3f',
]
Example 2: Get a specific version of a rule
Retrieves a specific immutable version (snapshot) of a rule using a version-qualified ARN. The response has isSnapshot set to true. Omitting the version qualifier returns the current published rule instead.
$result = $client->getRule([
'ruleIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123:3',
]);
Result syntax:
[
'version' => '3',
'configuration' => [
],
'firewallType' => 'WAF',
'isSnapshot' => 1,
'ruleArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123:3',
'ruleDescription' => 'Blocks requests from known malicious IP addresses',
'ruleId' => 'abc123',
'ruleName' => 'block-known-bad-ips',
'ruleType' => 'INSPECTION',
'status' => 'ACTIVE',
]
GetScope
$result = $client->getScope([/* ... */]); $promise = $client->getScopeAsync([/* ... */]);
Retrieves the details of the specified scope.
Parameter Syntax
$result = $client->getScope([
'scopeIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- scopeIdentifier
-
- Required: Yes
- Type: string
The identifier of the scope. This is the scope's Amazon Resource Name (ARN).
Result Syntax
[
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'scopeArn' => '<string>',
'scopeConfiguration' => [
'accountFilter' => [
'exclude' => [
'accountIds' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
'include' => [
'accountIds' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
'includeAll' => [
],
],
'resourceScopes' => [
'<ScopeResourceType>' => [
'exclude' => [
'explicitArns' => ['<string>', ...],
'expression' => [
'and' => [
[...], // RECURSIVE
// ...
],
'criteria' => [
'albConfig' => [
'ipAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
'scheme' => 'internet-facing|internal',
],
'tags' => ['<string>', ...],
],
'not' => [...], // RECURSIVE
'or' => [
[...], // RECURSIVE
// ...
],
],
],
'include' => [
'explicitArns' => ['<string>', ...],
'expression' => [
'and' => [
[...], // RECURSIVE
// ...
],
'criteria' => [
'albConfig' => [
'ipAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
'scheme' => 'internet-facing|internal',
],
'tags' => ['<string>', ...],
],
'not' => [...], // RECURSIVE
'or' => [
[...], // RECURSIVE
// ...
],
],
],
'includeAll' => true || false,
],
// ...
],
],
'scopeDescription' => '<string>',
'scopeId' => '<string>',
'scopeName' => '<string>',
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- scopeArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the scope.
- scopeConfiguration
-
- Type: ScopeConfiguration structure
The configuration that defines which accounts and resources are in scope.
- scopeDescription
-
- Type: string
A description of the scope.
- scopeId
-
- Required: Yes
- Type: string
The service-generated id of the scope.
- scopeName
-
- Required: Yes
- Type: string
The name of the scope.
- status
-
- Required: Yes
- Type: string
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). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Get a scope
Retrieves the current published version of a scope by its base ARN.
$result = $client->getScope([
'scopeIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
]);
Result syntax:
[
'version' => '1',
'hasPublishedVersion' => 1,
'isSnapshot' => ,
'scopeArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
'scopeConfiguration' => [
'accountFilter' => [
'includeAll' => [
],
],
'resourceScopes' => [
],
],
'scopeDescription' => 'Scope covering all production web application resources',
'scopeId' => 'abc123',
'scopeName' => 'production-web-apps',
'status' => 'ACTIVE',
'updateToken' => 'b0c4d1e2-3f4a-4b5c-8d6e-7f8a9b0c1d2e',
]
GetTemplate
$result = $client->getTemplate([/* ... */]); $promise = $client->getTemplateAsync([/* ... */]);
Retrieves the details of the specified template.
Parameter Syntax
$result = $client->getTemplate([
'templateIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- templateIdentifier
-
- Required: Yes
- Type: string
The identifier of the template. This is the template's Amazon Resource Name (ARN).
Result Syntax
[
'associatedRuleList' => [
[
'ruleArn' => '<string>',
],
// ...
],
'firewallType' => 'WAF',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'status' => 'DRAFT|ACTIVE|DISABLED',
'templateArn' => '<string>',
'templateDescription' => '<string>',
'templateId' => '<string>',
'templateName' => '<string>',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- associatedRuleList
-
- Required: Yes
- Type: Array of AssociatedRule structures
The rules associated with the template.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - templateArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the template.
- templateDescription
-
- Type: string
A description of the template.
- templateId
-
- Required: Yes
- Type: string
The service-generated id of the template.
- templateName
-
- Required: Yes
- Type: string
The name of the template.
- updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Get a template
Retrieves the current published version of a template by its base ARN, including its associated rules.
$result = $client->getTemplate([
'templateIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
]);
Result syntax:
[
'version' => '1',
'associatedRuleList' => [
[
'ruleArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
],
],
'firewallType' => 'WAF',
'hasPublishedVersion' => 1,
'isSnapshot' => ,
'status' => 'ACTIVE',
'templateArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
'templateDescription' => 'Standard WAF template with baseline rule groups',
'templateId' => 'xyz789',
'templateName' => 'standard-waf-template',
'updateToken' => 'd2e3f4a5-5b6c-4d7e-8f9a-9b0c1d2e3f4a',
]
ListAdminAccounts
$result = $client->listAdminAccounts([/* ... */]); $promise = $client->listAdminAccountsAsync([/* ... */]);
Lists the AWS Network Security Manager administrator accounts in the organization.
Parameter Syntax
$result = $client->listAdminAccounts([
'maxResults' => <integer>,
'nextToken' => '<string>',
]);
Parameter Details
Members
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
Result Syntax
[
'adminAccounts' => [
[
'accountId' => '<string>',
'email' => '<string>',
'name' => '<string>',
'priority' => <integer>,
],
// ...
],
'nextToken' => '<string>',
]
Result Details
Members
- adminAccounts
-
- Required: Yes
- Type: Array of AdminAccountSummary structures
The list of administrator accounts.
- nextToken
-
- Type: 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.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List administrator accounts
Lists the Network Security Manager administrator accounts for the organization.
$result = $client->listAdminAccounts([
'maxResults' => 10,
]);
Result syntax:
[
'adminAccounts' => [
[
'accountId' => '234567890123',
'priority' => 2,
],
],
]
ListAggregateResourceSynchronizationStatuses
$result = $client->listAggregateResourceSynchronizationStatuses([/* ... */]); $promise = $client->listAggregateResourceSynchronizationStatusesAsync([/* ... */]);
Lists the aggregated synchronization statuses of resources across the deployments in your administrator account. You can filter the results by synchronization status and page through them.
Parameter Syntax
$result = $client->listAggregateResourceSynchronizationStatuses([
'maxResults' => <integer>,
'nextToken' => '<string>',
'synchronizationStatus' => 'IN_SYNC|OUT_OF_SYNC|NOT_APPLICABLE',
]);
Parameter Details
Members
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
- synchronizationStatus
-
- Type: string
Filters the results by synchronization status, such as
IN_SYNCorOUT_OF_SYNC.
Result Syntax
[
'nextToken' => '<string>',
'resourceSynchronizationStatuses' => [
[
'accountId' => '<string>',
'deploymentArn' => '<string>',
'evaluatedAt' => <DateTime>,
'outOfSyncReasons' => [
'notVisible' => [
'reason' => '<string>',
],
'reasons' => [
'<PolicyFirewallType>' => [
'invalidFirewall' => [
'incorrectAppendableConfigurationOrder' => [
[
'actualValue' => '<string>',
'configurationName' => '<string>',
'expectedValue' => '<string>',
],
// ...
],
'incorrectSingleValueConfigurations' => [
[
'actualValue' => '<string>',
'configurationName' => '<string>',
'expectedValue' => '<string>',
],
// ...
],
'missingAppendableConfigurationValues' => [
[
'actualValue' => '<string>',
'configurationName' => '<string>',
'expectedValue' => '<string>',
],
// ...
],
'missingMergeableConfigurationValues' => [
[
'actualValue' => '<string>',
'configurationName' => '<string>',
'expectedValue' => '<string>',
],
// ...
],
'unexpectedAppendableConfigurationValues' => [
[
'actualValue' => '<string>',
'configurationName' => '<string>',
'expectedValue' => '<string>',
],
// ...
],
'unexpectedMergeableConfigurationValues' => [
[
'actualValue' => '<string>',
'configurationName' => '<string>',
'expectedValue' => '<string>',
],
// ...
],
],
'missingFirewall' => '<string>',
],
// ...
],
],
'remediationIssues' => [
'issues' => [
'<PolicyFirewallType>' => [
'correctiveAction' => '<string>',
'issueType' => '<string>',
'message' => '<string>',
],
// ...
],
'notVisible' => [
'reason' => '<string>',
],
],
'resourceArn' => '<string>',
'resourceType' => 'AWS::ApiGateway::Stage|AWS::CloudFront::Distribution|AWS::EC2::EIP|AWS::ElasticLoadBalancingV2::LoadBalancer::application|AWS::ElasticLoadBalancing::LoadBalancer|AWS::WAFv2::WebACL|AWS::Shield::Protection|AWS::ShieldRegional::Protection',
'synchronizationStatus' => 'IN_SYNC|OUT_OF_SYNC|NOT_APPLICABLE',
'updatedAt' => <DateTime>,
],
// ...
],
]
Result Details
Members
- nextToken
-
- Type: 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.
- resourceSynchronizationStatuses
-
- Required: Yes
- Type: Array of ResourceSynchronizationStatusSummary structures
The list of resource synchronization statuses.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List synchronization statuses across all deployments
Lists the aggregate synchronization status of resources across all deployments in the account.
$result = $client->listAggregateResourceSynchronizationStatuses([
'maxResults' => 10,
'synchronizationStatus' => 'IN_SYNC',
]);
Result syntax:
[
'resourceSynchronizationStatuses' => [
[
'accountId' => '234567890123',
'evaluatedAt' => ,
'resourceArn' => 'arn:aws:elasticloadbalancing:us-east-1:234567890123:loadbalancer/app/my-alb/50dc6c495c0c9188',
'resourceType' => 'AWS::ElasticLoadBalancingV2::LoadBalancer::application',
'synchronizationStatus' => 'IN_SYNC',
'updatedAt' => ,
],
],
]
ListDeploymentSnapshots
$result = $client->listDeploymentSnapshots([/* ... */]); $promise = $client->listDeploymentSnapshotsAsync([/* ... */]);
Lists the snapshots of the specified deployment.
Parameter Syntax
$result = $client->listDeploymentSnapshots([
'deploymentIdentifier' => '<string>', // REQUIRED
'maxResults' => <integer>,
'nextToken' => '<string>',
]);
Parameter Details
Members
- deploymentIdentifier
-
- Required: Yes
- Type: string
The identifier of the deployment. This is the deployment's Amazon Resource Name (ARN).
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
Result Syntax
[
'nextToken' => '<string>',
'snapshots' => [
[
'deploymentArn' => '<string>',
'deploymentId' => '<string>',
'deploymentName' => '<string>',
'hasPublishedVersion' => true || false,
'status' => 'DRAFT|ACTIVE|DISABLED',
'updatedAt' => <DateTime>,
'version' => '<string>',
],
// ...
],
]
Result Details
Members
- nextToken
-
- Type: 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
-
- Required: Yes
- Type: Array of DeploymentSummary structures
The snapshots of the deployment.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List the snapshots of a deployment
Lists the immutable snapshots that have been created for a deployment.
$result = $client->listDeploymentSnapshots([
'deploymentIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456',
'maxResults' => 10,
]);
Result syntax:
[
'snapshots' => [
[
'version' => '2',
'deploymentArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456:2',
'deploymentId' => 'def456',
'deploymentName' => 'prod-us-east-1-deployment',
'status' => 'ACTIVE',
'updatedAt' => ,
],
],
]
ListDeployments
$result = $client->listDeployments([/* ... */]); $promise = $client->listDeploymentsAsync([/* ... */]);
Lists the deployments in the account. You can filter the results by status and page through them using maxResults and nextToken.
Parameter Syntax
$result = $client->listDeployments([
'maxResults' => <integer>,
'nextToken' => '<string>',
'status' => 'ACTIVE|DRAFT|DISABLED',
]);
Parameter Details
Members
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
- status
-
- Type: string
Filters the results by status:
ACTIVE,DRAFT, orDISABLED.
Result Syntax
[
'deployments' => [
[
'deploymentArn' => '<string>',
'deploymentId' => '<string>',
'deploymentName' => '<string>',
'hasPublishedVersion' => true || false,
'status' => 'DRAFT|ACTIVE|DISABLED',
'updatedAt' => <DateTime>,
'version' => '<string>',
],
// ...
],
'nextToken' => '<string>',
]
Result Details
Members
- deployments
-
- Required: Yes
- Type: Array of DeploymentSummary structures
The list of deployments.
- nextToken
-
- Type: 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.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List deployments
Lists the published deployments in the account, one page at a time.
$result = $client->listDeployments([
'maxResults' => 10,
'status' => 'ACTIVE',
]);
Result syntax:
[
'deployments' => [
[
'version' => '2',
'deploymentArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456',
'deploymentId' => 'def456',
'deploymentName' => 'prod-us-east-1-deployment',
'hasPublishedVersion' => 1,
'status' => 'ACTIVE',
'updatedAt' => ,
],
],
]
ListPolicies
$result = $client->listPolicies([/* ... */]); $promise = $client->listPoliciesAsync([/* ... */]);
Lists the policies in the account. You can filter the results by status and page through them using maxResults and nextToken.
Parameter Syntax
$result = $client->listPolicies([
'maxResults' => <integer>,
'nextToken' => '<string>',
'status' => 'ACTIVE|DRAFT|DISABLED',
]);
Parameter Details
Members
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
- status
-
- Type: string
Filters the results by status, either
ACTIVEorDRAFT.
Result Syntax
[
'nextToken' => '<string>',
'policies' => [
[
'firewallType' => 'WAF|SHIELD_ADVANCED',
'hasPublishedVersion' => true || false,
'policyArn' => '<string>',
'policyId' => '<string>',
'policyName' => '<string>',
'priority' => <integer>,
'status' => 'DRAFT|ACTIVE|DISABLED',
'updatedAt' => <DateTime>,
'version' => '<string>',
],
// ...
],
]
Result Details
Members
- nextToken
-
- Type: 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
-
- Required: Yes
- Type: Array of PolicySummary structures
The list of policies.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List policies
Lists the published policies in the account, one page at a time.
$result = $client->listPolicies([
'maxResults' => 10,
'status' => 'ACTIVE',
]);
Result syntax:
[
'policies' => [
[
'version' => '2',
'firewallType' => 'WAF',
'hasPublishedVersion' => 1,
'policyArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
'policyId' => 'xyz789',
'policyName' => 'web-app-waf-policy',
'priority' => 2,
'status' => 'ACTIVE',
'updatedAt' => ,
],
],
]
ListPolicySnapshots
$result = $client->listPolicySnapshots([/* ... */]); $promise = $client->listPolicySnapshotsAsync([/* ... */]);
Lists the snapshots of the specified policy.
Parameter Syntax
$result = $client->listPolicySnapshots([
'maxResults' => <integer>,
'nextToken' => '<string>',
'policyIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
- policyIdentifier
-
- Required: Yes
- Type: string
The identifier of the policy. This is the policy's Amazon Resource Name (ARN).
Result Syntax
[
'nextToken' => '<string>',
'snapshots' => [
[
'firewallType' => 'WAF|SHIELD_ADVANCED',
'hasPublishedVersion' => true || false,
'policyArn' => '<string>',
'policyId' => '<string>',
'policyName' => '<string>',
'priority' => <integer>,
'status' => 'DRAFT|ACTIVE|DISABLED',
'updatedAt' => <DateTime>,
'version' => '<string>',
],
// ...
],
]
Result Details
Members
- nextToken
-
- Type: 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
-
- Required: Yes
- Type: Array of PolicySummary structures
The snapshots of the policy.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List the snapshots of a policy
Lists the immutable snapshots that have been created for a policy.
$result = $client->listPolicySnapshots([
'maxResults' => 10,
'policyIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
]);
Result syntax:
[
'snapshots' => [
[
'version' => '2',
'firewallType' => 'WAF',
'policyArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789:2',
'policyId' => 'xyz789',
'policyName' => 'web-app-waf-policy',
'priority' => 2,
'status' => 'ACTIVE',
'updatedAt' => ,
],
],
]
ListResourceAssociations
$result = $client->listResourceAssociations([/* ... */]); $promise = $client->listResourceAssociationsAsync([/* ... */]);
Lists the resources associated with the specified resource.
Parameter Syntax
$result = $client->listResourceAssociations([
'maxResults' => <integer>,
'nextToken' => '<string>',
'resourceIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
- resourceIdentifier
-
- Required: Yes
- Type: string
The identifier of the resource to list associations for. This is the resource's Amazon Resource Name (ARN).
Result Syntax
[
'nextToken' => '<string>',
'resourceAssociations' => [
[
'arn' => '<string>',
'resourceType' => 'Rule|Template|Policy|Deployment|Scope',
],
// ...
],
]
Result Details
Members
- nextToken
-
- Type: 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.
- resourceAssociations
-
- Required: Yes
- Type: Array of ResourceAssociation structures
The list of resource associations.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List what references a rule
Lists the resources that reference the given rule, such as the templates and policies it is associated with.
$result = $client->listResourceAssociations([
'maxResults' => 10,
'resourceIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
]);
Result syntax:
[
'resourceAssociations' => [
[
'arn' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
'resourceType' => 'Template',
],
[
'arn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
'resourceType' => 'Policy',
],
],
]
ListResourceSynchronizationStatuses
$result = $client->listResourceSynchronizationStatuses([/* ... */]); $promise = $client->listResourceSynchronizationStatusesAsync([/* ... */]);
Lists the synchronization statuses of the resources covered by the specified deployment. You can filter the results by synchronization status and page through them.
Parameter Syntax
$result = $client->listResourceSynchronizationStatuses([
'deploymentIdentifier' => '<string>', // REQUIRED
'maxResults' => <integer>,
'nextToken' => '<string>',
'synchronizationStatus' => 'IN_SYNC|OUT_OF_SYNC|NOT_APPLICABLE',
]);
Parameter Details
Members
- deploymentIdentifier
-
- Required: Yes
- Type: string
The identifier of the deployment to list synchronization statuses for. This is the deployment's Amazon Resource Name (ARN).
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
- synchronizationStatus
-
- Type: string
Filters the results by synchronization status, such as
IN_SYNCorOUT_OF_SYNC.
Result Syntax
[
'nextToken' => '<string>',
'resourceSynchronizationStatuses' => [
[
'accountId' => '<string>',
'deploymentArn' => '<string>',
'evaluatedAt' => <DateTime>,
'outOfSyncReasons' => [
'notVisible' => [
'reason' => '<string>',
],
'reasons' => [
'<PolicyFirewallType>' => [
'invalidFirewall' => [
'incorrectAppendableConfigurationOrder' => [
[
'actualValue' => '<string>',
'configurationName' => '<string>',
'expectedValue' => '<string>',
],
// ...
],
'incorrectSingleValueConfigurations' => [
[
'actualValue' => '<string>',
'configurationName' => '<string>',
'expectedValue' => '<string>',
],
// ...
],
'missingAppendableConfigurationValues' => [
[
'actualValue' => '<string>',
'configurationName' => '<string>',
'expectedValue' => '<string>',
],
// ...
],
'missingMergeableConfigurationValues' => [
[
'actualValue' => '<string>',
'configurationName' => '<string>',
'expectedValue' => '<string>',
],
// ...
],
'unexpectedAppendableConfigurationValues' => [
[
'actualValue' => '<string>',
'configurationName' => '<string>',
'expectedValue' => '<string>',
],
// ...
],
'unexpectedMergeableConfigurationValues' => [
[
'actualValue' => '<string>',
'configurationName' => '<string>',
'expectedValue' => '<string>',
],
// ...
],
],
'missingFirewall' => '<string>',
],
// ...
],
],
'remediationIssues' => [
'issues' => [
'<PolicyFirewallType>' => [
'correctiveAction' => '<string>',
'issueType' => '<string>',
'message' => '<string>',
],
// ...
],
'notVisible' => [
'reason' => '<string>',
],
],
'resourceArn' => '<string>',
'resourceType' => 'AWS::ApiGateway::Stage|AWS::CloudFront::Distribution|AWS::EC2::EIP|AWS::ElasticLoadBalancingV2::LoadBalancer::application|AWS::ElasticLoadBalancing::LoadBalancer|AWS::WAFv2::WebACL|AWS::Shield::Protection|AWS::ShieldRegional::Protection',
'synchronizationStatus' => 'IN_SYNC|OUT_OF_SYNC|NOT_APPLICABLE',
'updatedAt' => <DateTime>,
],
// ...
],
]
Result Details
Members
- nextToken
-
- Type: 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.
- resourceSynchronizationStatuses
-
- Required: Yes
- Type: Array of ResourceSynchronizationStatusSummary structures
The list of resource synchronization statuses.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List out-of-sync resources for a deployment
Lists the resources tracked by a deployment that are out of sync, including the structured reason. Here a CloudFront distribution has no web ACL where the policy requires one.
$result = $client->listResourceSynchronizationStatuses([
'deploymentIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456',
'maxResults' => 10,
'synchronizationStatus' => 'OUT_OF_SYNC',
]);
Result syntax:
[
'resourceSynchronizationStatuses' => [
[
'accountId' => '123456789012',
'deploymentArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456',
'evaluatedAt' => ,
'outOfSyncReasons' => [
'reasons' => [
'WAF' => [
'missingFirewall' => 'No web ACL is associated with the resource',
],
],
],
'resourceArn' => 'arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE',
'resourceType' => 'AWS::CloudFront::Distribution',
'synchronizationStatus' => 'OUT_OF_SYNC',
'updatedAt' => ,
],
],
]
ListRuleSnapshots
$result = $client->listRuleSnapshots([/* ... */]); $promise = $client->listRuleSnapshotsAsync([/* ... */]);
Lists the snapshots of the specified rule.
Parameter Syntax
$result = $client->listRuleSnapshots([
'maxResults' => <integer>,
'nextToken' => '<string>',
'ruleIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
- ruleIdentifier
-
- Required: Yes
- Type: string
The identifier of the rule. This is the rule's Amazon Resource Name (ARN).
Result Syntax
[
'nextToken' => '<string>',
'snapshots' => [
[
'firewallType' => 'WAF',
'hasPublishedVersion' => true || false,
'ruleArn' => '<string>',
'ruleId' => '<string>',
'ruleName' => '<string>',
'ruleType' => 'CONFIGURATION|INSPECTION',
'status' => 'DRAFT|ACTIVE|DISABLED',
'updatedAt' => <DateTime>,
'version' => '<string>',
],
// ...
],
]
Result Details
Members
- nextToken
-
- Type: 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
-
- Required: Yes
- Type: Array of RuleSummary structures
The snapshots of the rule.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List the snapshots of a rule
Lists the immutable snapshots that have been created for a rule.
$result = $client->listRuleSnapshots([
'maxResults' => 10,
'ruleIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
]);
Result syntax:
[
'snapshots' => [
[
'version' => '2',
'firewallType' => 'WAF',
'ruleArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123:2',
'ruleId' => 'abc123',
'ruleName' => 'block-known-bad-ips',
'ruleType' => 'INSPECTION',
'status' => 'ACTIVE',
'updatedAt' => ,
],
[
'version' => '3',
'firewallType' => 'WAF',
'ruleArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123:3',
'ruleId' => 'abc123',
'ruleName' => 'block-known-bad-ips',
'ruleType' => 'INSPECTION',
'status' => 'ACTIVE',
'updatedAt' => ,
],
],
]
ListRules
$result = $client->listRules([/* ... */]); $promise = $client->listRulesAsync([/* ... */]);
Lists the rules in the account. You can filter the results by status and page through them using maxResults and nextToken.
Parameter Syntax
$result = $client->listRules([
'maxResults' => <integer>,
'nextToken' => '<string>',
'status' => 'ACTIVE|DRAFT|DISABLED',
]);
Parameter Details
Members
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
- status
-
- Type: string
Filters the results by status, either
ACTIVEorDRAFT.
Result Syntax
[
'nextToken' => '<string>',
'rules' => [
[
'firewallType' => 'WAF',
'hasPublishedVersion' => true || false,
'ruleArn' => '<string>',
'ruleId' => '<string>',
'ruleName' => '<string>',
'ruleType' => 'CONFIGURATION|INSPECTION',
'status' => 'DRAFT|ACTIVE|DISABLED',
'updatedAt' => <DateTime>,
'version' => '<string>',
],
// ...
],
]
Result Details
Members
- nextToken
-
- Type: 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
-
- Required: Yes
- Type: Array of RuleSummary structures
The list of rules.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List rules
Lists the published rules in the account, one page at a time.
$result = $client->listRules([
'maxResults' => 10,
'status' => 'ACTIVE',
]);
Result syntax:
[
'rules' => [
[
'version' => '2',
'firewallType' => 'WAF',
'hasPublishedVersion' => 1,
'ruleArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
'ruleId' => 'abc123',
'ruleName' => 'block-known-bad-ips',
'ruleType' => 'INSPECTION',
'status' => 'ACTIVE',
'updatedAt' => ,
],
],
]
ListScopeSnapshots
$result = $client->listScopeSnapshots([/* ... */]); $promise = $client->listScopeSnapshotsAsync([/* ... */]);
Lists the snapshots of the specified scope.
Parameter Syntax
$result = $client->listScopeSnapshots([
'maxResults' => <integer>,
'nextToken' => '<string>',
'scopeIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
- scopeIdentifier
-
- Required: Yes
- Type: string
The identifier of the scope. This is the scope's Amazon Resource Name (ARN).
Result Syntax
[
'nextToken' => '<string>',
'snapshots' => [
[
'hasPublishedVersion' => true || false,
'scopeArn' => '<string>',
'scopeId' => '<string>',
'scopeName' => '<string>',
'status' => 'DRAFT|ACTIVE|DISABLED',
'updatedAt' => <DateTime>,
'version' => '<string>',
],
// ...
],
]
Result Details
Members
- nextToken
-
- Type: 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
-
- Required: Yes
- Type: Array of ScopeSummary structures
The snapshots of the scope.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List the snapshots of a scope
Lists the immutable snapshots that have been created for a scope.
$result = $client->listScopeSnapshots([
'maxResults' => 10,
'scopeIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
]);
Result syntax:
[
'snapshots' => [
[
'version' => '2',
'scopeArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123:2',
'scopeId' => 'abc123',
'scopeName' => 'production-web-apps',
'status' => 'ACTIVE',
'updatedAt' => ,
],
],
]
ListScopes
$result = $client->listScopes([/* ... */]); $promise = $client->listScopesAsync([/* ... */]);
Lists the scopes in the account. You can filter the results by status and page through them using maxResults and nextToken.
Parameter Syntax
$result = $client->listScopes([
'maxResults' => <integer>,
'nextToken' => '<string>',
'status' => 'ACTIVE|DRAFT|DISABLED',
]);
Parameter Details
Members
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
- status
-
- Type: string
Filters the results by status:
ACTIVE,DRAFT, orDISABLED.
Result Syntax
[
'nextToken' => '<string>',
'scopes' => [
[
'hasPublishedVersion' => true || false,
'scopeArn' => '<string>',
'scopeId' => '<string>',
'scopeName' => '<string>',
'status' => 'DRAFT|ACTIVE|DISABLED',
'updatedAt' => <DateTime>,
'version' => '<string>',
],
// ...
],
]
Result Details
Members
- nextToken
-
- Type: 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
-
- Required: Yes
- Type: Array of ScopeSummary structures
The list of scopes.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List scopes
Lists the published scopes in the account, one page at a time.
$result = $client->listScopes([
'maxResults' => 10,
'status' => 'ACTIVE',
]);
Result syntax:
[
'nextToken' => 'eyJsYXN0RXZhbHVhdGVkS2V5IjoiYWJjMTIzIn0=',
'scopes' => [
[
'version' => '2',
'hasPublishedVersion' => 1,
'scopeArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
'scopeId' => 'abc123',
'scopeName' => 'production-web-apps',
'status' => 'ACTIVE',
'updatedAt' => ,
],
],
]
ListTagsForResource
$result = $client->listTagsForResource([/* ... */]); $promise = $client->listTagsForResourceAsync([/* ... */]);
Lists the tags associated with the specified resource.
Parameter Syntax
$result = $client->listTagsForResource([
'resourceArn' => '<string>', // REQUIRED
]);
Parameter Details
Members
- resourceArn
-
- Required: Yes
- Type: string
The ARN of the resource to list tags for. The ARN must not include a
:DRAFTqualifier.
Result Syntax
[
'tags' => ['<string>', ...],
]
Result Details
Members
- tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
The tags associated with the resource. Each tag is a key-value pair.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List the tags on a resource
Lists the tags associated with a Network Security Manager resource.
$result = $client->listTagsForResource([
'resourceArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
]);
Result syntax:
[
'tags' => [
'Environment' => 'Production',
'Team' => 'NetworkSecurity',
],
]
ListTemplateSnapshots
$result = $client->listTemplateSnapshots([/* ... */]); $promise = $client->listTemplateSnapshotsAsync([/* ... */]);
Lists the snapshots of the specified template.
Parameter Syntax
$result = $client->listTemplateSnapshots([
'maxResults' => <integer>,
'nextToken' => '<string>',
'templateIdentifier' => '<string>', // REQUIRED
]);
Parameter Details
Members
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
- templateIdentifier
-
- Required: Yes
- Type: string
The identifier of the template. This is the template's Amazon Resource Name (ARN).
Result Syntax
[
'nextToken' => '<string>',
'snapshots' => [
[
'firewallType' => 'WAF',
'hasPublishedVersion' => true || false,
'status' => 'DRAFT|ACTIVE|DISABLED',
'templateArn' => '<string>',
'templateId' => '<string>',
'templateName' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
],
// ...
],
]
Result Details
Members
- nextToken
-
- Type: 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
-
- Required: Yes
- Type: Array of TemplateSummary structures
The snapshots of the template.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List the snapshots of a template
Lists the immutable snapshots that have been created for a template.
$result = $client->listTemplateSnapshots([
'maxResults' => 10,
'templateIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
]);
Result syntax:
[
'snapshots' => [
[
'version' => '2',
'firewallType' => 'WAF',
'status' => 'ACTIVE',
'templateArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789:2',
'templateId' => 'xyz789',
'templateName' => 'standard-waf-template',
'updatedAt' => ,
],
],
]
ListTemplates
$result = $client->listTemplates([/* ... */]); $promise = $client->listTemplatesAsync([/* ... */]);
Lists the templates in the account. You can filter the results by status and page through them using maxResults and nextToken.
Parameter Syntax
$result = $client->listTemplates([
'maxResults' => <integer>,
'nextToken' => '<string>',
'status' => 'ACTIVE|DRAFT|DISABLED',
]);
Parameter Details
Members
- maxResults
-
- Type: int
The 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. - nextToken
-
- Type: 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.
- status
-
- Type: string
Filters the results by status, either
ACTIVEorDRAFT.
Result Syntax
[
'nextToken' => '<string>',
'templates' => [
[
'firewallType' => 'WAF',
'hasPublishedVersion' => true || false,
'status' => 'DRAFT|ACTIVE|DISABLED',
'templateArn' => '<string>',
'templateId' => '<string>',
'templateName' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
],
// ...
],
]
Result Details
Members
- nextToken
-
- Type: 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
-
- Required: Yes
- Type: Array of TemplateSummary structures
The list of templates.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: List templates
Lists the published templates in the account, one page at a time.
$result = $client->listTemplates([
'maxResults' => 10,
'status' => 'ACTIVE',
]);
Result syntax:
[
'templates' => [
[
'version' => '2',
'firewallType' => 'WAF',
'hasPublishedVersion' => 1,
'status' => 'ACTIVE',
'templateArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
'templateId' => 'xyz789',
'templateName' => 'standard-waf-template',
'updatedAt' => ,
],
],
]
PutAdminAccount
$result = $client->putAdminAccount([/* ... */]); $promise = $client->putAdminAccountAsync([/* ... */]);
Sets the AWS account that serves as an AWS Network Security Manager administrator account, and optionally configures the scope of resources that the administrator can manage.
You can't set an administrator account again immediately after you remove it, or while the service creates its service-linked role. Retry the request after a few minutes.
Parameter Syntax
$result = $client->putAdminAccount([
'accountId' => '<string>', // REQUIRED
'adminScope' => [
'firewallTypeScope' => [
'allFirewallTypesEnabled' => true || false,
'firewallTypes' => ['<string>', ...],
],
'scopeFilter' => [
'excludeOnly' => [
'accounts' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
'includeAll' => [
],
'includeOnly' => [
'accounts' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
],
],
'priority' => <integer>, // REQUIRED
]);
Parameter Details
Members
- accountId
-
- Required: Yes
- Type: string
The AWS account ID to set as the AWS Network Security Manager administrator account.
- adminScope
-
- Type: AdminScopeInput structure
The scope of accounts, organizational units, and firewall types that the administrator can manage.
- priority
-
- Required: Yes
- Type: int
The priority to assign to the administrator account.
Result Syntax
[
'adminAccountDetails' => [
'adminAccount' => '<string>',
'adminScope' => [
'firewallTypeScope' => [
'allFirewallTypesEnabled' => true || false,
'firewallTypes' => ['<string>', ...],
],
'scopeFilter' => [
'excludeOnly' => [
'accounts' => [
[
'accountId' => '<string>',
'email' => '<string>',
'name' => '<string>',
],
// ...
],
'organizationalUnits' => [
[
'name' => '<string>',
'ouId' => '<string>',
],
// ...
],
],
'includeAll' => [
],
'includeOnly' => [
'accounts' => [
[
'accountId' => '<string>',
'email' => '<string>',
'name' => '<string>',
],
// ...
],
'organizationalUnits' => [
[
'name' => '<string>',
'ouId' => '<string>',
],
// ...
],
],
],
],
'priority' => <integer>,
'status' => 'ONBOARDED|OFFBOARDED',
],
]
Result Details
Members
- adminAccountDetails
-
- Type: AdminAccountDetails structure
The details of the administrator account that was set.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- ServiceUnavailableException:
The service is temporarily unavailable. This is a retryable error.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Designate an administrator account
Designates an account as a Network Security Manager administrator, scoped to a specific organizational unit and the WAF firewall type.
$result = $client->putAdminAccount([
'accountId' => '234567890123',
'adminScope' => [
'firewallTypeScope' => [
'allFirewallTypesEnabled' => ,
'firewallTypes' => [
'WAF',
],
],
'scopeFilter' => [
'includeOnly' => [
'organizationalUnits' => [
'ou-abcd-12345678',
],
],
],
],
'priority' => 2,
]);
Result syntax:
[
'adminAccountDetails' => [
'adminAccount' => '234567890123',
'adminScope' => [
'firewallTypeScope' => [
'allFirewallTypesEnabled' => ,
'firewallTypes' => [
'WAF',
],
],
'scopeFilter' => [
'includeOnly' => [
'organizationalUnits' => [
[
'name' => 'Production',
'ouId' => 'ou-abcd-12345678',
],
],
],
],
],
'priority' => 2,
'status' => 'ONBOARDED',
],
]
TagResource
$result = $client->tagResource([/* ... */]); $promise = $client->tagResourceAsync([/* ... */]);
Adds or overwrites the specified tags on the given resource.
Parameter Syntax
$result = $client->tagResource([
'resourceArn' => '<string>', // REQUIRED
'tags' => ['<string>', ...], // REQUIRED
]);
Parameter Details
Members
- resourceArn
-
- Required: Yes
- Type: string
The ARN of the resource to tag. The ARN must not include a
:DRAFTqualifier. - tags
-
- Required: Yes
- Type: Associative array of custom strings keys (TagKey) to strings
The tags to add to the resource.
Result Syntax
[]
Result Details
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- TagPolicyViolationException:
The request violates a tag policy that is in effect for the account or organization.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Tag a resource
Adds tags to a Network Security Manager resource.
$result = $client->tagResource([
'resourceArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
'tags' => [
'Environment' => 'Production',
'Team' => 'NetworkSecurity',
],
]);
UntagResource
$result = $client->untagResource([/* ... */]); $promise = $client->untagResourceAsync([/* ... */]);
Removes the specified tags from the given resource.
Parameter Syntax
$result = $client->untagResource([
'resourceArn' => '<string>', // REQUIRED
'tagKeys' => ['<string>', ...], // REQUIRED
]);
Parameter Details
Members
- resourceArn
-
- Required: Yes
- Type: string
The ARN of the resource to remove tags from. The ARN must not include a
:DRAFTqualifier. - tagKeys
-
- Required: Yes
- Type: Array of strings
The keys of the tags to remove from the resource.
Result Syntax
[]
Result Details
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- TagPolicyViolationException:
The request violates a tag policy that is in effect for the account or organization.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Remove tags from a resource
Removes the specified tag keys from a Network Security Manager resource.
$result = $client->untagResource([
'resourceArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
'tagKeys' => [
'Environment',
],
]);
UpdateDeployment
$result = $client->updateDeployment([/* ... */]); $promise = $client->updateDeploymentAsync([/* ... */]);
Updates the specified deployment. To prevent conflicting concurrent updates, provide the current updateToken. Use isPublished to publish the update or keep the deployment as a draft.
Parameter Syntax
$result = $client->updateDeployment([
'associatedPolicyList' => [
[
'policyIdentifier' => '<string>', // REQUIRED
],
// ...
],
'associatedScopeList' => [
[
'scopeIdentifier' => '<string>', // REQUIRED
],
// ...
],
'clientToken' => '<string>',
'deploymentConfiguration' => [
'enableCrossAccountVisibility' => true || false, // REQUIRED
],
'deploymentDescription' => '<string>',
'deploymentIdentifier' => '<string>', // REQUIRED
'isPublished' => true || false, // REQUIRED
'updateToken' => '<string>', // REQUIRED
]);
Parameter Details
Members
- associatedPolicyList
-
- Type: Array of PolicyReference structures
The policies associated with the deployment.
- associatedScopeList
-
- Type: Array of ScopeReference structures
The scope associated with the deployment. A deployment has exactly one scope.
- clientToken
-
- Type: string
A 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.
- deploymentConfiguration
-
- Type: DeploymentConfiguration structure
The configuration settings for the deployment.
- deploymentDescription
-
- Type: string
A description of the deployment.
- deploymentIdentifier
-
- Required: Yes
- Type: string
The identifier of the deployment. This is the deployment's Amazon Resource Name (ARN).
- isPublished
-
- Required: Yes
- Type: boolean
Specifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). - updateToken
-
- Required: Yes
- Type: 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.
Result Syntax
[
'associatedPolicyList' => [
[
'policyArn' => '<string>',
],
// ...
],
'associatedScopeList' => [
[
'scopeArn' => '<string>',
],
// ...
],
'deploymentArn' => '<string>',
'deploymentConfiguration' => [
'enableCrossAccountVisibility' => true || false,
],
'deploymentCoverage' => [
[
'firewallType' => 'WAF|SHIELD_ADVANCED',
'inScopeResourceTypes' => ['<string>', ...],
'policyArns' => ['<string>', ...],
],
// ...
],
'deploymentDescription' => '<string>',
'deploymentId' => '<string>',
'deploymentName' => '<string>',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
'warnings' => [
[
'code' => '<string>',
'message' => '<string>',
'policyArn' => '<string>',
],
// ...
],
]
Result Details
Members
- associatedPolicyList
-
- Required: Yes
- Type: Array of AssociatedPolicy structures
The policies associated with the deployment.
- associatedScopeList
-
- Required: Yes
- Type: Array of AssociatedScope structures
The scope associated with the deployment. A deployment has exactly one scope.
- deploymentArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the deployment.
- deploymentConfiguration
-
- Type: DeploymentConfiguration structure
The configuration settings for the deployment.
- deploymentCoverage
-
- Type: Array of DeploymentCoverageEntry structures
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.
- deploymentDescription
-
- Type: string
A description of the deployment.
- deploymentId
-
- Required: Yes
- Type: string
The service-generated id of the deployment.
- deploymentName
-
- Required: Yes
- Type: string
The name of the deployment.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
- warnings
-
- Type: Array of DeploymentWarningEntry structures
Warnings about potential issues, such as a policy that has no applicable resources in the deployment's scope.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Update a deployment and publish it
Updates the deployment's associations and publishes the change. The response includes deploymentCoverage showing which resource types the associated policies can protect. The updateToken from the most recent read is required for optimistic locking.
$result = $client->updateDeployment([
'associatedPolicyList' => [
[
'policyIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
],
],
'associatedScopeList' => [
[
'scopeIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
],
],
'deploymentConfiguration' => [
'enableCrossAccountVisibility' => 1,
],
'deploymentDescription' => 'Production deployment for US East 1 region - updated',
'deploymentIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456',
'isPublished' => 1,
'updateToken' => 'f4a5b6c7-7d8e-4f9a-8b1c-1d2e3f4a5b6c',
]);
Result syntax:
[
'version' => '2',
'associatedPolicyList' => [
[
'policyArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
],
],
'associatedScopeList' => [
[
'scopeArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
],
],
'deploymentArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456',
'deploymentConfiguration' => [
'enableCrossAccountVisibility' => 1,
],
'deploymentCoverage' => [
[
'firewallType' => 'WAF',
'inScopeResourceTypes' => [
'AWS::ElasticLoadBalancingV2::LoadBalancer::application',
'AWS::CloudFront::Distribution',
],
'policyArns' => [
'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
],
],
],
'deploymentDescription' => 'Production deployment for US East 1 region - updated',
'deploymentId' => 'def456',
'deploymentName' => 'prod-us-east-1-deployment',
'hasPublishedVersion' => 1,
'isSnapshot' => ,
'status' => 'ACTIVE',
'updateToken' => 'a5b6c7d8-8e9f-4a0b-9c1d-2e3f4a5b6c7d',
'updatedAt' => ,
]
UpdatePolicy
$result = $client->updatePolicy([/* ... */]); $promise = $client->updatePolicyAsync([/* ... */]);
Updates the specified policy. To prevent conflicting concurrent updates, provide the current updateToken. Use isPublished to publish the update or keep the policy as a draft.
Parameter Syntax
$result = $client->updatePolicy([
'associatedTemplateAndRuleList' => [
[
'ruleIdentifier' => '<string>',
'templateIdentifier' => '<string>',
],
// ...
],
'clientToken' => '<string>',
'isPublished' => true || false, // REQUIRED
'policyConfiguration' => [
'remediationEnabled' => true || false, // REQUIRED
'resourcesCleanUp' => true || false, // REQUIRED
'wafConfig' => [
'conflictResolution' => 'MERGE_WHERE_APPLICABLE', // REQUIRED
'existingCustomerWebACLResolution' => 'RETROFIT|OVERRIDE_ASSOCIATION|NO_REMEDIATION', // REQUIRED
],
],
'policyDescription' => '<string>',
'policyIdentifier' => '<string>', // REQUIRED
'priority' => <integer>,
'updateToken' => '<string>', // REQUIRED
]);
Parameter Details
Members
- associatedTemplateAndRuleList
-
- Type: Array of TemplateOrRuleReference structures
The 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.
- clientToken
-
- Type: string
A 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.
- isPublished
-
- Required: Yes
- Type: boolean
Specifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). - policyConfiguration
-
- Type: PolicyConfiguration structure
The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.
- policyDescription
-
- Type: string
A description of the policy.
- policyIdentifier
-
- Required: Yes
- Type: string
The identifier of the policy. This is the policy's Amazon Resource Name (ARN).
- priority
-
- Type: int
The priority of the resource. A lower number indicates a higher priority.
- updateToken
-
- Required: Yes
- Type: 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.
Result Syntax
[
'associatedTemplateAndRuleList' => [
[
'ruleArn' => '<string>',
'templateArn' => '<string>',
],
// ...
],
'firewallType' => 'WAF|SHIELD_ADVANCED',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'policyArn' => '<string>',
'policyConfiguration' => [
'remediationEnabled' => true || false,
'resourcesCleanUp' => true || false,
'wafConfig' => [
'conflictResolution' => 'MERGE_WHERE_APPLICABLE',
'existingCustomerWebACLResolution' => 'RETROFIT|OVERRIDE_ASSOCIATION|NO_REMEDIATION',
],
],
'policyDescription' => '<string>',
'policyId' => '<string>',
'policyName' => '<string>',
'priority' => <integer>,
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- associatedTemplateAndRuleList
-
- Required: Yes
- Type: Array of AssociatedTemplateOrRule structures
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.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- policyArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the policy.
- policyConfiguration
-
- Type: PolicyConfiguration structure
The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.
- policyDescription
-
- Type: string
A description of the policy.
- policyId
-
- Required: Yes
- Type: string
The service-generated id of the policy.
- policyName
-
- Required: Yes
- Type: string
The name of the policy.
- priority
-
- Required: Yes
- Type: int
The priority of the resource. A lower number indicates a higher priority.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Update a policy and publish it
Updates the policy's description, priority, and configuration and publishes the change. The updateToken from the most recent read is required for optimistic locking.
$result = $client->updatePolicy([
'associatedTemplateAndRuleList' => [
[
'templateIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
],
],
'isPublished' => 1,
'policyConfiguration' => [
'remediationEnabled' => 1,
'resourcesCleanUp' => ,
'wafConfig' => [
'conflictResolution' => 'MERGE_WHERE_APPLICABLE',
'existingCustomerWebACLResolution' => 'NO_REMEDIATION',
],
],
'policyDescription' => 'WAF policy for web application protection - updated',
'policyIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
'priority' => 2,
'updateToken' => 'e3f4a5b6-6c7d-4e8f-9a0b-0c1d2e3f4a5b',
]);
Result syntax:
[
'version' => '2',
'associatedTemplateAndRuleList' => [
[
'templateArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
],
],
'firewallType' => 'WAF',
'hasPublishedVersion' => 1,
'isSnapshot' => ,
'policyArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789',
'policyConfiguration' => [
'remediationEnabled' => 1,
'resourcesCleanUp' => ,
'wafConfig' => [
'conflictResolution' => 'MERGE_WHERE_APPLICABLE',
'existingCustomerWebACLResolution' => 'NO_REMEDIATION',
],
],
'policyDescription' => 'WAF policy for web application protection - updated',
'policyId' => 'xyz789',
'policyName' => 'web-app-waf-policy',
'priority' => 2,
'status' => 'ACTIVE',
'updateToken' => 'f4a5b6c7-7d8e-4f9a-8b1c-1d2e3f4a5b6c',
'updatedAt' => ,
]
UpdateRule
$result = $client->updateRule([/* ... */]); $promise = $client->updateRuleAsync([/* ... */]);
Updates the specified rule. To prevent conflicting concurrent updates, provide the current updateToken. Use isPublished to publish the update or keep the rule as a draft.
Parameter Syntax
$result = $client->updateRule([
'clientToken' => '<string>',
'configuration' => [
],
'isPublished' => true || false, // REQUIRED
'ruleDescription' => '<string>',
'ruleIdentifier' => '<string>', // REQUIRED
'ruleType' => 'CONFIGURATION|INSPECTION',
'updateToken' => '<string>', // REQUIRED
]);
Parameter Details
Members
- clientToken
-
- Type: string
A 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.
- configuration
-
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
The 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. - isPublished
-
- Required: Yes
- Type: boolean
Specifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). - ruleDescription
-
- Type: string
A description of the rule.
- ruleIdentifier
-
- Required: Yes
- Type: string
The identifier of the rule. This is the rule's Amazon Resource Name (ARN).
- ruleType
-
- Type: string
The type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups. - updateToken
-
- Required: Yes
- Type: 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.
Result Syntax
[
'configuration' => [
],
'firewallType' => 'WAF',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'ruleArn' => '<string>',
'ruleDescription' => '<string>',
'ruleId' => '<string>',
'ruleName' => '<string>',
'ruleType' => 'CONFIGURATION|INSPECTION',
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- configuration
-
- Required: Yes
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
The firewall configuration for the rule, as a JSON document. The structure depends on the rule's firewall type and rule type.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- ruleArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the rule.
- ruleDescription
-
- Type: string
A description of the rule.
- ruleId
-
- Required: Yes
- Type: string
The service-generated id of the rule.
- ruleName
-
- Required: Yes
- Type: string
The name of the rule.
- ruleType
-
- Type: string
The type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups. - status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Update a rule and publish it
Updates the rule's description and configuration and publishes the change. The updateToken from the most recent read is required for optimistic locking.
$result = $client->updateRule([
'configuration' => [
],
'isPublished' => 1,
'ruleDescription' => 'Blocks requests from known malicious IP addresses - updated list',
'ruleIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
'ruleType' => 'INSPECTION',
'updateToken' => 'c1d2e3f4-4a5b-4c6d-9e7f-8a9b0c1d2e3f',
]);
Result syntax:
[
'version' => '2',
'configuration' => [
],
'firewallType' => 'WAF',
'hasPublishedVersion' => 1,
'isSnapshot' => ,
'ruleArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
'ruleDescription' => 'Blocks requests from known malicious IP addresses - updated list',
'ruleId' => 'abc123',
'ruleName' => 'block-known-bad-ips',
'ruleType' => 'INSPECTION',
'status' => 'ACTIVE',
'updateToken' => 'd2e3f4a5-5b6c-4d7e-8f9a-9b0c1d2e3f4a',
'updatedAt' => ,
]
UpdateScope
$result = $client->updateScope([/* ... */]); $promise = $client->updateScopeAsync([/* ... */]);
Updates the specified scope. To prevent conflicting concurrent updates, provide the current updateToken. Use isPublished to publish the update or keep the scope as a draft.
Parameter Syntax
$result = $client->updateScope([
'clientToken' => '<string>',
'isPublished' => true || false, // REQUIRED
'scopeConfiguration' => [
'accountFilter' => [
'exclude' => [
'accountIds' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
'include' => [
'accountIds' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
'includeAll' => [
],
],
'resourceScopes' => [ // REQUIRED
'<ScopeResourceType>' => [
'exclude' => [
'explicitArns' => ['<string>', ...],
'expression' => [
'and' => [
[...], // RECURSIVE
// ...
],
'criteria' => [
'albConfig' => [
'ipAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
'scheme' => 'internet-facing|internal',
],
'tags' => ['<string>', ...],
],
'not' => [...], // RECURSIVE
'or' => [
[...], // RECURSIVE
// ...
],
],
],
'include' => [
'explicitArns' => ['<string>', ...],
'expression' => [
'and' => [
[...], // RECURSIVE
// ...
],
'criteria' => [
'albConfig' => [
'ipAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
'scheme' => 'internet-facing|internal',
],
'tags' => ['<string>', ...],
],
'not' => [...], // RECURSIVE
'or' => [
[...], // RECURSIVE
// ...
],
],
],
'includeAll' => true || false,
],
// ...
],
],
'scopeDescription' => '<string>',
'scopeIdentifier' => '<string>', // REQUIRED
'updateToken' => '<string>', // REQUIRED
]);
Parameter Details
Members
- clientToken
-
- Type: string
A 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.
- isPublished
-
- Required: Yes
- Type: boolean
Specifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). - scopeConfiguration
-
- Type: ScopeConfiguration structure
The 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.
- scopeDescription
-
- Type: string
A description of the scope.
- scopeIdentifier
-
- Required: Yes
- Type: string
The identifier of the scope. This is the scope's Amazon Resource Name (ARN).
- updateToken
-
- Required: Yes
- Type: 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.
Result Syntax
[
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'scopeArn' => '<string>',
'scopeConfiguration' => [
'accountFilter' => [
'exclude' => [
'accountIds' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
'include' => [
'accountIds' => ['<string>', ...],
'organizationalUnits' => ['<string>', ...],
],
'includeAll' => [
],
],
'resourceScopes' => [
'<ScopeResourceType>' => [
'exclude' => [
'explicitArns' => ['<string>', ...],
'expression' => [
'and' => [
[...], // RECURSIVE
// ...
],
'criteria' => [
'albConfig' => [
'ipAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
'scheme' => 'internet-facing|internal',
],
'tags' => ['<string>', ...],
],
'not' => [...], // RECURSIVE
'or' => [
[...], // RECURSIVE
// ...
],
],
],
'include' => [
'explicitArns' => ['<string>', ...],
'expression' => [
'and' => [
[...], // RECURSIVE
// ...
],
'criteria' => [
'albConfig' => [
'ipAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
'scheme' => 'internet-facing|internal',
],
'tags' => ['<string>', ...],
],
'not' => [...], // RECURSIVE
'or' => [
[...], // RECURSIVE
// ...
],
],
],
'includeAll' => true || false,
],
// ...
],
],
'scopeDescription' => '<string>',
'scopeId' => '<string>',
'scopeName' => '<string>',
'status' => 'DRAFT|ACTIVE|DISABLED',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- scopeArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the scope.
- scopeConfiguration
-
- Type: ScopeConfiguration structure
The configuration that defines which accounts and resources are in scope.
- scopeDescription
-
- Type: string
A description of the scope.
- scopeId
-
- Required: Yes
- Type: string
The service-generated id of the scope.
- scopeName
-
- Required: Yes
- Type: string
The name of the scope.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Update a scope and publish it
Updates the scope's description and configuration and publishes the change. The updateToken from the most recent read is required for optimistic locking.
$result = $client->updateScope([
'isPublished' => 1,
'scopeConfiguration' => [
'accountFilter' => [
'includeAll' => [
],
],
'resourceScopes' => [
],
],
'scopeDescription' => 'Scope covering all production web application resources in US East 1',
'scopeIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
'updateToken' => 'b0c4d1e2-3f4a-4b5c-8d6e-7f8a9b0c1d2e',
]);
Result syntax:
[
'version' => '2',
'hasPublishedVersion' => 1,
'isSnapshot' => ,
'scopeArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123',
'scopeConfiguration' => [
'accountFilter' => [
'includeAll' => [
],
],
'resourceScopes' => [
],
],
'scopeDescription' => 'Scope covering all production web application resources in US East 1',
'scopeId' => 'abc123',
'scopeName' => 'production-web-apps',
'status' => 'ACTIVE',
'updateToken' => 'c1d2e3f4-4a5b-4c6d-9e7f-8a9b0c1d2e3f',
'updatedAt' => ,
]
UpdateTemplate
$result = $client->updateTemplate([/* ... */]); $promise = $client->updateTemplateAsync([/* ... */]);
Updates the specified template. To prevent conflicting concurrent updates, provide the current updateToken. Use isPublished to publish the update or keep the template as a draft.
Parameter Syntax
$result = $client->updateTemplate([
'associatedRuleList' => [
[
'ruleIdentifier' => '<string>', // REQUIRED
],
// ...
],
'clientToken' => '<string>',
'isPublished' => true || false, // REQUIRED
'templateDescription' => '<string>',
'templateIdentifier' => '<string>', // REQUIRED
'updateToken' => '<string>', // REQUIRED
]);
Parameter Details
Members
- associatedRuleList
-
- Type: Array of RuleReference structures
The rules associated with the template.
- clientToken
-
- Type: string
A 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.
- isPublished
-
- Required: Yes
- Type: boolean
Specifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). - templateDescription
-
- Type: string
A description of the template.
- templateIdentifier
-
- Required: Yes
- Type: string
The identifier of the template. This is the template's Amazon Resource Name (ARN).
- updateToken
-
- Required: Yes
- Type: 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.
Result Syntax
[
'associatedRuleList' => [
[
'ruleArn' => '<string>',
],
// ...
],
'firewallType' => 'WAF',
'hasPublishedVersion' => true || false,
'isSnapshot' => true || false,
'status' => 'DRAFT|ACTIVE|DISABLED',
'templateArn' => '<string>',
'templateDescription' => '<string>',
'templateId' => '<string>',
'templateName' => '<string>',
'updateToken' => '<string>',
'updatedAt' => <DateTime>,
'version' => '<string>',
]
Result Details
Members
- associatedRuleList
-
- Required: Yes
- Type: Array of AssociatedRule structures
The rules associated with the template.
- firewallType
-
- Required: Yes
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- isSnapshot
-
- Type: boolean
Specifies whether the resource is a snapshot of a published version.
- status
-
- Required: Yes
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - templateArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the template.
- templateDescription
-
- Type: string
A description of the template.
- templateId
-
- Required: Yes
- Type: string
The service-generated id of the template.
- templateName
-
- Required: Yes
- Type: string
The name of the template.
- updateToken
-
- Type: 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. - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
- version
-
- Required: Yes
- Type: string
The version of the resource.
Errors
- ValidationException:
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- ServiceQuotaExceededException:
The request would exceed a service quota.
- ConflictException:
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
- InternalServerException:
The request processing failed because of an internal error in the service. This is a retryable error.
- AccessDeniedException:
You do not have sufficient permissions to perform this action.
- ResourceNotFoundException:
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
- ThrottlingException:
The request was denied because of request throttling. Reduce your request rate and try again.
Examples
Example 1: Update a template and publish it
Updates the template's description and rule associations and publishes the change. The updateToken from the most recent read is required for optimistic locking.
$result = $client->updateTemplate([
'associatedRuleList' => [
[
'ruleIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
],
],
'isPublished' => 1,
'templateDescription' => 'Standard WAF template with baseline rule groups - updated',
'templateIdentifier' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
'updateToken' => 'd2e3f4a5-5b6c-4d7e-8f9a-9b0c1d2e3f4a',
]);
Result syntax:
[
'version' => '2',
'associatedRuleList' => [
[
'ruleArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123',
],
],
'firewallType' => 'WAF',
'hasPublishedVersion' => 1,
'isSnapshot' => ,
'status' => 'ACTIVE',
'templateArn' => 'arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789',
'templateDescription' => 'Standard WAF template with baseline rule groups - updated',
'templateId' => 'xyz789',
'templateName' => 'standard-waf-template',
'updateToken' => 'e3f4a5b6-6c7d-4e8f-9a0b-0c1d2e3f4a5b',
'updatedAt' => ,
]
Shapes
AccessDeniedException
Description
You do not have sufficient permissions to perform this action.
Members
- message
-
- Required: Yes
- Type: string
AccountFilter
Description
Determines which accounts are in scope. Exactly one of includeAll, include, or exclude is set.
Members
- exclude
-
- Type: AccountSet structure
Excludes the specified accounts and organizational units. All others are in scope.
- include
-
- Type: AccountSet structure
Includes only the specified accounts and organizational units.
- includeAll
-
- Type: Unit structure
Includes all accounts. No account filtering is applied.
AccountReference
Description
A reference to an AWS account, with optional display metadata.
Members
- accountId
-
- Required: Yes
- Type: string
The AWS account ID.
-
- Type: string
The email address associated with the account.
- name
-
- Type: string
The display name of the account.
AccountSet
Description
A set of AWS accounts and organizational units.
Members
- accountIds
-
- Type: Array of strings
The list of AWS account IDs.
- organizationalUnits
-
- Type: Array of strings
The AWS Organizations organizational units (OUs) in the selection.
AdminAccountDetails
Description
The details of an AWS Network Security Manager administrator account.
Members
- adminAccount
-
- Required: Yes
- Type: string
The AWS account ID of the administrator account.
- adminScope
-
- Type: AdminScope structure
The administrative scope, which defines the accounts, organizational units, and firewall types that the administrator can manage.
- priority
-
- Required: Yes
- Type: int
The priority assigned to the administrator account.
- status
-
- Type: string
The status of the administrator account, either
ONBOARDEDorOFFBOARDED.
AdminAccountSummary
Description
Summary information about an AWS Network Security Manager administrator account.
Members
- accountId
-
- Required: Yes
- Type: string
The AWS account ID.
-
- Type: string
The email address associated with the account.
- name
-
- Type: string
The name of the administrator account.
- priority
-
- Type: int
The priority assigned to the administrator account.
AdminFirewallTypeScope
Description
Defines the firewall types that an administrator can create and manage.
Members
- allFirewallTypesEnabled
-
- Type: boolean
Specifies whether the administrator can manage all firewall types, except for third-party firewall types.
- firewallTypes
-
- Type: Array of strings
The list of firewall types that the administrator can manage.
AdminScope
Description
Defines the accounts, organizational units, and firewall types that an administrator can manage.
Members
- firewallTypeScope
-
- Type: AdminFirewallTypeScope structure
The firewall types that the administrator can create and manage.
- scopeFilter
-
- Type: AdminScopeFilter structure
The filter that determines which accounts and organizational units are in the administrator's scope.
AdminScopeFilter
Description
Determines which accounts and organizational units are in an administrator's scope. This is the reference form, which includes display metadata.
Members
- excludeOnly
-
- Type: AdminScopeSelection structure
The accounts and organizational units to exclude from the administrator's scope. All others are in scope.
- includeAll
-
- Type: Unit structure
All accounts and organizational units are in scope.
- includeOnly
-
- Type: AdminScopeSelection structure
Only the specified accounts and organizational units are in the administrator's scope.
AdminScopeFilterInput
Description
Determines which accounts and organizational units are in an administrator's scope. This is the input form, which uses account and organizational unit IDs.
Members
- excludeOnly
-
- Type: AdminScopeSelectionInput structure
The accounts and organizational units to exclude from the administrator's scope. All others are in scope.
- includeAll
-
- Type: Unit structure
All accounts and organizational units are in scope.
- includeOnly
-
- Type: AdminScopeSelectionInput structure
Only the specified accounts and organizational units are in the administrator's scope.
AdminScopeInput
Description
The administrative scope configuration provided on input, using account and organizational unit IDs.
Members
- firewallTypeScope
-
- Type: AdminFirewallTypeScope structure
The firewall types that the administrator can create and manage.
- scopeFilter
-
- Type: AdminScopeFilterInput structure
The filter that determines which accounts and organizational units are in the administrator's scope.
AdminScopeSelection
Description
A selection of accounts and organizational units. This is the reference form, which includes display metadata.
Members
- accounts
-
- Type: Array of AccountReference structures
The AWS accounts in the selection.
- organizationalUnits
-
- Type: Array of OrganizationalUnitReference structures
The AWS Organizations organizational units (OUs) in the selection.
AdminScopeSelectionInput
Description
A selection of accounts and organizational units. This is the input form, which uses account and organizational unit IDs.
Members
- accounts
-
- Type: Array of strings
The AWS accounts in the selection.
- organizationalUnits
-
- Type: Array of strings
The AWS Organizations organizational units (OUs) in the selection.
AlbConfiguration
Description
Filter criteria specific to Application Load Balancers.
Members
- ipAddressType
-
- Type: string
The IP address type of the Application Load Balancer.
- scheme
-
- Type: string
The scheme of the Application Load Balancer, either
internet-facingorinternal.
AssociatedPolicy
Description
An association between a deployment and a policy, as returned in outputs. The corresponding request structure is PolicyReference.
Members
- policyArn
-
- Required: Yes
- Type: string
The ARN of the associated policy, including its version qualifier when a specific published version is pinned (for example,
...:policy:abc123:3).
AssociatedRule
Description
An association between a template and a rule, as returned in outputs. The corresponding request structure is RuleReference.
Members
- ruleArn
-
- Required: Yes
- Type: string
The ARN of the associated rule.
AssociatedScope
Description
An association between a deployment and a scope, as returned in outputs. The corresponding request structure is ScopeReference.
Members
- scopeArn
-
- Required: Yes
- Type: string
The ARN of the associated scope.
AssociatedTemplateOrRule
Description
An association between a policy and either a template or a rule, as returned in outputs. Exactly one of templateArn or ruleArn is set. The corresponding request structure is TemplateOrRuleReference.
Members
- ruleArn
-
- Type: string
The ARN of the associated rule.
- templateArn
-
- Type: string
The ARN of the associated template.
ConfigurationIssue
Description
Describes a single configuration value that does not match the intended configuration.
Members
- actualValue
-
- Type: string
The configuration value that was found on the resource.
- configurationName
-
- Type: string
The name of the configuration setting that is in conflict.
- expectedValue
-
- Type: string
The configuration value that AWS Network Security Manager expected.
ConflictException
Description
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
Members
- message
-
- Required: Yes
- Type: string
- resourceId
-
- Type: string
The ID of the resource that is in conflict with the request.
- resourceType
-
- Type: string
The type of the resource that is in conflict with the request.
DeploymentConfiguration
Description
Configuration settings that control a deployment's behavior.
Members
- enableCrossAccountVisibility
-
- Required: Yes
- Type: boolean
Specifies whether aggregate synchronization status details for the resources covered by this deployment are visible across accounts. Default:
false.
DeploymentCoverageEntry
Description
Coverage information for one firewall type within a deployment. It lists the deployment's policies that have this firewall type. It also lists the resource types in the deployment's scope that the firewall type protects.
Members
- firewallType
-
- Required: Yes
- Type: string
The firewall type that the policies in this entry share.
- inScopeResourceTypes
-
- Required: Yes
- Type: Array of strings
The resource types in the deployment's scope that this firewall type protects. This list is empty if the scope does not select any resource types that the firewall type protects.
- policyArns
-
- Required: Yes
- Type: Array of strings
The Amazon Resource Names (ARNs) of the deployment's policies that have this firewall type.
DeploymentSummary
Description
Summary information about a deployment.
Members
- deploymentArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the deployment.
- deploymentId
-
- Required: Yes
- Type: string
The service-generated id of the deployment.
- deploymentName
-
- Type: string
The name of the deployment.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- status
-
- Type: string
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). - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated. For a snapshot, this is the time when the snapshot was created.
- version
-
- Type: string
The version of the resource.
DeploymentWarningEntry
Description
A warning about a potential issue with a deployment.
Members
- code
-
- Required: Yes
- Type: string
A code that identifies the type of warning.
- message
-
- Required: Yes
- Type: string
A human-readable description of the warning.
- policyArn
-
- Required: Yes
- Type: string
The ARN of the policy that the warning relates to.
FirewallSyncReason
Description
Describes why a firewall is out of sync. Exactly one of missingFirewall or invalidFirewall is set.
Members
- invalidFirewall
-
- Type: InvalidFirewallReasons structure
Details about a firewall whose configuration does not match the intended configuration.
- missingFirewall
-
- Type: string
Indicates that an expected firewall is missing. The value describes the missing firewall.
InternalServerException
Description
The request processing failed because of an internal error in the service. This is a retryable error.
Members
- message
-
- Required: Yes
- Type: string
InvalidFirewallReasons
Description
Details about the ways in which a firewall's configuration differs from the intended configuration.
Members
- incorrectAppendableConfigurationOrder
-
- Type: Array of ConfigurationIssue structures
Appendable configuration values that are present but in the wrong order.
- incorrectSingleValueConfigurations
-
- Type: Array of ConfigurationIssue structures
Single-value configuration settings whose values do not match the expected values.
- missingAppendableConfigurationValues
-
- Type: Array of ConfigurationIssue structures
Appendable configuration values that are expected but missing.
- missingMergeableConfigurationValues
-
- Type: Array of ConfigurationIssue structures
Mergeable configuration values that are expected but missing.
- unexpectedAppendableConfigurationValues
-
- Type: Array of ConfigurationIssue structures
Appendable configuration values that are present but not expected.
- unexpectedMergeableConfigurationValues
-
- Type: Array of ConfigurationIssue structures
Mergeable configuration values that are present but not expected.
JsonDocument
Members
NotVisibleMarker
Description
Indicates that details are not visible because of cross-account restrictions.
Members
- reason
-
- Required: Yes
- Type: string
The reason the details are not visible.
OrganizationalUnitReference
Description
A reference to an AWS Organizations organizational unit (OU), with optional display metadata.
Members
- name
-
- Type: string
The display name of the organizational unit.
- ouId
-
- Required: Yes
- Type: string
The ID of the AWS Organizations organizational unit (OU).
OutOfSyncReasonsView
Description
The out-of-sync reasons for a resource, or a marker indicating that the details are not visible. Exactly one member is set.
Members
- notVisible
-
- Type: NotVisibleMarker structure
Indicates that the details are not visible because of cross-account restrictions.
- reasons
-
- Type: Associative array of custom strings keys (PolicyFirewallType) to FirewallSyncReason structures
The out-of-sync reasons, keyed by firewall type.
PolicyConfiguration
Description
Configuration settings that control a policy's behavior.
Members
- remediationEnabled
-
- Required: Yes
- Type: boolean
Specifies whether AWS Network Security Manager automatically remediates noncompliant resources. Default:
false. - resourcesCleanUp
-
- Required: Yes
- Type: boolean
Specifies whether AWS Network Security Manager automatically removes the resources it created when they are no longer needed. Default:
false. - wafConfig
-
- Type: WafConfig structure
AWS WAF-specific policy settings. This is populated only for AWS WAF policies.
PolicyReference
Description
A reference to a policy in a create or update request.
Members
- policyIdentifier
-
- Required: Yes
- Type: string
The identifier of the policy. This is the policy's Amazon Resource Name (ARN), optionally version-qualified to pin a specific published version.
PolicySummary
Description
Summary information about a policy.
Members
- firewallType
-
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- policyArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the policy.
- policyId
-
- Required: Yes
- Type: string
The service-generated id of the policy.
- policyName
-
- Type: string
The name of the policy.
- priority
-
- Type: int
The priority of the resource. A lower number indicates a higher priority.
- status
-
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated. For a snapshot, this is the time when the snapshot was created.
- version
-
- Type: string
The version of the resource.
RemediationIssueDetails
Description
Details about a remediation issue for a firewall type.
Members
- correctiveAction
-
- Type: string
A recommended action for resolving the remediation issue.
- issueType
-
- Type: string
The type of remediation issue.
- message
-
- Type: string
A human-readable description of the remediation issue.
RemediationIssuesView
Description
Remediation issue details for a resource, or a marker indicating that the details are not visible. Exactly one member is set.
Members
- issues
-
- Type: Associative array of custom strings keys (PolicyFirewallType) to RemediationIssueDetails structures
The remediation issues, keyed by firewall type.
- notVisible
-
- Type: NotVisibleMarker structure
Indicates that the details are not visible because of cross-account restrictions.
ResourceAssociation
Description
Describes an association between a resource and another entity.
Members
- arn
-
- Required: Yes
- Type: string
The ARN of the associated resource.
- resourceType
-
- Required: Yes
- Type: string
The type of the associated resource, such as
Policy,Template, orDeployment.
ResourceCriteria
Description
A leaf condition that matches resources by tag or by resource-type-specific configuration.
Members
- albConfig
-
- Type: AlbConfiguration structure
Filter criteria specific to Application Load Balancers.
- tags
-
- Type: Associative array of custom strings keys (String) to strings
Tag key-value pairs used to match resources.
ResourceLogicalExpression
Description
A logical expression that selects resources. Exactly one of criteria, and, or, or not is set.
Members
- and
-
- Type: Array of ResourceLogicalExpression structures
A list of subexpressions that must all match.
- criteria
-
- Type: ResourceCriteria structure
A leaf condition that matches resources by tag or by resource-type-specific configuration.
- not
-
- Type: ResourceLogicalExpression structure
A subexpression that must not match.
- or
-
- Type: Array of ResourceLogicalExpression structures
A list of subexpressions of which at least one must match.
ResourceNotFoundException
Description
The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
Members
- message
-
- Required: Yes
- Type: string
- resourceId
-
- Type: string
The ID of the resource that could not be found.
- resourceType
-
- Type: string
The type of the resource that could not be found.
ResourceScope
Description
Defines which resources of a given type are in scope. Exactly one of includeAll, include, or exclude is set.
Members
- exclude
-
- Type: ResourceSet structure
Excludes the resources that match the specified criteria or explicit ARNs.
- include
-
- Type: ResourceSet structure
Includes the resources that match the specified criteria or explicit ARNs.
- includeAll
-
- Type: boolean
Includes all resources of the resource type.
ResourceSet
Description
A set of resources defined by explicit ARNs, a logical expression, or both.
Members
- explicitArns
-
- Type: Array of strings
An explicit list of resource ARNs.
- expression
-
- Type: ResourceLogicalExpression structure
A logical expression that selects resources by combining criteria with AND, OR, and NOT operators.
ResourceSynchronizationStatusSummary
Description
The synchronization status of a resource covered by a deployment.
Members
- accountId
-
- Required: Yes
- Type: string
The AWS account ID that owns the resource.
- deploymentArn
-
- Type: string
The ARN of the deployment that the synchronization status is associated with. This is absent for aggregate (cross-deployment) statuses.
- evaluatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the synchronization status was last evaluated.
- outOfSyncReasons
-
- Type: OutOfSyncReasonsView structure
The reasons the resource is out of sync, keyed by firewall type. This is null when the resource is in sync.
- remediationIssues
-
- Type: RemediationIssuesView structure
Details about remediation issues, keyed by firewall type. This is null when there are no remediation issues.
- resourceArn
-
- Required: Yes
- Type: string
The ARN of the resource whose synchronization status is reported.
- resourceType
-
- Type: string
The type of the resource, in AWS CloudFormation format.
- synchronizationStatus
-
- Required: Yes
- Type: string
The synchronization status of the resource, such as
IN_SYNCorOUT_OF_SYNC. - updatedAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated.
RuleReference
Description
A reference to a rule in a create or update request.
Members
- ruleIdentifier
-
- Required: Yes
- Type: string
The identifier of the rule. This is the rule's Amazon Resource Name (ARN).
RuleSummary
Description
Summary information about a rule.
Members
- firewallType
-
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- ruleArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the rule.
- ruleId
-
- Required: Yes
- Type: string
The service-generated id of the rule.
- ruleName
-
- Required: Yes
- Type: string
The name of the rule.
- ruleType
-
- Type: string
The type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups. - status
-
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated. For a snapshot, this is the time when the snapshot was created.
- version
-
- Type: string
The version of the resource.
ScopeConfiguration
Description
Defines which accounts and resources are in scope.
Members
- accountFilter
-
- Type: AccountFilter structure
The account filter that determines which accounts are in scope. When set, exactly one of
includeAll,include, orexcludeis set.Organization administrators must include an account filter in every scope configuration. Single-account administrators must omit it: a scope without an account filter applies only to the administrator's own account. The presence of an account filter is fixed when the scope is created: an update can't add an account filter to a scope that was created without one, or remove the account filter from a scope that was created with one.
- resourceScopes
-
- Required: Yes
- Type: Associative array of custom strings keys (ScopeResourceType) to ResourceScope structures
The resource-level scoping configuration, keyed by resource type, that defines which resources within the selected accounts are in scope.
ScopeReference
Description
A reference to a scope in a create or update request.
Members
- scopeIdentifier
-
- Required: Yes
- Type: string
The identifier of the scope. This is the scope's Amazon Resource Name (ARN).
ScopeSummary
Description
Summary information about a scope.
Members
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- scopeArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the scope.
- scopeId
-
- Required: Yes
- Type: string
The service-generated id of the scope.
- scopeName
-
- Type: string
The name of the scope.
- status
-
- Type: string
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). - updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated. For a snapshot, this is the time when the snapshot was created.
- version
-
- Type: string
The version of the resource.
ServiceQuotaExceededException
Description
The request would exceed a service quota.
Members
- message
-
- Required: Yes
- Type: string
- quotaCode
-
- Type: string
The code that identifies the service quota that was exceeded.
- resourceId
-
- Type: string
The ID of the resource associated with the quota that was exceeded.
- resourceType
-
- Type: string
The type of the resource associated with the quota that was exceeded.
- serviceCode
-
- Type: string
The code for the AWS service that owns the quota that was exceeded.
ServiceUnavailableException
Description
The service is temporarily unavailable. This is a retryable error.
Members
- message
-
- Required: Yes
- Type: string
- retryAfterSeconds
-
- Type: int
The number of seconds to wait before retrying the request.
TagPolicyViolationException
Description
The request violates a tag policy that is in effect for the account or organization.
Members
- message
-
- Required: Yes
- Type: string
TemplateOrRuleReference
Description
A reference to either a template or a rule in a create or update request. Set exactly one of templateIdentifier or ruleIdentifier.
Members
- ruleIdentifier
-
- Type: string
The identifier of the rule. This is the rule's Amazon Resource Name (ARN).
- templateIdentifier
-
- Type: string
The identifier of the template. This is the template's Amazon Resource Name (ARN).
TemplateSummary
Description
Summary information about a template.
Members
- firewallType
-
- Type: string
The firewall type associated with the resource.
- hasPublishedVersion
-
- Type: boolean
Specifies whether a published version of the resource exists.
- status
-
- Type: string
The current status of the resource:
DRAFT(unpublished, editable) orACTIVE(published, in use). - templateArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the template.
- templateId
-
- Required: Yes
- Type: string
The service-generated id of the template.
- templateName
-
- Required: Yes
- Type: string
The name of the template.
- updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the resource was last updated. For a snapshot, this is the time when the snapshot was created.
- version
-
- Type: string
The version of the resource.
ThrottlingException
Description
The request was denied because of request throttling. Reduce your request rate and try again.
Members
- message
-
- Required: Yes
- Type: string
- retryAfterSeconds
-
- Type: int
The number of seconds to wait before retrying the request.
Unit
Members
ValidationException
Description
The request failed validation. For details, see the reason and fieldList members of the response.
Members
- fieldList
-
- Type: Array of ValidationExceptionField structures
The list of request fields that failed validation, if any.
- message
-
- Required: Yes
- Type: string
- reason
-
- Type: string
The reason that the request failed validation.
ValidationExceptionField
Description
Describes a single request field that failed validation.
Members
- message
-
- Required: Yes
- Type: string
A message describing the validation error for the field.
- name
-
- Required: Yes
- Type: string
The name of the field that failed validation.
WafConfig
Description
AWS WAF-specific policy configuration settings.
Members
- conflictResolution
-
- Required: Yes
- Type: string
The conflict-resolution strategy for AWS WAF policies. Required for AWS WAF policies.
- existingCustomerWebACLResolution
-
- Required: Yes
- Type: string
Determines how AWS Network Security Manager handles remediation when a resource already has a customer-created web ACL. Required for AWS WAF policies.