AWS Service Catalog

2020/03/20 - AWS Service Catalog - 4 updated api methods

Changes  Added "productId" and "portfolioId" to responses from CreateConstraint, UpdateConstraint, ListConstraintsForPortfolio, and DescribeConstraint APIs

CreateConstraint (updated) Link ¶
Changes (response)
{'ConstraintDetail': {'PortfolioId': 'string', 'ProductId': 'string'}}

Creates a constraint.

See also: AWS API Documentation

Request Syntax

client.create_constraint(
    AcceptLanguage='string',
    PortfolioId='string',
    ProductId='string',
    Parameters='string',
    Type='string',
    Description='string',
    IdempotencyToken='string'
)
type AcceptLanguage

string

param AcceptLanguage

The language code.

  • en - English (default)

  • jp - Japanese

  • zh - Chinese

type PortfolioId

string

param PortfolioId

[REQUIRED]

The portfolio identifier.

type ProductId

string

param ProductId

[REQUIRED]

The product identifier.

type Parameters

string

param Parameters

[REQUIRED]

The constraint parameters, in JSON format. The syntax depends on the constraint type as follows:

LAUNCH

Specify the RoleArn property as follows:

{"RoleArn" : "arn:aws:iam::123456789012:role/LaunchRole"}

You cannot have both a LAUNCH and a STACKSET constraint.

You also cannot have more than one LAUNCH constraint on a product and portfolio.

NOTIFICATION

Specify the NotificationArns property as follows:

{"NotificationArns" : ["arn:aws:sns:us-east-1:123456789012:Topic"]}

RESOURCE_UPDATE

Specify the TagUpdatesOnProvisionedProduct property as follows:

{"Version":"2.0","Properties":{"TagUpdateOnProvisionedProduct":"String"}}

The TagUpdatesOnProvisionedProduct property accepts a string value of ALLOWED or NOT_ALLOWED .

STACKSET

Specify the Parameters property as follows:

{"Version": "String", "Properties": {"AccountList": [ "String" ], "RegionList": [ "String" ], "AdminRole": "String", "ExecutionRole": "String"}}

You cannot have both a LAUNCH and a STACKSET constraint.

You also cannot have more than one STACKSET constraint on a product and portfolio.

Products with a STACKSET constraint will launch an AWS CloudFormation stack set.

TEMPLATE

Specify the Rules property. For more information, see Template Constraint Rules .

type Type

string

param Type

[REQUIRED]

The type of constraint.

  • LAUNCH

  • NOTIFICATION

  • RESOURCE_UPDATE

  • STACKSET

  • TEMPLATE

type Description

string

param Description

The description of the constraint.

type IdempotencyToken

string

param IdempotencyToken

[REQUIRED]

A unique identifier that you provide to ensure idempotency. If multiple requests differ only by the idempotency token, the same response is returned for each repeated request.

This field is autopopulated if not provided.

rtype

dict

returns

Response Syntax

{
    'ConstraintDetail': {
        'ConstraintId': 'string',
        'Type': 'string',
        'Description': 'string',
        'Owner': 'string',
        'ProductId': 'string',
        'PortfolioId': 'string'
    },
    'ConstraintParameters': 'string',
    'Status': 'AVAILABLE'|'CREATING'|'FAILED'
}

Response Structure

  • (dict) --

    • ConstraintDetail (dict) --

      Information about the constraint.

      • ConstraintId (string) --

        The identifier of the constraint.

      • Type (string) --

        The type of constraint.

        • LAUNCH

        • NOTIFICATION

        • STACKSET

        • TEMPLATE

      • Description (string) --

        The description of the constraint.

      • Owner (string) --

        The owner of the constraint.

      • ProductId (string) --

        The identifier of the product the constraint applies to. Note that a constraint applies to a specific instance of a product within a certain portfolio.

      • PortfolioId (string) --

        The identifier of the portfolio the product resides in. The constraint applies only to the instance of the product that lives within this portfolio.

    • ConstraintParameters (string) --

      The constraint parameters.

    • Status (string) --

      The status of the current request.

DescribeConstraint (updated) Link ¶
Changes (response)
{'ConstraintDetail': {'PortfolioId': 'string', 'ProductId': 'string'}}

Gets information about the specified constraint.

See also: AWS API Documentation

Request Syntax

client.describe_constraint(
    AcceptLanguage='string',
    Id='string'
)
type AcceptLanguage

string

param AcceptLanguage

The language code.

  • en - English (default)

  • jp - Japanese

  • zh - Chinese

type Id

string

param Id

[REQUIRED]

The identifier of the constraint.

rtype

dict

returns

Response Syntax

{
    'ConstraintDetail': {
        'ConstraintId': 'string',
        'Type': 'string',
        'Description': 'string',
        'Owner': 'string',
        'ProductId': 'string',
        'PortfolioId': 'string'
    },
    'ConstraintParameters': 'string',
    'Status': 'AVAILABLE'|'CREATING'|'FAILED'
}

Response Structure

  • (dict) --

    • ConstraintDetail (dict) --

      Information about the constraint.

      • ConstraintId (string) --

        The identifier of the constraint.

      • Type (string) --

        The type of constraint.

        • LAUNCH

        • NOTIFICATION

        • STACKSET

        • TEMPLATE

      • Description (string) --

        The description of the constraint.

      • Owner (string) --

        The owner of the constraint.

      • ProductId (string) --

        The identifier of the product the constraint applies to. Note that a constraint applies to a specific instance of a product within a certain portfolio.

      • PortfolioId (string) --

        The identifier of the portfolio the product resides in. The constraint applies only to the instance of the product that lives within this portfolio.

    • ConstraintParameters (string) --

      The constraint parameters.

    • Status (string) --

      The status of the current request.

ListConstraintsForPortfolio (updated) Link ¶
Changes (response)
{'ConstraintDetails': {'PortfolioId': 'string', 'ProductId': 'string'}}

Lists the constraints for the specified portfolio and product.

See also: AWS API Documentation

Request Syntax

client.list_constraints_for_portfolio(
    AcceptLanguage='string',
    PortfolioId='string',
    ProductId='string',
    PageSize=123,
    PageToken='string'
)
type AcceptLanguage

string

param AcceptLanguage

The language code.

  • en - English (default)

  • jp - Japanese

  • zh - Chinese

type PortfolioId

string

param PortfolioId

[REQUIRED]

The portfolio identifier.

type ProductId

string

param ProductId

The product identifier.

type PageSize

integer

param PageSize

The maximum number of items to return with this call.

type PageToken

string

param PageToken

The page token for the next set of results. To retrieve the first set of results, use null.

rtype

dict

returns

Response Syntax

{
    'ConstraintDetails': [
        {
            'ConstraintId': 'string',
            'Type': 'string',
            'Description': 'string',
            'Owner': 'string',
            'ProductId': 'string',
            'PortfolioId': 'string'
        },
    ],
    'NextPageToken': 'string'
}

Response Structure

  • (dict) --

    • ConstraintDetails (list) --

      Information about the constraints.

      • (dict) --

        Information about a constraint.

        • ConstraintId (string) --

          The identifier of the constraint.

        • Type (string) --

          The type of constraint.

          • LAUNCH

          • NOTIFICATION

          • STACKSET

          • TEMPLATE

        • Description (string) --

          The description of the constraint.

        • Owner (string) --

          The owner of the constraint.

        • ProductId (string) --

          The identifier of the product the constraint applies to. Note that a constraint applies to a specific instance of a product within a certain portfolio.

        • PortfolioId (string) --

          The identifier of the portfolio the product resides in. The constraint applies only to the instance of the product that lives within this portfolio.

    • NextPageToken (string) --

      The page token to use to retrieve the next set of results. If there are no additional results, this value is null.

UpdateConstraint (updated) Link ¶
Changes (response)
{'ConstraintDetail': {'PortfolioId': 'string', 'ProductId': 'string'}}

Updates the specified constraint.

See also: AWS API Documentation

Request Syntax

client.update_constraint(
    AcceptLanguage='string',
    Id='string',
    Description='string',
    Parameters='string'
)
type AcceptLanguage

string

param AcceptLanguage

The language code.

  • en - English (default)

  • jp - Japanese

  • zh - Chinese

type Id

string

param Id

[REQUIRED]

The identifier of the constraint.

type Description

string

param Description

The updated description of the constraint.

type Parameters

string

param Parameters

The constraint parameters, in JSON format. The syntax depends on the constraint type as follows:

LAUNCH

Specify the RoleArn property as follows:

{"RoleArn" : "arn:aws:iam::123456789012:role/LaunchRole"}

You cannot have both a LAUNCH and a STACKSET constraint.

You also cannot have more than one LAUNCH constraint on a product and portfolio.

NOTIFICATION

Specify the NotificationArns property as follows:

{"NotificationArns" : ["arn:aws:sns:us-east-1:123456789012:Topic"]}

RESOURCE_UPDATE

Specify the TagUpdatesOnProvisionedProduct property as follows:

{"Version":"2.0","Properties":{"TagUpdateOnProvisionedProduct":"String"}}

The TagUpdatesOnProvisionedProduct property accepts a string value of ALLOWED or NOT_ALLOWED .

STACKSET

Specify the Parameters property as follows:

{"Version": "String", "Properties": {"AccountList": [ "String" ], "RegionList": [ "String" ], "AdminRole": "String", "ExecutionRole": "String"}}

You cannot have both a LAUNCH and a STACKSET constraint.

You also cannot have more than one STACKSET constraint on a product and portfolio.

Products with a STACKSET constraint will launch an AWS CloudFormation stack set.

TEMPLATE

Specify the Rules property. For more information, see Template Constraint Rules .

rtype

dict

returns

Response Syntax

{
    'ConstraintDetail': {
        'ConstraintId': 'string',
        'Type': 'string',
        'Description': 'string',
        'Owner': 'string',
        'ProductId': 'string',
        'PortfolioId': 'string'
    },
    'ConstraintParameters': 'string',
    'Status': 'AVAILABLE'|'CREATING'|'FAILED'
}

Response Structure

  • (dict) --

    • ConstraintDetail (dict) --

      Information about the constraint.

      • ConstraintId (string) --

        The identifier of the constraint.

      • Type (string) --

        The type of constraint.

        • LAUNCH

        • NOTIFICATION

        • STACKSET

        • TEMPLATE

      • Description (string) --

        The description of the constraint.

      • Owner (string) --

        The owner of the constraint.

      • ProductId (string) --

        The identifier of the product the constraint applies to. Note that a constraint applies to a specific instance of a product within a certain portfolio.

      • PortfolioId (string) --

        The identifier of the portfolio the product resides in. The constraint applies only to the instance of the product that lives within this portfolio.

    • ConstraintParameters (string) --

      The constraint parameters.

    • Status (string) --

      The status of the current request.