NetworkSecurityManagerCustomerAPI / Client / create_rule_snapshot

create_rule_snapshot

NetworkSecurityManagerCustomerAPI.Client.create_rule_snapshot(**kwargs)

Creates a snapshot of the current published version of the specified rule. A snapshot is an immutable, versioned copy that other resources can reference.

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

    The identifier of the rule. This is the rule’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

{
    'ruleId': 'string',
    'ruleArn': 'string',
    'ruleName': 'string',
    'firewallType': 'WAF',
    'ruleType': 'CONFIGURATION'|'INSPECTION',
    'ruleDescription': 'string',
    'configuration': {...}|[...]|123|123.4|'string'|True|None,
    'status': 'DRAFT'|'ACTIVE'|'DISABLED',
    'version': 'string',
    'updateToken': 'string',
    'isSnapshot': True|False,
    'hasPublishedVersion': True|False,
    'updatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    • ruleId (string) –

      The service-generated id of the rule.

    • ruleArn (string) –

      The Amazon Resource Name (ARN) of the rule.

    • ruleName (string) –

      The name of the rule.

    • firewallType (string) –

      The firewall type associated with the resource.

    • ruleType (string) –

      The type of the rule. CONFIGURATION rules contain firewall settings, and INSPECTION rules contain rule groups.

    • ruleDescription (string) –

      A description of the rule.

    • configuration (document) –

      The firewall configuration for the rule, as a JSON document. The structure depends on the rule’s firewall type and rule type.

    • status (string) –

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

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

    • updatedAt (datetime) –

      The time when the snapshot was created.

Exceptions