Skip to content

Commit

Permalink
feat(ses): add configurationSetArn property on configurationSet resource
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericbarthelet committed Apr 19, 2024
1 parent 91246ac commit 94db37a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/aws-cdk-lib/aws-ses/lib/configuration-set.ts
Expand Up @@ -15,6 +15,13 @@ export interface IConfigurationSet extends IResource {
* @attribute
*/
readonly configurationSetName: string;

/**
* The ARN of the configuration set
*
* @attribute
*/
readonly configurationSetArn: string;
}

/**
Expand Down Expand Up @@ -121,12 +128,20 @@ export class ConfigurationSet extends Resource implements IConfigurationSet {
public static fromConfigurationSetName(scope: Construct, id: string, configurationSetName: string): IConfigurationSet {
class Import extends Resource implements IConfigurationSet {
public readonly configurationSetName = configurationSetName;

public readonly configurationSetArn = this.stack.formatArn({
service: 'ses',
resource: 'configuration-set',
resourceName: this.configurationSetName,
});
}
return new Import(scope, id);
}

public readonly configurationSetName: string;

public readonly configurationSetArn: string;

constructor(scope: Construct, id: string, props: ConfigurationSetProps = {}) {
super(scope, id, {
physicalName: props.configurationSetName,
Expand All @@ -153,6 +168,12 @@ export class ConfigurationSet extends Resource implements IConfigurationSet {
});

this.configurationSetName = configurationSet.ref;

this.configurationSetArn = this.stack.formatArn({
service: 'ses',
resource: 'configuration-set',
resourceName: this.configurationSetName,
});
}

/**
Expand Down

0 comments on commit 94db37a

Please sign in to comment.