1 | import * as iam from '@aws-cdk/aws-iam';
|
2 | import * as s3 from '@aws-cdk/aws-s3';
|
3 | import * as cdk from '@aws-cdk/core';
|
4 | import { Construct } from 'constructs';
|
5 | /**
|
6 | * The interface representing the ReportGroup resource -
|
7 | * either an existing one, imported using the
|
8 | * {@link ReportGroup.fromReportGroupName} method,
|
9 | * or a new one, created with the {@link ReportGroup} class.
|
10 | */
|
11 | export interface IReportGroup extends cdk.IResource {
|
12 | /**
|
13 | * The ARN of the ReportGroup.
|
14 | *
|
15 | * @attribute
|
16 | */
|
17 | readonly reportGroupArn: string;
|
18 | /**
|
19 | * The name of the ReportGroup.
|
20 | *
|
21 | * @attribute
|
22 | */
|
23 | readonly reportGroupName: string;
|
24 | /**
|
25 | * Grants the given entity permissions to write
|
26 | * (that is, upload reports to)
|
27 | * this report group.
|
28 | */
|
29 | grantWrite(identity: iam.IGrantable): iam.Grant;
|
30 | }
|
31 | declare abstract class ReportGroupBase extends cdk.Resource implements IReportGroup {
|
32 | abstract readonly reportGroupArn: string;
|
33 | abstract readonly reportGroupName: string;
|
34 | protected abstract readonly exportBucket?: s3.IBucket;
|
35 | grantWrite(identity: iam.IGrantable): iam.Grant;
|
36 | }
|
37 | /**
|
38 | * Construction properties for {@link ReportGroup}.
|
39 | */
|
40 | export interface ReportGroupProps {
|
41 | /**
|
42 | * The physical name of the report group.
|
43 | *
|
44 | * @default - CloudFormation-generated name
|
45 | */
|
46 | readonly reportGroupName?: string;
|
47 | /**
|
48 | * An optional S3 bucket to export the reports to.
|
49 | *
|
50 | * @default - the reports will not be exported
|
51 | */
|
52 | readonly exportBucket?: s3.IBucket;
|
53 | /**
|
54 | * Whether to output the report files into the export bucket as-is,
|
55 | * or create a ZIP from them before doing the export.
|
56 | * Ignored if {@link exportBucket} has not been provided.
|
57 | *
|
58 | * @default - false (the files will not be ZIPped)
|
59 | */
|
60 | readonly zipExport?: boolean;
|
61 | /**
|
62 | * What to do when this resource is deleted from a stack.
|
63 | * As CodeBuild does not allow deleting a ResourceGroup that has reports inside of it,
|
64 | * this is set to retain the resource by default.
|
65 | *
|
66 | * @default RemovalPolicy.RETAIN
|
67 | */
|
68 | readonly removalPolicy?: cdk.RemovalPolicy;
|
69 | }
|
70 | /**
|
71 | * The ReportGroup resource class.
|
72 | */
|
73 | export declare class ReportGroup extends ReportGroupBase {
|
74 | /**
|
75 | * Reference an existing ReportGroup,
|
76 | * defined outside of the CDK code,
|
77 | * by name.
|
78 | */
|
79 | static fromReportGroupName(scope: Construct, id: string, reportGroupName: string): IReportGroup;
|
80 | readonly reportGroupArn: string;
|
81 | readonly reportGroupName: string;
|
82 | protected readonly exportBucket?: s3.IBucket;
|
83 | constructor(scope: Construct, id: string, props?: ReportGroupProps);
|
84 | }
|
85 | export {};
|