@cdktf-providers/astronomer-astro 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +355 -0
- package/README.md +19 -0
- package/dist/alert/index.d.ts +566 -0
- package/dist/alert/index.js +1489 -0
- package/dist/api-token/index.d.ts +199 -0
- package/dist/api-token/index.js +503 -0
- package/dist/cluster/index.d.ts +305 -0
- package/dist/cluster/index.js +755 -0
- package/dist/data-astro-alert/index.d.ts +277 -0
- package/dist/data-astro-alert/index.js +762 -0
- package/dist/data-astro-alerts/index.d.ts +232 -0
- package/dist/data-astro-alerts/index.js +600 -0
- package/dist/data-astro-api-token/index.d.ts +135 -0
- package/dist/data-astro-api-token/index.js +353 -0
- package/dist/data-astro-api-tokens/index.d.ts +196 -0
- package/dist/data-astro-api-tokens/index.js +502 -0
- package/dist/data-astro-cluster/index.d.ts +211 -0
- package/dist/data-astro-cluster/index.js +535 -0
- package/dist/data-astro-cluster-options/index.d.ts +255 -0
- package/dist/data-astro-cluster-options/index.js +640 -0
- package/dist/data-astro-clusters/index.d.ts +263 -0
- package/dist/data-astro-clusters/index.js +661 -0
- package/dist/data-astro-deployment/index.d.ts +355 -0
- package/dist/data-astro-deployment/index.js +1009 -0
- package/dist/data-astro-deployment-options/index.d.ts +475 -0
- package/dist/data-astro-deployment-options/index.js +1274 -0
- package/dist/data-astro-deployments/index.d.ts +416 -0
- package/dist/data-astro-deployments/index.js +1158 -0
- package/dist/data-astro-notification-channel/index.d.ts +122 -0
- package/dist/data-astro-notification-channel/index.js +345 -0
- package/dist/data-astro-notification-channels/index.d.ts +201 -0
- package/dist/data-astro-notification-channels/index.js +540 -0
- package/dist/data-astro-organization/index.d.ts +87 -0
- package/dist/data-astro-organization/index.js +251 -0
- package/dist/data-astro-team/index.d.ts +204 -0
- package/dist/data-astro-team/index.js +507 -0
- package/dist/data-astro-teams/index.d.ts +247 -0
- package/dist/data-astro-teams/index.js +610 -0
- package/dist/data-astro-user/index.d.ts +122 -0
- package/dist/data-astro-user/index.js +274 -0
- package/dist/data-astro-users/index.d.ts +174 -0
- package/dist/data-astro-users/index.js +400 -0
- package/dist/data-astro-workspace/index.d.ts +94 -0
- package/dist/data-astro-workspace/index.js +250 -0
- package/dist/data-astro-workspaces/index.d.ts +146 -0
- package/dist/data-astro-workspaces/index.js +376 -0
- package/dist/deployment/index.d.ts +813 -0
- package/dist/deployment/index.js +2083 -0
- package/dist/hybrid-cluster-workspace-authorization/index.d.ts +53 -0
- package/dist/hybrid-cluster-workspace-authorization/index.js +111 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +32 -0
- package/dist/lazy-index.d.ts +0 -0
- package/dist/lazy-index.js +32 -0
- package/dist/notification-channel/index.d.ts +235 -0
- package/dist/notification-channel/index.js +608 -0
- package/dist/provider/index.d.ts +75 -0
- package/dist/provider/index.js +151 -0
- package/dist/team/index.d.ts +251 -0
- package/dist/team/index.js +622 -0
- package/dist/team-roles/index.d.ts +180 -0
- package/dist/team-roles/index.js +414 -0
- package/dist/user-invite/index.d.ts +99 -0
- package/dist/user-invite/index.js +262 -0
- package/dist/user-roles/index.d.ts +180 -0
- package/dist/user-roles/index.js +414 -0
- package/dist/workspace/index.d.ts +109 -0
- package/dist/workspace/index.js +282 -0
- package/package.json +51 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { Construct } from 'constructs';
|
|
2
|
+
import * as cdktf from 'cdktf';
|
|
3
|
+
export interface ApiTokenConfig extends cdktf.TerraformMetaArguments {
|
|
4
|
+
/**
|
|
5
|
+
* API Token description
|
|
6
|
+
*
|
|
7
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token#description ApiToken#description}
|
|
8
|
+
*/
|
|
9
|
+
readonly description?: string;
|
|
10
|
+
/**
|
|
11
|
+
* API Token expiry period in days
|
|
12
|
+
*
|
|
13
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token#expiry_period_in_days ApiToken#expiry_period_in_days}
|
|
14
|
+
*/
|
|
15
|
+
readonly expiryPeriodInDays?: number;
|
|
16
|
+
/**
|
|
17
|
+
* API Token name
|
|
18
|
+
*
|
|
19
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token#name ApiToken#name}
|
|
20
|
+
*/
|
|
21
|
+
readonly name: string;
|
|
22
|
+
/**
|
|
23
|
+
* The roles assigned to the API Token
|
|
24
|
+
*
|
|
25
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token#roles ApiToken#roles}
|
|
26
|
+
*/
|
|
27
|
+
readonly roles: ApiTokenRoles[] | cdktf.IResolvable;
|
|
28
|
+
/**
|
|
29
|
+
* API Token type - if changing this value, the API Token will be recreated with the new type
|
|
30
|
+
*
|
|
31
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token#type ApiToken#type}
|
|
32
|
+
*/
|
|
33
|
+
readonly type: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ApiTokenCreatedBy {
|
|
36
|
+
}
|
|
37
|
+
export declare function apiTokenCreatedByToTerraform(struct?: ApiTokenCreatedBy): any;
|
|
38
|
+
export declare function apiTokenCreatedByToHclTerraform(struct?: ApiTokenCreatedBy): any;
|
|
39
|
+
export declare class ApiTokenCreatedByOutputReference extends cdktf.ComplexObject {
|
|
40
|
+
private isEmptyObject;
|
|
41
|
+
/**
|
|
42
|
+
* @param terraformResource The parent resource
|
|
43
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
44
|
+
*/
|
|
45
|
+
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string);
|
|
46
|
+
get internalValue(): ApiTokenCreatedBy | undefined;
|
|
47
|
+
set internalValue(value: ApiTokenCreatedBy | undefined);
|
|
48
|
+
get apiTokenName(): any;
|
|
49
|
+
get avatarUrl(): any;
|
|
50
|
+
get fullName(): any;
|
|
51
|
+
get id(): any;
|
|
52
|
+
get subjectType(): any;
|
|
53
|
+
get username(): any;
|
|
54
|
+
}
|
|
55
|
+
export interface ApiTokenRoles {
|
|
56
|
+
/**
|
|
57
|
+
* The ID of the entity to assign the role to
|
|
58
|
+
*
|
|
59
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token#entity_id ApiToken#entity_id}
|
|
60
|
+
*/
|
|
61
|
+
readonly entityId: string;
|
|
62
|
+
/**
|
|
63
|
+
* The type of entity to assign the role to
|
|
64
|
+
*
|
|
65
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token#entity_type ApiToken#entity_type}
|
|
66
|
+
*/
|
|
67
|
+
readonly entityType: string;
|
|
68
|
+
/**
|
|
69
|
+
* The role to assign to the entity
|
|
70
|
+
*
|
|
71
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token#role ApiToken#role}
|
|
72
|
+
*/
|
|
73
|
+
readonly role: string;
|
|
74
|
+
}
|
|
75
|
+
export declare function apiTokenRolesToTerraform(struct?: ApiTokenRoles | cdktf.IResolvable): any;
|
|
76
|
+
export declare function apiTokenRolesToHclTerraform(struct?: ApiTokenRoles | cdktf.IResolvable): any;
|
|
77
|
+
export declare class ApiTokenRolesOutputReference extends cdktf.ComplexObject {
|
|
78
|
+
private isEmptyObject;
|
|
79
|
+
private resolvableValue?;
|
|
80
|
+
/**
|
|
81
|
+
* @param terraformResource The parent resource
|
|
82
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
83
|
+
* @param complexObjectIndex the index of this item in the list
|
|
84
|
+
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
|
|
85
|
+
*/
|
|
86
|
+
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean);
|
|
87
|
+
get internalValue(): ApiTokenRoles | cdktf.IResolvable | undefined;
|
|
88
|
+
set internalValue(value: ApiTokenRoles | cdktf.IResolvable | undefined);
|
|
89
|
+
private _entityId?;
|
|
90
|
+
get entityId(): string;
|
|
91
|
+
set entityId(value: string);
|
|
92
|
+
get entityIdInput(): string;
|
|
93
|
+
private _entityType?;
|
|
94
|
+
get entityType(): string;
|
|
95
|
+
set entityType(value: string);
|
|
96
|
+
get entityTypeInput(): string;
|
|
97
|
+
private _role?;
|
|
98
|
+
get role(): string;
|
|
99
|
+
set role(value: string);
|
|
100
|
+
get roleInput(): string;
|
|
101
|
+
}
|
|
102
|
+
export declare class ApiTokenRolesList extends cdktf.ComplexList {
|
|
103
|
+
protected terraformResource: cdktf.IInterpolatingParent;
|
|
104
|
+
protected terraformAttribute: string;
|
|
105
|
+
protected wrapsSet: boolean;
|
|
106
|
+
internalValue?: ApiTokenRoles[] | cdktf.IResolvable;
|
|
107
|
+
/**
|
|
108
|
+
* @param terraformResource The parent resource
|
|
109
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
110
|
+
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
|
|
111
|
+
*/
|
|
112
|
+
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean);
|
|
113
|
+
/**
|
|
114
|
+
* @param index the index of the item to return
|
|
115
|
+
*/
|
|
116
|
+
get(index: number): ApiTokenRolesOutputReference;
|
|
117
|
+
}
|
|
118
|
+
export interface ApiTokenUpdatedBy {
|
|
119
|
+
}
|
|
120
|
+
export declare function apiTokenUpdatedByToTerraform(struct?: ApiTokenUpdatedBy): any;
|
|
121
|
+
export declare function apiTokenUpdatedByToHclTerraform(struct?: ApiTokenUpdatedBy): any;
|
|
122
|
+
export declare class ApiTokenUpdatedByOutputReference extends cdktf.ComplexObject {
|
|
123
|
+
private isEmptyObject;
|
|
124
|
+
/**
|
|
125
|
+
* @param terraformResource The parent resource
|
|
126
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
127
|
+
*/
|
|
128
|
+
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string);
|
|
129
|
+
get internalValue(): ApiTokenUpdatedBy | undefined;
|
|
130
|
+
set internalValue(value: ApiTokenUpdatedBy | undefined);
|
|
131
|
+
get apiTokenName(): any;
|
|
132
|
+
get avatarUrl(): any;
|
|
133
|
+
get fullName(): any;
|
|
134
|
+
get id(): any;
|
|
135
|
+
get subjectType(): any;
|
|
136
|
+
get username(): any;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Represents a {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token astro_api_token}
|
|
140
|
+
*/
|
|
141
|
+
export declare class ApiToken extends cdktf.TerraformResource {
|
|
142
|
+
static readonly tfResourceType = "astro_api_token";
|
|
143
|
+
/**
|
|
144
|
+
* Generates CDKTF code for importing a ApiToken resource upon running "cdktf plan <stack-name>"
|
|
145
|
+
* @param scope The scope in which to define this construct
|
|
146
|
+
* @param importToId The construct id used in the generated config for the ApiToken to import
|
|
147
|
+
* @param importFromId The id of the existing ApiToken that should be imported. Refer to the {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token#import import section} in the documentation of this resource for the id to use
|
|
148
|
+
* @param provider? Optional instance of the provider where the ApiToken to import is found
|
|
149
|
+
*/
|
|
150
|
+
static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktf.TerraformProvider): any;
|
|
151
|
+
/**
|
|
152
|
+
* Create a new {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token astro_api_token} Resource
|
|
153
|
+
*
|
|
154
|
+
* @param scope The scope in which to define this construct
|
|
155
|
+
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
|
|
156
|
+
* @param options ApiTokenConfig
|
|
157
|
+
*/
|
|
158
|
+
constructor(scope: Construct, id: string, config: ApiTokenConfig);
|
|
159
|
+
get createdAt(): any;
|
|
160
|
+
private _createdBy;
|
|
161
|
+
get createdBy(): ApiTokenCreatedByOutputReference;
|
|
162
|
+
private _description?;
|
|
163
|
+
get description(): string;
|
|
164
|
+
set description(value: string);
|
|
165
|
+
resetDescription(): void;
|
|
166
|
+
get descriptionInput(): string;
|
|
167
|
+
get endAt(): any;
|
|
168
|
+
private _expiryPeriodInDays?;
|
|
169
|
+
get expiryPeriodInDays(): number;
|
|
170
|
+
set expiryPeriodInDays(value: number);
|
|
171
|
+
resetExpiryPeriodInDays(): void;
|
|
172
|
+
get expiryPeriodInDaysInput(): number;
|
|
173
|
+
get id(): any;
|
|
174
|
+
get lastUsedAt(): any;
|
|
175
|
+
private _name?;
|
|
176
|
+
get name(): string;
|
|
177
|
+
set name(value: string);
|
|
178
|
+
get nameInput(): string;
|
|
179
|
+
private _roles;
|
|
180
|
+
get roles(): ApiTokenRolesList;
|
|
181
|
+
putRoles(value: ApiTokenRoles[] | cdktf.IResolvable): void;
|
|
182
|
+
get rolesInput(): any;
|
|
183
|
+
get shortToken(): any;
|
|
184
|
+
get startAt(): any;
|
|
185
|
+
get token(): any;
|
|
186
|
+
private _type?;
|
|
187
|
+
get type(): string;
|
|
188
|
+
set type(value: string);
|
|
189
|
+
get typeInput(): string;
|
|
190
|
+
get updatedAt(): any;
|
|
191
|
+
private _updatedBy;
|
|
192
|
+
get updatedBy(): ApiTokenUpdatedByOutputReference;
|
|
193
|
+
protected synthesizeAttributes(): {
|
|
194
|
+
[name: string]: any;
|
|
195
|
+
};
|
|
196
|
+
protected synthesizeHclAttributes(): {
|
|
197
|
+
[name: string]: any;
|
|
198
|
+
};
|
|
199
|
+
}
|
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
// https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token
|
|
2
|
+
// generated from terraform resource schema
|
|
3
|
+
import * as cdktf from 'cdktf';
|
|
4
|
+
export function apiTokenCreatedByToTerraform(struct) {
|
|
5
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
6
|
+
return struct;
|
|
7
|
+
}
|
|
8
|
+
if (cdktf.isComplexElement(struct)) {
|
|
9
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
10
|
+
}
|
|
11
|
+
return {};
|
|
12
|
+
}
|
|
13
|
+
export function apiTokenCreatedByToHclTerraform(struct) {
|
|
14
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
15
|
+
return struct;
|
|
16
|
+
}
|
|
17
|
+
if (cdktf.isComplexElement(struct)) {
|
|
18
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
19
|
+
}
|
|
20
|
+
const attrs = {};
|
|
21
|
+
return attrs;
|
|
22
|
+
}
|
|
23
|
+
export class ApiTokenCreatedByOutputReference extends cdktf.ComplexObject {
|
|
24
|
+
isEmptyObject = false;
|
|
25
|
+
/**
|
|
26
|
+
* @param terraformResource The parent resource
|
|
27
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
28
|
+
*/
|
|
29
|
+
constructor(terraformResource, terraformAttribute) {
|
|
30
|
+
super(terraformResource, terraformAttribute, false);
|
|
31
|
+
}
|
|
32
|
+
get internalValue() {
|
|
33
|
+
let hasAnyValues = this.isEmptyObject;
|
|
34
|
+
const internalValueResult = {};
|
|
35
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
36
|
+
}
|
|
37
|
+
set internalValue(value) {
|
|
38
|
+
if (value === undefined) {
|
|
39
|
+
this.isEmptyObject = false;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// api_token_name - computed: true, optional: false, required: false
|
|
46
|
+
get apiTokenName() {
|
|
47
|
+
return this.getStringAttribute('api_token_name');
|
|
48
|
+
}
|
|
49
|
+
// avatar_url - computed: true, optional: false, required: false
|
|
50
|
+
get avatarUrl() {
|
|
51
|
+
return this.getStringAttribute('avatar_url');
|
|
52
|
+
}
|
|
53
|
+
// full_name - computed: true, optional: false, required: false
|
|
54
|
+
get fullName() {
|
|
55
|
+
return this.getStringAttribute('full_name');
|
|
56
|
+
}
|
|
57
|
+
// id - computed: true, optional: false, required: false
|
|
58
|
+
get id() {
|
|
59
|
+
return this.getStringAttribute('id');
|
|
60
|
+
}
|
|
61
|
+
// subject_type - computed: true, optional: false, required: false
|
|
62
|
+
get subjectType() {
|
|
63
|
+
return this.getStringAttribute('subject_type');
|
|
64
|
+
}
|
|
65
|
+
// username - computed: true, optional: false, required: false
|
|
66
|
+
get username() {
|
|
67
|
+
return this.getStringAttribute('username');
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export function apiTokenRolesToTerraform(struct) {
|
|
71
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
72
|
+
return struct;
|
|
73
|
+
}
|
|
74
|
+
if (cdktf.isComplexElement(struct)) {
|
|
75
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
entity_id: cdktf.stringToTerraform(struct.entityId),
|
|
79
|
+
entity_type: cdktf.stringToTerraform(struct.entityType),
|
|
80
|
+
role: cdktf.stringToTerraform(struct.role),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export function apiTokenRolesToHclTerraform(struct) {
|
|
84
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
85
|
+
return struct;
|
|
86
|
+
}
|
|
87
|
+
if (cdktf.isComplexElement(struct)) {
|
|
88
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
89
|
+
}
|
|
90
|
+
const attrs = {
|
|
91
|
+
entity_id: {
|
|
92
|
+
value: cdktf.stringToHclTerraform(struct.entityId),
|
|
93
|
+
isBlock: false,
|
|
94
|
+
type: "simple",
|
|
95
|
+
storageClassType: "string",
|
|
96
|
+
},
|
|
97
|
+
entity_type: {
|
|
98
|
+
value: cdktf.stringToHclTerraform(struct.entityType),
|
|
99
|
+
isBlock: false,
|
|
100
|
+
type: "simple",
|
|
101
|
+
storageClassType: "string",
|
|
102
|
+
},
|
|
103
|
+
role: {
|
|
104
|
+
value: cdktf.stringToHclTerraform(struct.role),
|
|
105
|
+
isBlock: false,
|
|
106
|
+
type: "simple",
|
|
107
|
+
storageClassType: "string",
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
// remove undefined attributes
|
|
111
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
|
|
112
|
+
}
|
|
113
|
+
export class ApiTokenRolesOutputReference extends cdktf.ComplexObject {
|
|
114
|
+
isEmptyObject = false;
|
|
115
|
+
resolvableValue;
|
|
116
|
+
/**
|
|
117
|
+
* @param terraformResource The parent resource
|
|
118
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
119
|
+
* @param complexObjectIndex the index of this item in the list
|
|
120
|
+
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
|
|
121
|
+
*/
|
|
122
|
+
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
|
|
123
|
+
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
|
|
124
|
+
}
|
|
125
|
+
get internalValue() {
|
|
126
|
+
if (this.resolvableValue) {
|
|
127
|
+
return this.resolvableValue;
|
|
128
|
+
}
|
|
129
|
+
let hasAnyValues = this.isEmptyObject;
|
|
130
|
+
const internalValueResult = {};
|
|
131
|
+
if (this._entityId !== undefined) {
|
|
132
|
+
hasAnyValues = true;
|
|
133
|
+
internalValueResult.entityId = this._entityId;
|
|
134
|
+
}
|
|
135
|
+
if (this._entityType !== undefined) {
|
|
136
|
+
hasAnyValues = true;
|
|
137
|
+
internalValueResult.entityType = this._entityType;
|
|
138
|
+
}
|
|
139
|
+
if (this._role !== undefined) {
|
|
140
|
+
hasAnyValues = true;
|
|
141
|
+
internalValueResult.role = this._role;
|
|
142
|
+
}
|
|
143
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
144
|
+
}
|
|
145
|
+
set internalValue(value) {
|
|
146
|
+
if (value === undefined) {
|
|
147
|
+
this.isEmptyObject = false;
|
|
148
|
+
this.resolvableValue = undefined;
|
|
149
|
+
this._entityId = undefined;
|
|
150
|
+
this._entityType = undefined;
|
|
151
|
+
this._role = undefined;
|
|
152
|
+
}
|
|
153
|
+
else if (cdktf.Tokenization.isResolvable(value)) {
|
|
154
|
+
this.isEmptyObject = false;
|
|
155
|
+
this.resolvableValue = value;
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
159
|
+
this.resolvableValue = undefined;
|
|
160
|
+
this._entityId = value.entityId;
|
|
161
|
+
this._entityType = value.entityType;
|
|
162
|
+
this._role = value.role;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
// entity_id - computed: false, optional: false, required: true
|
|
166
|
+
_entityId;
|
|
167
|
+
get entityId() {
|
|
168
|
+
return this.getStringAttribute('entity_id');
|
|
169
|
+
}
|
|
170
|
+
set entityId(value) {
|
|
171
|
+
this._entityId = value;
|
|
172
|
+
}
|
|
173
|
+
// Temporarily expose input value. Use with caution.
|
|
174
|
+
get entityIdInput() {
|
|
175
|
+
return this._entityId;
|
|
176
|
+
}
|
|
177
|
+
// entity_type - computed: false, optional: false, required: true
|
|
178
|
+
_entityType;
|
|
179
|
+
get entityType() {
|
|
180
|
+
return this.getStringAttribute('entity_type');
|
|
181
|
+
}
|
|
182
|
+
set entityType(value) {
|
|
183
|
+
this._entityType = value;
|
|
184
|
+
}
|
|
185
|
+
// Temporarily expose input value. Use with caution.
|
|
186
|
+
get entityTypeInput() {
|
|
187
|
+
return this._entityType;
|
|
188
|
+
}
|
|
189
|
+
// role - computed: false, optional: false, required: true
|
|
190
|
+
_role;
|
|
191
|
+
get role() {
|
|
192
|
+
return this.getStringAttribute('role');
|
|
193
|
+
}
|
|
194
|
+
set role(value) {
|
|
195
|
+
this._role = value;
|
|
196
|
+
}
|
|
197
|
+
// Temporarily expose input value. Use with caution.
|
|
198
|
+
get roleInput() {
|
|
199
|
+
return this._role;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
export class ApiTokenRolesList extends cdktf.ComplexList {
|
|
203
|
+
terraformResource;
|
|
204
|
+
terraformAttribute;
|
|
205
|
+
wrapsSet;
|
|
206
|
+
internalValue;
|
|
207
|
+
/**
|
|
208
|
+
* @param terraformResource The parent resource
|
|
209
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
210
|
+
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
|
|
211
|
+
*/
|
|
212
|
+
constructor(terraformResource, terraformAttribute, wrapsSet) {
|
|
213
|
+
super(terraformResource, terraformAttribute, wrapsSet);
|
|
214
|
+
this.terraformResource = terraformResource;
|
|
215
|
+
this.terraformAttribute = terraformAttribute;
|
|
216
|
+
this.wrapsSet = wrapsSet;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* @param index the index of the item to return
|
|
220
|
+
*/
|
|
221
|
+
get(index) {
|
|
222
|
+
return new ApiTokenRolesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
export function apiTokenUpdatedByToTerraform(struct) {
|
|
226
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
227
|
+
return struct;
|
|
228
|
+
}
|
|
229
|
+
if (cdktf.isComplexElement(struct)) {
|
|
230
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
231
|
+
}
|
|
232
|
+
return {};
|
|
233
|
+
}
|
|
234
|
+
export function apiTokenUpdatedByToHclTerraform(struct) {
|
|
235
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
236
|
+
return struct;
|
|
237
|
+
}
|
|
238
|
+
if (cdktf.isComplexElement(struct)) {
|
|
239
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
240
|
+
}
|
|
241
|
+
const attrs = {};
|
|
242
|
+
return attrs;
|
|
243
|
+
}
|
|
244
|
+
export class ApiTokenUpdatedByOutputReference extends cdktf.ComplexObject {
|
|
245
|
+
isEmptyObject = false;
|
|
246
|
+
/**
|
|
247
|
+
* @param terraformResource The parent resource
|
|
248
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
249
|
+
*/
|
|
250
|
+
constructor(terraformResource, terraformAttribute) {
|
|
251
|
+
super(terraformResource, terraformAttribute, false);
|
|
252
|
+
}
|
|
253
|
+
get internalValue() {
|
|
254
|
+
let hasAnyValues = this.isEmptyObject;
|
|
255
|
+
const internalValueResult = {};
|
|
256
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
257
|
+
}
|
|
258
|
+
set internalValue(value) {
|
|
259
|
+
if (value === undefined) {
|
|
260
|
+
this.isEmptyObject = false;
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
// api_token_name - computed: true, optional: false, required: false
|
|
267
|
+
get apiTokenName() {
|
|
268
|
+
return this.getStringAttribute('api_token_name');
|
|
269
|
+
}
|
|
270
|
+
// avatar_url - computed: true, optional: false, required: false
|
|
271
|
+
get avatarUrl() {
|
|
272
|
+
return this.getStringAttribute('avatar_url');
|
|
273
|
+
}
|
|
274
|
+
// full_name - computed: true, optional: false, required: false
|
|
275
|
+
get fullName() {
|
|
276
|
+
return this.getStringAttribute('full_name');
|
|
277
|
+
}
|
|
278
|
+
// id - computed: true, optional: false, required: false
|
|
279
|
+
get id() {
|
|
280
|
+
return this.getStringAttribute('id');
|
|
281
|
+
}
|
|
282
|
+
// subject_type - computed: true, optional: false, required: false
|
|
283
|
+
get subjectType() {
|
|
284
|
+
return this.getStringAttribute('subject_type');
|
|
285
|
+
}
|
|
286
|
+
// username - computed: true, optional: false, required: false
|
|
287
|
+
get username() {
|
|
288
|
+
return this.getStringAttribute('username');
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Represents a {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token astro_api_token}
|
|
293
|
+
*/
|
|
294
|
+
export class ApiToken extends cdktf.TerraformResource {
|
|
295
|
+
// =================
|
|
296
|
+
// STATIC PROPERTIES
|
|
297
|
+
// =================
|
|
298
|
+
static tfResourceType = "astro_api_token";
|
|
299
|
+
// ==============
|
|
300
|
+
// STATIC Methods
|
|
301
|
+
// ==============
|
|
302
|
+
/**
|
|
303
|
+
* Generates CDKTF code for importing a ApiToken resource upon running "cdktf plan <stack-name>"
|
|
304
|
+
* @param scope The scope in which to define this construct
|
|
305
|
+
* @param importToId The construct id used in the generated config for the ApiToken to import
|
|
306
|
+
* @param importFromId The id of the existing ApiToken that should be imported. Refer to the {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token#import import section} in the documentation of this resource for the id to use
|
|
307
|
+
* @param provider? Optional instance of the provider where the ApiToken to import is found
|
|
308
|
+
*/
|
|
309
|
+
static generateConfigForImport(scope, importToId, importFromId, provider) {
|
|
310
|
+
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "astro_api_token", importId: importFromId, provider });
|
|
311
|
+
}
|
|
312
|
+
// ===========
|
|
313
|
+
// INITIALIZER
|
|
314
|
+
// ===========
|
|
315
|
+
/**
|
|
316
|
+
* Create a new {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/api_token astro_api_token} Resource
|
|
317
|
+
*
|
|
318
|
+
* @param scope The scope in which to define this construct
|
|
319
|
+
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
|
|
320
|
+
* @param options ApiTokenConfig
|
|
321
|
+
*/
|
|
322
|
+
constructor(scope, id, config) {
|
|
323
|
+
super(scope, id, {
|
|
324
|
+
terraformResourceType: 'astro_api_token',
|
|
325
|
+
terraformGeneratorMetadata: {
|
|
326
|
+
providerName: 'astro',
|
|
327
|
+
providerVersion: '1.0.8',
|
|
328
|
+
providerVersionConstraint: '1.0.8'
|
|
329
|
+
},
|
|
330
|
+
provider: config.provider,
|
|
331
|
+
dependsOn: config.dependsOn,
|
|
332
|
+
count: config.count,
|
|
333
|
+
lifecycle: config.lifecycle,
|
|
334
|
+
provisioners: config.provisioners,
|
|
335
|
+
connection: config.connection,
|
|
336
|
+
forEach: config.forEach
|
|
337
|
+
});
|
|
338
|
+
this._description = config.description;
|
|
339
|
+
this._expiryPeriodInDays = config.expiryPeriodInDays;
|
|
340
|
+
this._name = config.name;
|
|
341
|
+
this._roles.internalValue = config.roles;
|
|
342
|
+
this._type = config.type;
|
|
343
|
+
}
|
|
344
|
+
// ==========
|
|
345
|
+
// ATTRIBUTES
|
|
346
|
+
// ==========
|
|
347
|
+
// created_at - computed: true, optional: false, required: false
|
|
348
|
+
get createdAt() {
|
|
349
|
+
return this.getStringAttribute('created_at');
|
|
350
|
+
}
|
|
351
|
+
// created_by - computed: true, optional: false, required: false
|
|
352
|
+
_createdBy = new ApiTokenCreatedByOutputReference(this, "created_by");
|
|
353
|
+
get createdBy() {
|
|
354
|
+
return this._createdBy;
|
|
355
|
+
}
|
|
356
|
+
// description - computed: false, optional: true, required: false
|
|
357
|
+
_description;
|
|
358
|
+
get description() {
|
|
359
|
+
return this.getStringAttribute('description');
|
|
360
|
+
}
|
|
361
|
+
set description(value) {
|
|
362
|
+
this._description = value;
|
|
363
|
+
}
|
|
364
|
+
resetDescription() {
|
|
365
|
+
this._description = undefined;
|
|
366
|
+
}
|
|
367
|
+
// Temporarily expose input value. Use with caution.
|
|
368
|
+
get descriptionInput() {
|
|
369
|
+
return this._description;
|
|
370
|
+
}
|
|
371
|
+
// end_at - computed: true, optional: false, required: false
|
|
372
|
+
get endAt() {
|
|
373
|
+
return this.getStringAttribute('end_at');
|
|
374
|
+
}
|
|
375
|
+
// expiry_period_in_days - computed: false, optional: true, required: false
|
|
376
|
+
_expiryPeriodInDays;
|
|
377
|
+
get expiryPeriodInDays() {
|
|
378
|
+
return this.getNumberAttribute('expiry_period_in_days');
|
|
379
|
+
}
|
|
380
|
+
set expiryPeriodInDays(value) {
|
|
381
|
+
this._expiryPeriodInDays = value;
|
|
382
|
+
}
|
|
383
|
+
resetExpiryPeriodInDays() {
|
|
384
|
+
this._expiryPeriodInDays = undefined;
|
|
385
|
+
}
|
|
386
|
+
// Temporarily expose input value. Use with caution.
|
|
387
|
+
get expiryPeriodInDaysInput() {
|
|
388
|
+
return this._expiryPeriodInDays;
|
|
389
|
+
}
|
|
390
|
+
// id - computed: true, optional: false, required: false
|
|
391
|
+
get id() {
|
|
392
|
+
return this.getStringAttribute('id');
|
|
393
|
+
}
|
|
394
|
+
// last_used_at - computed: true, optional: false, required: false
|
|
395
|
+
get lastUsedAt() {
|
|
396
|
+
return this.getStringAttribute('last_used_at');
|
|
397
|
+
}
|
|
398
|
+
// name - computed: false, optional: false, required: true
|
|
399
|
+
_name;
|
|
400
|
+
get name() {
|
|
401
|
+
return this.getStringAttribute('name');
|
|
402
|
+
}
|
|
403
|
+
set name(value) {
|
|
404
|
+
this._name = value;
|
|
405
|
+
}
|
|
406
|
+
// Temporarily expose input value. Use with caution.
|
|
407
|
+
get nameInput() {
|
|
408
|
+
return this._name;
|
|
409
|
+
}
|
|
410
|
+
// roles - computed: false, optional: false, required: true
|
|
411
|
+
_roles = new ApiTokenRolesList(this, "roles", true);
|
|
412
|
+
get roles() {
|
|
413
|
+
return this._roles;
|
|
414
|
+
}
|
|
415
|
+
putRoles(value) {
|
|
416
|
+
this._roles.internalValue = value;
|
|
417
|
+
}
|
|
418
|
+
// Temporarily expose input value. Use with caution.
|
|
419
|
+
get rolesInput() {
|
|
420
|
+
return this._roles.internalValue;
|
|
421
|
+
}
|
|
422
|
+
// short_token - computed: true, optional: false, required: false
|
|
423
|
+
get shortToken() {
|
|
424
|
+
return this.getStringAttribute('short_token');
|
|
425
|
+
}
|
|
426
|
+
// start_at - computed: true, optional: false, required: false
|
|
427
|
+
get startAt() {
|
|
428
|
+
return this.getStringAttribute('start_at');
|
|
429
|
+
}
|
|
430
|
+
// token - computed: true, optional: false, required: false
|
|
431
|
+
get token() {
|
|
432
|
+
return this.getStringAttribute('token');
|
|
433
|
+
}
|
|
434
|
+
// type - computed: false, optional: false, required: true
|
|
435
|
+
_type;
|
|
436
|
+
get type() {
|
|
437
|
+
return this.getStringAttribute('type');
|
|
438
|
+
}
|
|
439
|
+
set type(value) {
|
|
440
|
+
this._type = value;
|
|
441
|
+
}
|
|
442
|
+
// Temporarily expose input value. Use with caution.
|
|
443
|
+
get typeInput() {
|
|
444
|
+
return this._type;
|
|
445
|
+
}
|
|
446
|
+
// updated_at - computed: true, optional: false, required: false
|
|
447
|
+
get updatedAt() {
|
|
448
|
+
return this.getStringAttribute('updated_at');
|
|
449
|
+
}
|
|
450
|
+
// updated_by - computed: true, optional: false, required: false
|
|
451
|
+
_updatedBy = new ApiTokenUpdatedByOutputReference(this, "updated_by");
|
|
452
|
+
get updatedBy() {
|
|
453
|
+
return this._updatedBy;
|
|
454
|
+
}
|
|
455
|
+
// =========
|
|
456
|
+
// SYNTHESIS
|
|
457
|
+
// =========
|
|
458
|
+
synthesizeAttributes() {
|
|
459
|
+
return {
|
|
460
|
+
description: cdktf.stringToTerraform(this._description),
|
|
461
|
+
expiry_period_in_days: cdktf.numberToTerraform(this._expiryPeriodInDays),
|
|
462
|
+
name: cdktf.stringToTerraform(this._name),
|
|
463
|
+
roles: cdktf.listMapper(apiTokenRolesToTerraform, false)(this._roles.internalValue),
|
|
464
|
+
type: cdktf.stringToTerraform(this._type),
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
synthesizeHclAttributes() {
|
|
468
|
+
const attrs = {
|
|
469
|
+
description: {
|
|
470
|
+
value: cdktf.stringToHclTerraform(this._description),
|
|
471
|
+
isBlock: false,
|
|
472
|
+
type: "simple",
|
|
473
|
+
storageClassType: "string",
|
|
474
|
+
},
|
|
475
|
+
expiry_period_in_days: {
|
|
476
|
+
value: cdktf.numberToHclTerraform(this._expiryPeriodInDays),
|
|
477
|
+
isBlock: false,
|
|
478
|
+
type: "simple",
|
|
479
|
+
storageClassType: "number",
|
|
480
|
+
},
|
|
481
|
+
name: {
|
|
482
|
+
value: cdktf.stringToHclTerraform(this._name),
|
|
483
|
+
isBlock: false,
|
|
484
|
+
type: "simple",
|
|
485
|
+
storageClassType: "string",
|
|
486
|
+
},
|
|
487
|
+
roles: {
|
|
488
|
+
value: cdktf.listMapperHcl(apiTokenRolesToHclTerraform, false)(this._roles.internalValue),
|
|
489
|
+
isBlock: true,
|
|
490
|
+
type: "set",
|
|
491
|
+
storageClassType: "ApiTokenRolesList",
|
|
492
|
+
},
|
|
493
|
+
type: {
|
|
494
|
+
value: cdktf.stringToHclTerraform(this._type),
|
|
495
|
+
isBlock: false,
|
|
496
|
+
type: "simple",
|
|
497
|
+
storageClassType: "string",
|
|
498
|
+
},
|
|
499
|
+
};
|
|
500
|
+
// remove undefined attributes
|
|
501
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
|
|
502
|
+
}
|
|
503
|
+
}
|