NetworkSecurityManagerCustomerAPI / Client / create_policy_snapshot

create_policy_snapshot

NetworkSecurityManagerCustomerAPI.Client.create_policy_snapshot(**kwargs)

Creates a snapshot of the current published version of the specified policy.

See also: AWS API Documentation

Request Syntax

response = client.create_policy_snapshot(
    policyIdentifier='string',
    clientToken='string',
    tags={
        'string': 'string'
    }
)
Parameters:
  • policyIdentifier (string) –

    [REQUIRED]

    The identifier of the policy. This is the policy’s Amazon Resource Name (ARN).

  • clientToken (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.

    This field is autopopulated if not provided.

  • tags (dict) –

    The tags to add to the snapshot when it is created.

    • (string) –

      • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'policyId': 'string',
    'policyArn': 'string',
    'policyName': 'string',
    'policyDescription': 'string',
    'status': 'DRAFT'|'ACTIVE'|'DISABLED',
    'priority': 123,
    'associatedTemplateAndRuleList': [
        {
            'templateArn': 'string',
            'ruleArn': 'string'
        },
    ],
    'version': 'string',
    'updateToken': 'string',
    'isSnapshot': True|False,
    'hasPublishedVersion': True|False,
    'firewallType': 'WAF'|'SHIELD_ADVANCED',
    'policyConfiguration': {
        'remediationEnabled': True|False,
        'resourcesCleanUp': True|False,
        'wafConfig': {
            'existingCustomerWebACLResolution': 'RETROFIT'|'OVERRIDE_ASSOCIATION'|'NO_REMEDIATION',
            'conflictResolution': 'MERGE_WHERE_APPLICABLE'
        }
    },
    'updatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    • policyId (string) –

      The service-generated id of the policy.

    • policyArn (string) –

      The Amazon Resource Name (ARN) of the policy.

    • policyName (string) –

      The name of the policy.

    • policyDescription (string) –

      A description of the policy.

    • status (string) –

      The current status of the resource: DRAFT (unpublished, editable) or ACTIVE (published, in use).

    • priority (integer) –

      The priority of the resource. A lower number indicates a higher priority.

    • associatedTemplateAndRuleList (list) –

      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.

      • (dict) –

        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.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: templateArn, ruleArn. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • templateArn (string) –

          The ARN of the associated template.

        • ruleArn (string) –

          The ARN of the associated rule.

    • version (string) –

      The version of the resource.

    • updateToken (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.

    • isSnapshot (boolean) –

      Specifies whether the resource is a snapshot of a published version.

    • hasPublishedVersion (boolean) –

      Specifies whether a published version of the resource exists.

    • firewallType (string) –

      The firewall type associated with the resource.

    • policyConfiguration (dict) –

      The configuration settings that control the policy’s behavior, including remediation and firewall-type-specific settings.

      • remediationEnabled (boolean) –

        Specifies whether AWS Network Security Manager automatically remediates noncompliant resources. Default: false.

      • resourcesCleanUp (boolean) –

        Specifies whether AWS Network Security Manager automatically removes the resources it created when they are no longer needed. Default: false.

      • wafConfig (dict) –

        AWS WAF-specific policy settings. This is populated only for AWS WAF policies.

        • existingCustomerWebACLResolution (string) –

          Determines how AWS Network Security Manager handles remediation when a resource already has a customer-created web ACL. Required for AWS WAF policies.

        • conflictResolution (string) –

          The conflict-resolution strategy for AWS WAF policies. Required for AWS WAF policies.

    • updatedAt (datetime) –

      The time when the snapshot was created.

Exceptions

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.ValidationException

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.ServiceQuotaExceededException

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.ConflictException

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.InternalServerException

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.AccessDeniedException

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.ResourceNotFoundException

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.ThrottlingException