pulumi-harness 0.8.0a1750480667__py3-none-any.whl → 0.8.0a1752731737__py3-none-any.whl

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.

Potentially problematic release.


This version of pulumi-harness might be problematic. Click here for more details.

@@ -27,13 +27,16 @@ class GetDelegatetokenResult:
27
27
  """
28
28
  A collection of values returned by getDelegatetoken.
29
29
  """
30
- def __init__(__self__, account_id=None, created_at=None, id=None, name=None, org_id=None, project_id=None, token_status=None, value=None):
30
+ def __init__(__self__, account_id=None, created_at=None, created_by=None, id=None, name=None, org_id=None, project_id=None, revoke_after=None, token_status=None, value=None):
31
31
  if account_id and not isinstance(account_id, str):
32
32
  raise TypeError("Expected argument 'account_id' to be a str")
33
33
  pulumi.set(__self__, "account_id", account_id)
34
34
  if created_at and not isinstance(created_at, int):
35
35
  raise TypeError("Expected argument 'created_at' to be a int")
36
36
  pulumi.set(__self__, "created_at", created_at)
37
+ if created_by and not isinstance(created_by, dict):
38
+ raise TypeError("Expected argument 'created_by' to be a dict")
39
+ pulumi.set(__self__, "created_by", created_by)
37
40
  if id and not isinstance(id, str):
38
41
  raise TypeError("Expected argument 'id' to be a str")
39
42
  pulumi.set(__self__, "id", id)
@@ -46,6 +49,9 @@ class GetDelegatetokenResult:
46
49
  if project_id and not isinstance(project_id, str):
47
50
  raise TypeError("Expected argument 'project_id' to be a str")
48
51
  pulumi.set(__self__, "project_id", project_id)
52
+ if revoke_after and not isinstance(revoke_after, int):
53
+ raise TypeError("Expected argument 'revoke_after' to be a int")
54
+ pulumi.set(__self__, "revoke_after", revoke_after)
49
55
  if token_status and not isinstance(token_status, str):
50
56
  raise TypeError("Expected argument 'token_status' to be a str")
51
57
  pulumi.set(__self__, "token_status", token_status)
@@ -63,12 +69,20 @@ class GetDelegatetokenResult:
63
69
 
64
70
  @property
65
71
  @pulumi.getter(name="createdAt")
66
- def created_at(self) -> Optional[builtins.int]:
72
+ def created_at(self) -> builtins.int:
67
73
  """
68
- Time when the delegate token is created.
74
+ Time when the delegate token is created. This is an epoch timestamp.
69
75
  """
70
76
  return pulumi.get(self, "created_at")
71
77
 
78
+ @property
79
+ @pulumi.getter(name="createdBy")
80
+ def created_by(self) -> Mapping[str, builtins.str]:
81
+ """
82
+ created by details
83
+ """
84
+ return pulumi.get(self, "created_by")
85
+
72
86
  @property
73
87
  @pulumi.getter
74
88
  def id(self) -> builtins.str:
@@ -81,7 +95,7 @@ class GetDelegatetokenResult:
81
95
  @pulumi.getter
82
96
  def name(self) -> builtins.str:
83
97
  """
84
- Name of the resource.
98
+ Name of the delegate token
85
99
  """
86
100
  return pulumi.get(self, "name")
87
101
 
@@ -89,7 +103,7 @@ class GetDelegatetokenResult:
89
103
  @pulumi.getter(name="orgId")
90
104
  def org_id(self) -> Optional[builtins.str]:
91
105
  """
92
- Unique identifier of the organization.
106
+ Org Identifier for the Entity
93
107
  """
94
108
  return pulumi.get(self, "org_id")
95
109
 
@@ -97,23 +111,31 @@ class GetDelegatetokenResult:
97
111
  @pulumi.getter(name="projectId")
98
112
  def project_id(self) -> Optional[builtins.str]:
99
113
  """
100
- Unique identifier of the project.
114
+ Project Identifier for the Entity
101
115
  """
102
116
  return pulumi.get(self, "project_id")
103
117
 
118
+ @property
119
+ @pulumi.getter(name="revokeAfter")
120
+ def revoke_after(self) -> builtins.int:
121
+ """
122
+ Epoch time in milliseconds after which the token will be marked as revoked. There can be a delay of up to one hour from the epoch value provided and actual revoking of the token.
123
+ """
124
+ return pulumi.get(self, "revoke_after")
125
+
104
126
  @property
105
127
  @pulumi.getter(name="tokenStatus")
106
128
  def token_status(self) -> Optional[builtins.str]:
107
129
  """
108
- Status of Delegate Token (ACTIVE or REVOKED). If left empty both active and revoked tokens will be assumed.
130
+ Status of Delegate Token (ACTIVE or REVOKED). If left empty both active and revoked tokens will be assumed
109
131
  """
110
132
  return pulumi.get(self, "token_status")
111
133
 
112
134
  @property
113
135
  @pulumi.getter
114
- def value(self) -> Optional[builtins.str]:
136
+ def value(self) -> builtins.str:
115
137
  """
116
- Value of the delegate Token
138
+ Value of the delegate token. Encoded in base64.
117
139
  """
118
140
  return pulumi.get(self, "value")
119
141
 
@@ -126,90 +148,124 @@ class AwaitableGetDelegatetokenResult(GetDelegatetokenResult):
126
148
  return GetDelegatetokenResult(
127
149
  account_id=self.account_id,
128
150
  created_at=self.created_at,
151
+ created_by=self.created_by,
129
152
  id=self.id,
130
153
  name=self.name,
131
154
  org_id=self.org_id,
132
155
  project_id=self.project_id,
156
+ revoke_after=self.revoke_after,
133
157
  token_status=self.token_status,
134
158
  value=self.value)
135
159
 
136
160
 
137
161
  def get_delegatetoken(account_id: Optional[builtins.str] = None,
138
- created_at: Optional[builtins.int] = None,
139
162
  name: Optional[builtins.str] = None,
140
163
  org_id: Optional[builtins.str] = None,
141
164
  project_id: Optional[builtins.str] = None,
142
165
  token_status: Optional[builtins.str] = None,
143
- value: Optional[builtins.str] = None,
144
166
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDelegatetokenResult:
145
167
  """
146
- Data Source for retrieving delegate tokens.
168
+ Data source for retrieving a Harness delegate Token.
169
+
170
+ ## Example Usage
171
+
172
+ ```python
173
+ import pulumi
174
+ import pulumi_harness as harness
175
+
176
+ # Look up a delegate token at account level by name
177
+ account_level = harness.platform.get_delegatetoken(name="account-delegate-token",
178
+ account_id="account_id")
179
+ # Look up a delegate token at organization level
180
+ org_level = harness.platform.get_delegatetoken(name="org-delegate-token",
181
+ account_id="account_id",
182
+ org_id="org_id")
183
+ # Look up a delegate token at project level
184
+ project_level = harness.platform.get_delegatetoken(name="project-delegate-token",
185
+ account_id="account_id",
186
+ org_id="org_id",
187
+ project_id="project_id")
188
+ ```
147
189
 
148
190
 
149
191
  :param builtins.str account_id: Account Identifier for the Entity
150
- :param builtins.int created_at: Time when the delegate token is created.
151
- :param builtins.str name: Name of the resource.
152
- :param builtins.str org_id: Unique identifier of the organization.
153
- :param builtins.str project_id: Unique identifier of the project.
154
- :param builtins.str token_status: Status of Delegate Token (ACTIVE or REVOKED). If left empty both active and revoked tokens will be assumed.
155
- :param builtins.str value: Value of the delegate Token
192
+ :param builtins.str name: Name of the delegate token
193
+ :param builtins.str org_id: Org Identifier for the Entity
194
+ :param builtins.str project_id: Project Identifier for the Entity
195
+ :param builtins.str token_status: Status of Delegate Token (ACTIVE or REVOKED). If left empty both active and revoked tokens will be assumed
156
196
  """
157
197
  __args__ = dict()
158
198
  __args__['accountId'] = account_id
159
- __args__['createdAt'] = created_at
160
199
  __args__['name'] = name
161
200
  __args__['orgId'] = org_id
162
201
  __args__['projectId'] = project_id
163
202
  __args__['tokenStatus'] = token_status
164
- __args__['value'] = value
165
203
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
166
204
  __ret__ = pulumi.runtime.invoke('harness:platform/getDelegatetoken:getDelegatetoken', __args__, opts=opts, typ=GetDelegatetokenResult).value
167
205
 
168
206
  return AwaitableGetDelegatetokenResult(
169
207
  account_id=pulumi.get(__ret__, 'account_id'),
170
208
  created_at=pulumi.get(__ret__, 'created_at'),
209
+ created_by=pulumi.get(__ret__, 'created_by'),
171
210
  id=pulumi.get(__ret__, 'id'),
172
211
  name=pulumi.get(__ret__, 'name'),
173
212
  org_id=pulumi.get(__ret__, 'org_id'),
174
213
  project_id=pulumi.get(__ret__, 'project_id'),
214
+ revoke_after=pulumi.get(__ret__, 'revoke_after'),
175
215
  token_status=pulumi.get(__ret__, 'token_status'),
176
216
  value=pulumi.get(__ret__, 'value'))
177
217
  def get_delegatetoken_output(account_id: Optional[pulumi.Input[builtins.str]] = None,
178
- created_at: Optional[pulumi.Input[Optional[builtins.int]]] = None,
179
218
  name: Optional[pulumi.Input[builtins.str]] = None,
180
219
  org_id: Optional[pulumi.Input[Optional[builtins.str]]] = None,
181
220
  project_id: Optional[pulumi.Input[Optional[builtins.str]]] = None,
182
221
  token_status: Optional[pulumi.Input[Optional[builtins.str]]] = None,
183
- value: Optional[pulumi.Input[Optional[builtins.str]]] = None,
184
222
  opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDelegatetokenResult]:
185
223
  """
186
- Data Source for retrieving delegate tokens.
224
+ Data source for retrieving a Harness delegate Token.
225
+
226
+ ## Example Usage
227
+
228
+ ```python
229
+ import pulumi
230
+ import pulumi_harness as harness
231
+
232
+ # Look up a delegate token at account level by name
233
+ account_level = harness.platform.get_delegatetoken(name="account-delegate-token",
234
+ account_id="account_id")
235
+ # Look up a delegate token at organization level
236
+ org_level = harness.platform.get_delegatetoken(name="org-delegate-token",
237
+ account_id="account_id",
238
+ org_id="org_id")
239
+ # Look up a delegate token at project level
240
+ project_level = harness.platform.get_delegatetoken(name="project-delegate-token",
241
+ account_id="account_id",
242
+ org_id="org_id",
243
+ project_id="project_id")
244
+ ```
187
245
 
188
246
 
189
247
  :param builtins.str account_id: Account Identifier for the Entity
190
- :param builtins.int created_at: Time when the delegate token is created.
191
- :param builtins.str name: Name of the resource.
192
- :param builtins.str org_id: Unique identifier of the organization.
193
- :param builtins.str project_id: Unique identifier of the project.
194
- :param builtins.str token_status: Status of Delegate Token (ACTIVE or REVOKED). If left empty both active and revoked tokens will be assumed.
195
- :param builtins.str value: Value of the delegate Token
248
+ :param builtins.str name: Name of the delegate token
249
+ :param builtins.str org_id: Org Identifier for the Entity
250
+ :param builtins.str project_id: Project Identifier for the Entity
251
+ :param builtins.str token_status: Status of Delegate Token (ACTIVE or REVOKED). If left empty both active and revoked tokens will be assumed
196
252
  """
197
253
  __args__ = dict()
198
254
  __args__['accountId'] = account_id
199
- __args__['createdAt'] = created_at
200
255
  __args__['name'] = name
201
256
  __args__['orgId'] = org_id
202
257
  __args__['projectId'] = project_id
203
258
  __args__['tokenStatus'] = token_status
204
- __args__['value'] = value
205
259
  opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
206
260
  __ret__ = pulumi.runtime.invoke_output('harness:platform/getDelegatetoken:getDelegatetoken', __args__, opts=opts, typ=GetDelegatetokenResult)
207
261
  return __ret__.apply(lambda __response__: GetDelegatetokenResult(
208
262
  account_id=pulumi.get(__response__, 'account_id'),
209
263
  created_at=pulumi.get(__response__, 'created_at'),
264
+ created_by=pulumi.get(__response__, 'created_by'),
210
265
  id=pulumi.get(__response__, 'id'),
211
266
  name=pulumi.get(__response__, 'name'),
212
267
  org_id=pulumi.get(__response__, 'org_id'),
213
268
  project_id=pulumi.get(__response__, 'project_id'),
269
+ revoke_after=pulumi.get(__response__, 'revoke_after'),
214
270
  token_status=pulumi.get(__response__, 'token_status'),
215
271
  value=pulumi.get(__response__, 'value')))
@@ -29,7 +29,7 @@ class GetWorkspaceResult:
29
29
  """
30
30
  A collection of values returned by getWorkspace.
31
31
  """
32
- def __init__(__self__, connectors=None, cost_estimation_enabled=None, default_pipelines=None, description=None, environment_variables=None, id=None, identifier=None, name=None, org_id=None, project_id=None, provider_connector=None, provisioner_type=None, provisioner_version=None, repository=None, repository_branch=None, repository_commit=None, repository_connector=None, repository_path=None, repository_sha=None, terraform_variable_files=None, terraform_variables=None, variable_sets=None):
32
+ def __init__(__self__, connectors=None, cost_estimation_enabled=None, default_pipelines=None, description=None, environment_variables=None, id=None, identifier=None, name=None, org_id=None, project_id=None, provider_connector=None, provisioner_type=None, provisioner_version=None, repository=None, repository_branch=None, repository_commit=None, repository_connector=None, repository_path=None, repository_sha=None, tags=None, terraform_variable_files=None, terraform_variables=None, variable_sets=None):
33
33
  if connectors and not isinstance(connectors, list):
34
34
  raise TypeError("Expected argument 'connectors' to be a list")
35
35
  pulumi.set(__self__, "connectors", connectors)
@@ -87,6 +87,9 @@ class GetWorkspaceResult:
87
87
  if repository_sha and not isinstance(repository_sha, str):
88
88
  raise TypeError("Expected argument 'repository_sha' to be a str")
89
89
  pulumi.set(__self__, "repository_sha", repository_sha)
90
+ if tags and not isinstance(tags, list):
91
+ raise TypeError("Expected argument 'tags' to be a list")
92
+ pulumi.set(__self__, "tags", tags)
90
93
  if terraform_variable_files and not isinstance(terraform_variable_files, list):
91
94
  raise TypeError("Expected argument 'terraform_variable_files' to be a list")
92
95
  pulumi.set(__self__, "terraform_variable_files", terraform_variable_files)
@@ -249,6 +252,11 @@ class GetWorkspaceResult:
249
252
  """
250
253
  return pulumi.get(self, "repository_sha")
251
254
 
255
+ @property
256
+ @pulumi.getter
257
+ def tags(self) -> Optional[Sequence[builtins.str]]:
258
+ return pulumi.get(self, "tags")
259
+
252
260
  @property
253
261
  @pulumi.getter(name="terraformVariableFiles")
254
262
  def terraform_variable_files(self) -> Sequence['outputs.GetWorkspaceTerraformVariableFileResult']:
@@ -293,6 +301,7 @@ class AwaitableGetWorkspaceResult(GetWorkspaceResult):
293
301
  repository_connector=self.repository_connector,
294
302
  repository_path=self.repository_path,
295
303
  repository_sha=self.repository_sha,
304
+ tags=self.tags,
296
305
  terraform_variable_files=self.terraform_variable_files,
297
306
  terraform_variables=self.terraform_variables,
298
307
  variable_sets=self.variable_sets)
@@ -307,6 +316,7 @@ def get_workspace(connectors: Optional[Sequence[Union['GetWorkspaceConnectorArgs
307
316
  repository_branch: Optional[builtins.str] = None,
308
317
  repository_commit: Optional[builtins.str] = None,
309
318
  repository_sha: Optional[builtins.str] = None,
319
+ tags: Optional[Sequence[builtins.str]] = None,
310
320
  terraform_variable_files: Optional[Sequence[Union['GetWorkspaceTerraformVariableFileArgs', 'GetWorkspaceTerraformVariableFileArgsDict']]] = None,
311
321
  terraform_variables: Optional[Sequence[Union['GetWorkspaceTerraformVariableArgs', 'GetWorkspaceTerraformVariableArgsDict']]] = None,
312
322
  variable_sets: Optional[Sequence[builtins.str]] = None,
@@ -347,6 +357,7 @@ def get_workspace(connectors: Optional[Sequence[Union['GetWorkspaceConnectorArgs
347
357
  __args__['repositoryBranch'] = repository_branch
348
358
  __args__['repositoryCommit'] = repository_commit
349
359
  __args__['repositorySha'] = repository_sha
360
+ __args__['tags'] = tags
350
361
  __args__['terraformVariableFiles'] = terraform_variable_files
351
362
  __args__['terraformVariables'] = terraform_variables
352
363
  __args__['variableSets'] = variable_sets
@@ -373,6 +384,7 @@ def get_workspace(connectors: Optional[Sequence[Union['GetWorkspaceConnectorArgs
373
384
  repository_connector=pulumi.get(__ret__, 'repository_connector'),
374
385
  repository_path=pulumi.get(__ret__, 'repository_path'),
375
386
  repository_sha=pulumi.get(__ret__, 'repository_sha'),
387
+ tags=pulumi.get(__ret__, 'tags'),
376
388
  terraform_variable_files=pulumi.get(__ret__, 'terraform_variable_files'),
377
389
  terraform_variables=pulumi.get(__ret__, 'terraform_variables'),
378
390
  variable_sets=pulumi.get(__ret__, 'variable_sets'))
@@ -385,6 +397,7 @@ def get_workspace_output(connectors: Optional[pulumi.Input[Optional[Sequence[Uni
385
397
  repository_branch: Optional[pulumi.Input[Optional[builtins.str]]] = None,
386
398
  repository_commit: Optional[pulumi.Input[Optional[builtins.str]]] = None,
387
399
  repository_sha: Optional[pulumi.Input[Optional[builtins.str]]] = None,
400
+ tags: Optional[pulumi.Input[Optional[Sequence[builtins.str]]]] = None,
388
401
  terraform_variable_files: Optional[pulumi.Input[Optional[Sequence[Union['GetWorkspaceTerraformVariableFileArgs', 'GetWorkspaceTerraformVariableFileArgsDict']]]]] = None,
389
402
  terraform_variables: Optional[pulumi.Input[Optional[Sequence[Union['GetWorkspaceTerraformVariableArgs', 'GetWorkspaceTerraformVariableArgsDict']]]]] = None,
390
403
  variable_sets: Optional[pulumi.Input[Optional[Sequence[builtins.str]]]] = None,
@@ -425,6 +438,7 @@ def get_workspace_output(connectors: Optional[pulumi.Input[Optional[Sequence[Uni
425
438
  __args__['repositoryBranch'] = repository_branch
426
439
  __args__['repositoryCommit'] = repository_commit
427
440
  __args__['repositorySha'] = repository_sha
441
+ __args__['tags'] = tags
428
442
  __args__['terraformVariableFiles'] = terraform_variable_files
429
443
  __args__['terraformVariables'] = terraform_variables
430
444
  __args__['variableSets'] = variable_sets
@@ -450,6 +464,7 @@ def get_workspace_output(connectors: Optional[pulumi.Input[Optional[Sequence[Uni
450
464
  repository_connector=pulumi.get(__response__, 'repository_connector'),
451
465
  repository_path=pulumi.get(__response__, 'repository_path'),
452
466
  repository_sha=pulumi.get(__response__, 'repository_sha'),
467
+ tags=pulumi.get(__response__, 'tags'),
453
468
  terraform_variable_files=pulumi.get(__response__, 'terraform_variable_files'),
454
469
  terraform_variables=pulumi.get(__response__, 'terraform_variables'),
455
470
  variable_sets=pulumi.get(__response__, 'variable_sets')))