AttributeGroup

class aws_cdk.aws_servicecatalogappregistry_alpha.AttributeGroup(scope, id, *, attribute_group_name, attributes, description=None)

Bases: Resource

(experimental) A Service Catalog AppRegistry Attribute Group.

Stability:

experimental

ExampleMetadata:

infused

Example:

attribute_group = appreg.AttributeGroup(self, "MyFirstAttributeGroup",
    attribute_group_name="MyFirstAttributeGroupName",
    description="description for my attribute group",  # the description is optional,
    attributes={
        "project": "foo",
        "team": ["member1", "member2", "member3"],
        "public": False,
        "stages": {
            "alpha": "complete",
            "beta": "incomplete",
            "release": "not started"
        }
    }
)
Parameters:
  • scope (Construct) –

  • id (str) –

  • attribute_group_name (str) – (experimental) Enforces a particular physical attribute group name.

  • attributes (Mapping[str, Any]) – (experimental) A JSON of nested key-value pairs that represent the attributes in the group. Attributes maybe an empty JSON ‘{}’, but must be explicitly stated.

  • description (Optional[str]) – (experimental) Description for attribute group. Default: - No description provided

Stability:

experimental

Methods

apply_removal_policy(policy)

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:

policy (RemovalPolicy) –

Return type:

None

associate_with(application)

(experimental) Associate an application with attribute group If the attribute group is already associated, it will ignore duplicate request.

Parameters:

application (IApplication) –

Stability:

experimental

Return type:

None

share_attribute_group(id, *, name, accounts=None, organization_arns=None, roles=None, share_permission=None, users=None)

(experimental) Share the attribute group resource with other IAM entities, accounts, or OUs.

Parameters:
  • id (str) –

  • name (str) – (experimental) Name of the share.

  • accounts (Optional[Sequence[str]]) – (experimental) A list of AWS accounts that the application will be shared with. Default: - No accounts specified for share

  • organization_arns (Optional[Sequence[str]]) – (experimental) A list of AWS Organization or Organizational Units (OUs) ARNs that the application will be shared with. Default: - No AWS Organizations or OUs specified for share

  • roles (Optional[Sequence[IRole]]) – (experimental) A list of AWS IAM roles that the application will be shared with. Default: - No IAM roles specified for share

  • share_permission (Union[str, SharePermission, None]) – (experimental) An option to manage access to the application or attribute group. Default: - Principals will be assigned read only permissions on the application or attribute group.

  • users (Optional[Sequence[IUser]]) – (experimental) A list of AWS IAM users that the application will be shared with. Default: - No IAM Users specified for share

Stability:

experimental

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Attributes

attribute_group_arn

(experimental) The ARN of the attribute group.

Stability:

experimental

attribute_group_id

(experimental) The ID of the attribute group.

Stability:

experimental

env

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.

node

The tree node.

stack

The stack in which this resource is defined.

Static Methods

classmethod from_attribute_group_arn(scope, id, attribute_group_arn)

(experimental) Imports an attribute group construct that represents an external attribute group.

Parameters:
  • scope (Construct) – The parent creating construct (usually this).

  • id (str) – The construct’s name.

  • attribute_group_arn (str) – the Amazon Resource Name of the existing AppRegistry attribute group.

Stability:

experimental

Return type:

IAttributeGroup

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

classmethod is_owned_resource(construct)

Returns true if the construct was created by CDK, and false otherwise.

Parameters:

construct (IConstruct) –

Return type:

bool

classmethod is_resource(construct)

Check whether the given construct is a Resource.

Parameters:

construct (IConstruct) –

Return type:

bool