class AttributeGroup (construct)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Servicecatalogappregistry.Alpha.AttributeGroup |
Go | github.com/aws/aws-cdk-go/awscdkservicecatalogappregistryalpha/v2#AttributeGroup |
Java | software.amazon.awscdk.services.servicecatalogappregistry.alpha.AttributeGroup |
Python | aws_cdk.aws_servicecatalogappregistry_alpha.AttributeGroup |
TypeScript (source) | @aws-cdk/aws-servicecatalogappregistry-alpha ยป AttributeGroup |
Implements
IConstruct, IDependable, IResource, IEnvironment, IAttribute
A Service Catalog AppRegistry Attribute Group.
Example
const attributeGroup = new appreg.AttributeGroup(this, 'MyFirstAttributeGroup', {
attributeGroupName: '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'
}
}
});
Initializer
new AttributeGroup(scope: Construct, id: string, props: AttributeGroupProps)
Parameters
- scope
Construct - id
string - props
AttributeGroup Props
Construct Props
| Name | Type | Description |
|---|---|---|
| attribute | string | Enforces a particular physical attribute group name. |
| attributes | { [string]: any } | A JSON of nested key-value pairs that represent the attributes in the group. |
| description? | string | Description for attribute group. |
attributeGroupName
Type:
string
Enforces a particular physical attribute group name.
attributes
Type:
{ [string]: any }
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?
Type:
string
(optional, default: No description provided)
Description for attribute group.
Properties
| Name | Type | Description |
|---|---|---|
| attribute | string | The ARN of the attribute group. |
| attribute | string | The ID of the attribute group. |
| env | Resource | The environment this resource belongs to. |
| node | Node | The tree node. |
| stack | Stack | The stack in which this resource is defined. |
| static PROPERTY_INJECTION_ID | string | Uniquely identifies this class. |
attributeGroupArn
Type:
string
The ARN of the attribute group.
attributeGroupId
Type:
string
The ID of the attribute group.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
static PROPERTY_INJECTION_ID
Type:
string
Uniquely identifies this class.
Methods
| Name | Description |
|---|---|
| apply | Apply the given removal policy to this resource. |
| associate | Associate an application with attribute group If the attribute group is already associated, it will ignore duplicate request. |
| share | Share the attribute group resource with other IAM entities, accounts, or OUs. |
| to | Returns a string representation of this construct. |
| protected generate | Create a unique hash. |
| protected get | Get the correct permission ARN based on the SharePermission. |
| static from | Imports an attribute group construct that represents an external attribute group. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
RemovalPolicy
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).
associateWith(application)
public associateWith(application: IApplication): void
Parameters
- application
IApplication
Associate an application with attribute group If the attribute group is already associated, it will ignore duplicate request.
shareAttributeGroup(id, shareOptions)
public shareAttributeGroup(id: string, shareOptions: ShareOptions): void
Parameters
- id
string - shareOptions
ShareOptions
Share the attribute group resource with other IAM entities, accounts, or OUs.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
protected generateUniqueHash(resourceAddress)
protected generateUniqueHash(resourceAddress: string): string
Parameters
- resourceAddress
string
Returns
string
Create a unique hash.
protected getAttributeGroupSharePermissionARN(shareOptions)
protected getAttributeGroupSharePermissionARN(shareOptions: ShareOptions): string
Parameters
- shareOptions
ShareOptions
Returns
string
Get the correct permission ARN based on the SharePermission.
static fromAttributeGroupArn(scope, id, attributeGroupArn)
public static fromAttributeGroupArn(scope: Construct, id: string, attributeGroupArn: string): IAttributeGroup
Parameters
- scope
Constructโ The parent creating construct (usuallythis). - id
stringโ The construct's name. - attributeGroupArn
stringโ the Amazon Resource Name of the existing AppRegistry attribute group.
Returns
Imports an attribute group construct that represents an external attribute group.

.NET
Go
Java
Python
TypeScript (