class GeofenceCollection (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Location.Alpha.GeofenceCollection |
Go | github.com/aws/aws-cdk-go/awscdklocationalpha/v2#GeofenceCollection |
Java | software.amazon.awscdk.services.location.alpha.GeofenceCollection |
Python | aws_cdk.aws_location_alpha.GeofenceCollection |
TypeScript (source) | @aws-cdk/aws-location-alpha ยป GeofenceCollection |
Implements
IConstruct
, IDependable
, IResource
, IGeofence
A Geofence Collection.
Example
declare const key: kms.Key;
new location.GeofenceCollection(this, 'GeofenceCollection', {
geofenceCollectionName: 'MyGeofenceCollection', // optional, defaults to a generated name
kmsKey: key, // optional, defaults to use an AWS managed key
});
Initializer
new GeofenceCollection(scope: Construct, id: string, props?: GeofenceCollectionProps)
Parameters
- scope
Construct
- id
string
- props
Geofence
Collection Props
Construct Props
Name | Type | Description |
---|---|---|
description? | string | A description for the geofence collection. |
geofence | string | A name for the geofence collection. |
kms | IKey | The customer managed to encrypt your data. |
description?
Type:
string
(optional, default: no description)
A description for the geofence collection.
geofenceCollectionName?
Type:
string
(optional, default: A name is automatically generated)
A name for the geofence collection.
Must be between 1 and 100 characters and contain only alphanumeric characters, hyphens, periods and underscores.
kmsKey?
Type:
IKey
(optional, default: Use an AWS managed key)
The customer managed to encrypt your data.
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
geofence | string | The Amazon Resource Name (ARN) of the geofence collection resource. |
geofence | string | The timestamp for when the geofence collection resource was created in ISO 8601 format. |
geofence | string | The name of the geofence collection. |
geofence | string | The timestamp for when the geofence collection resource was last updated in ISO 8601 format. |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
env
Type:
Resource
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.
geofenceCollectionArn
Type:
string
The Amazon Resource Name (ARN) of the geofence collection resource.
geofenceCollectionCreateTime
Type:
string
The timestamp for when the geofence collection resource was created in ISO 8601 format.
geofenceCollectionName
Type:
string
The name of the geofence collection.
geofenceCollectionUpdateTime
Type:
string
The timestamp for when the geofence collection resource was last updated in ISO 8601 format.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
grant(grantee, ...actions) | Grant the given principal identity permissions to perform the actions on this geofence collection. |
grant | Grant the given identity permissions to read this geofence collection. |
to | Returns a string representation of this construct. |
static from | Use an existing geofence collection by ARN. |
static from | Use an existing geofence collection by name. |
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
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
).
grant(grantee, ...actions)
public grant(grantee: IGrantable, ...actions: string[]): Grant
Parameters
- grantee
IGrantable
- actions
string
Returns
Grant the given principal identity permissions to perform the actions on this geofence collection.
Read(grantee)
grantpublic grantRead(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given identity permissions to read this geofence collection.
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.
GeofenceCollectionArn(scope, id, geofenceCollectionArn)
static frompublic static fromGeofenceCollectionArn(scope: Construct, id: string, geofenceCollectionArn: string): IGeofenceCollection
Parameters
- scope
Construct
- id
string
- geofenceCollectionArn
string
Returns
Use an existing geofence collection by ARN.
GeofenceCollectionName(scope, id, geofenceCollectionName)
static frompublic static fromGeofenceCollectionName(scope: Construct, id: string, geofenceCollectionName: string): IGeofenceCollection
Parameters
- scope
Construct
- id
string
- geofenceCollectionName
string
Returns
Use an existing geofence collection by name.