Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(apprunner): add ObservabilityConfiguration for AppRunner Service #30359

Merged
merged 25 commits into from
Jun 24, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a4e11b4
add ObservabilityConfiguration for AppRunner Service
mazyu36 May 28, 2024
e73b10d
feat: add fromArn method
mazyu36 May 28, 2024
0027a86
Merge branch 'main' into apprunner-observability-22985
mazyu36 May 28, 2024
78629f1
Merge branch 'main' into apprunner-observability-22985
mazyu36 May 30, 2024
10277c4
Update packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts
mazyu36 Jun 1, 2024
4af4868
Update packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts
mazyu36 Jun 1, 2024
c532781
Update packages/@aws-cdk/aws-apprunner-alpha/README.md
mazyu36 Jun 1, 2024
8a7f2f7
Update packages/@aws-cdk/aws-apprunner-alpha/lib/observability-config…
mazyu36 Jun 1, 2024
b0cc774
Update packages/@aws-cdk/aws-apprunner-alpha/lib/observability-config…
mazyu36 Jun 1, 2024
71da222
Update packages/@aws-cdk/aws-apprunner-alpha/test/service.test.ts
mazyu36 Jun 1, 2024
b93cd9b
fix: incorporate review comments
mazyu36 Jun 2, 2024
d525912
Update packages/@aws-cdk/aws-apprunner-alpha/lib/observability-config…
mazyu36 Jun 2, 2024
4812423
Update packages/@aws-cdk/aws-apprunner-alpha/lib/observability-config…
mazyu36 Jun 2, 2024
d667bb4
Update packages/@aws-cdk/aws-apprunner-alpha/lib/observability-config…
mazyu36 Jun 2, 2024
f6e9e2c
Update packages/@aws-cdk/aws-apprunner-alpha/test/service.test.ts
mazyu36 Jun 2, 2024
2481648
Update packages/@aws-cdk/aws-apprunner-alpha/lib/observability-config…
mazyu36 Jun 2, 2024
8ac81d3
fix: incorporate review comments
mazyu36 Jun 2, 2024
0594cd0
Update packages/@aws-cdk/aws-apprunner-alpha/lib/observability-config…
mazyu36 Jun 3, 2024
6d5a86c
Merge branch 'main' into apprunner-observability-22985
mazyu36 Jun 11, 2024
1e5f12e
fix: update from method
mazyu36 Jun 19, 2024
db48ffe
add tag test
mazyu36 Jun 20, 2024
6eaaee0
Merge branch 'main' into apprunner-observability-22985
mergify[bot] Jun 20, 2024
8459f87
resolve conflict
mazyu36 Jun 21, 2024
4718de2
Merge branch 'main' into apprunner-observability-22985
mazyu36 Jun 21, 2024
c850eb3
Merge branch 'main' into apprunner-observability-22985
mergify[bot] Jun 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add fromArn method
  • Loading branch information
mazyu36 committed May 28, 2024
commit e73b10d6e8a6eae90bd5f1a2d58c57734885bfe1
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface IObservabilityConfiguration extends cdk.IResource {
*/
export class ObservabilityConfiguration extends cdk.Resource implements IObservabilityConfiguration {
/**
* Import from Observability configuration attributes.
* Imports an App Runner Observability Configuration from attributes.
*/
public static fromObservabilityConfigurationAttributes(scope: Construct, id: string,
attrs: ObservabilityConfigurationAttributes): IObservabilityConfiguration {
Expand All @@ -98,6 +98,28 @@ export class ObservabilityConfiguration extends cdk.Resource implements IObserva
return new Import(scope, id);
}

/**
* Imports an App Runner Observability Configuration from its ARN
*/
public static fromArn(scope: Construct, id: string, observabilityConfigurationArn: string): IObservabilityConfiguration {
const arn = cdk.Stack.of(scope).splitArn(observabilityConfigurationArn, cdk.ArnFormat.SLASH_RESOURCE_NAME);

const resourceParts = arn.resourceName?.split('/');

if (!resourceParts || resourceParts.length < 3) {
throw new Error(`Unexpected ARN format: ${observabilityConfigurationArn}`);
}

const observabilityConfigurationName = resourceParts[0];
const observabilityConfigurationRevision = parseInt(resourceParts[1]);

return ObservabilityConfiguration.fromObservabilityConfigurationAttributes(scope, id, {
observabilityConfigurationArn,
observabilityConfigurationName,
observabilityConfigurationRevision,
});
}

/**
* The ARN of the Observability configuration.
* @attribute
Expand Down
Loading