NetworkSecurityManagerCustomerAPI / Client / create_deployment

create_deployment

NetworkSecurityManagerCustomerAPI.Client.create_deployment(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_deployment(
    clientToken='string',
    deploymentName='string',
    deploymentDescription='string',
    deploymentConfiguration={
        'enableCrossAccountVisibility': True|False
    },
    associatedPolicyList=[
        {
            'policyIdentifier': 'string'
        },
    ],
    associatedScopeList=[
        {
            'scopeIdentifier': 'string'
        },
    ],
    isPublished=True|False,
    tags={
        'string': 'string'
    }
)
Parameters:
  • 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.

  • deploymentName (string) –

    [REQUIRED]

    The name of the deployment.

  • deploymentDescription (string) – A description of the deployment.

  • deploymentConfiguration (dict) –

    [REQUIRED]

    The configuration settings for the deployment.

    • enableCrossAccountVisibility (boolean) – [REQUIRED]

      Specifies whether aggregate synchronization status details for the resources covered by this deployment are visible across accounts. Default: false.

  • associatedPolicyList (list) –

    [REQUIRED]

    The policies associated with the deployment.

    • (dict) –

      A reference to a policy in a create or update request.

      • policyIdentifier (string) – [REQUIRED]

        The identifier of the policy. This is the policy’s Amazon Resource Name (ARN), optionally version-qualified to pin a specific published version.

  • associatedScopeList (list) –

    [REQUIRED]

    The scope associated with the deployment. A deployment has exactly one scope.

    • (dict) –

      A reference to a scope in a create or update request.

      • scopeIdentifier (string) – [REQUIRED]

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

  • isPublished (boolean) – Specifies whether to publish the resource. When true, the resource is saved in published ( ACTIVE) state. When false, it is saved as a draft ( DRAFT). Default: true.

  • tags (dict) –

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

    • (string) –

      • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'deploymentId': 'string',
    'deploymentArn': 'string',
    'deploymentName': 'string',
    'deploymentDescription': 'string',
    'status': 'DRAFT'|'ACTIVE'|'DISABLED',
    'deploymentConfiguration': {
        'enableCrossAccountVisibility': True|False
    },
    'associatedPolicyList': [
        {
            'policyArn': 'string'
        },
    ],
    'associatedScopeList': [
        {
            'scopeArn': 'string'
        },
    ],
    'version': 'string',
    'updateToken': 'string',
    'isSnapshot': True|False,
    'hasPublishedVersion': True|False,
    'deploymentCoverage': [
        {
            'firewallType': 'WAF'|'SHIELD_ADVANCED',
            'policyArns': [
                'string',
            ],
            'inScopeResourceTypes': [
                'AWS::ApiGateway::Stage'|'AWS::CloudFront::Distribution'|'AWS::EC2::EIP'|'AWS::ElasticLoadBalancingV2::LoadBalancer::application'|'AWS::ElasticLoadBalancing::LoadBalancer',
            ]
        },
    ],
    'warnings': [
        {
            'code': 'string',
            'policyArn': 'string',
            'message': 'string'
        },
    ],
    'updatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    • deploymentId (string) –

      The service-generated id of the deployment.

    • deploymentArn (string) –

      The Amazon Resource Name (ARN) of the deployment.

    • deploymentName (string) –

      The name of the deployment.

    • deploymentDescription (string) –

      A description of the deployment.

    • status (string) –

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

    • deploymentConfiguration (dict) –

      The configuration settings for the deployment.

      • enableCrossAccountVisibility (boolean) –

        Specifies whether aggregate synchronization status details for the resources covered by this deployment are visible across accounts. Default: false.

    • associatedPolicyList (list) –

      The policies associated with the deployment.

      • (dict) –

        An association between a deployment and a policy, as returned in outputs. The corresponding request structure is PolicyReference.

        • policyArn (string) –

          The ARN of the associated policy, including its version qualifier when a specific published version is pinned (for example, ...:policy:abc123:3).

    • associatedScopeList (list) –

      The scope associated with the deployment. A deployment has exactly one scope.

      • (dict) –

        An association between a deployment and a scope, as returned in outputs. The corresponding request structure is ScopeReference.

        • scopeArn (string) –

          The ARN of the associated scope.

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

    • deploymentCoverage (list) –

      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.

      • (dict) –

        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.

        • firewallType (string) –

          The firewall type that the policies in this entry share.

        • policyArns (list) –

          The Amazon Resource Names (ARNs) of the deployment’s policies that have this firewall type.

          • (string) –

        • inScopeResourceTypes (list) –

          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.

          • (string) –

    • warnings (list) –

      Warnings about potential issues, such as a policy that has no applicable resources in the deployment’s scope.

      • (dict) –

        A warning about a potential issue with a deployment.

        • code (string) –

          A code that identifies the type of warning.

        • policyArn (string) –

          The ARN of the policy that the warning relates to.

        • message (string) –

          A human-readable description of the warning.

    • updatedAt (datetime) –

      The time when the resource was last updated.

Exceptions

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.ValidationException

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.ServiceQuotaExceededException

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.ConflictException

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.ServiceUnavailableException

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.TagPolicyViolationException

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.InternalServerException

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.AccessDeniedException

  • NetworkSecurityManagerCustomerAPI.Client.exceptions.ThrottlingException