pulumi-gcp 8.7.0a1730183903__py3-none-any.whl → 8.7.0a1730196225__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.
Files changed (111) hide show
  1. pulumi_gcp/__init__.py +70 -0
  2. pulumi_gcp/accesscontextmanager/service_perimeter.py +2 -0
  3. pulumi_gcp/accesscontextmanager/service_perimeter_dry_run_egress_policy.py +4 -0
  4. pulumi_gcp/accesscontextmanager/service_perimeter_dry_run_ingress_policy.py +4 -0
  5. pulumi_gcp/accesscontextmanager/service_perimeter_egress_policy.py +4 -0
  6. pulumi_gcp/accesscontextmanager/service_perimeter_ingress_policy.py +4 -0
  7. pulumi_gcp/accesscontextmanager/service_perimeters.py +2 -0
  8. pulumi_gcp/apigee/__init__.py +2 -0
  9. pulumi_gcp/apigee/_inputs.py +108 -0
  10. pulumi_gcp/apigee/app_group.py +811 -0
  11. pulumi_gcp/apigee/developer.py +757 -0
  12. pulumi_gcp/apigee/outputs.py +64 -0
  13. pulumi_gcp/artifactregistry/get_docker_image.py +40 -0
  14. pulumi_gcp/bigquery/connection.py +12 -12
  15. pulumi_gcp/bigquery/job.py +6 -6
  16. pulumi_gcp/cloudrunv2/get_service.py +12 -1
  17. pulumi_gcp/cloudrunv2/service.py +92 -0
  18. pulumi_gcp/compute/_inputs.py +214 -116
  19. pulumi_gcp/compute/backend_service.py +76 -0
  20. pulumi_gcp/compute/get_backend_service.py +12 -1
  21. pulumi_gcp/compute/get_instance.py +29 -1
  22. pulumi_gcp/compute/get_instance_template.py +29 -1
  23. pulumi_gcp/compute/get_region_instance_group_manager.py +0 -18
  24. pulumi_gcp/compute/get_region_instance_template.py +29 -1
  25. pulumi_gcp/compute/instance.py +89 -0
  26. pulumi_gcp/compute/instance_from_machine_image.py +82 -0
  27. pulumi_gcp/compute/instance_from_template.py +82 -0
  28. pulumi_gcp/compute/instance_template.py +75 -0
  29. pulumi_gcp/compute/network_firewall_policy_association.py +76 -50
  30. pulumi_gcp/compute/network_firewall_policy_rule.py +149 -103
  31. pulumi_gcp/compute/outputs.py +170 -80
  32. pulumi_gcp/compute/region_backend_service.py +94 -0
  33. pulumi_gcp/compute/region_instance_template.py +75 -0
  34. pulumi_gcp/compute/region_network_endpoint_group.py +6 -4
  35. pulumi_gcp/compute/region_network_firewall_policy_association.py +104 -54
  36. pulumi_gcp/compute/region_network_firewall_policy_rule.py +160 -107
  37. pulumi_gcp/config/__init__.pyi +4 -0
  38. pulumi_gcp/config/vars.py +8 -0
  39. pulumi_gcp/container/attached_cluster.py +9 -6
  40. pulumi_gcp/container/outputs.py +2 -2
  41. pulumi_gcp/datastream/stream.py +2 -2
  42. pulumi_gcp/diagflow/_inputs.py +472 -2
  43. pulumi_gcp/diagflow/cx_agent.py +64 -4
  44. pulumi_gcp/diagflow/cx_flow.py +30 -0
  45. pulumi_gcp/diagflow/outputs.py +378 -2
  46. pulumi_gcp/gkehub/feature.py +2 -4
  47. pulumi_gcp/iam/workload_identity_pool_provider.py +56 -0
  48. pulumi_gcp/looker/instance.py +104 -2
  49. pulumi_gcp/monitoring/_inputs.py +23 -0
  50. pulumi_gcp/monitoring/get_secret_version.py +22 -3
  51. pulumi_gcp/monitoring/outputs.py +16 -0
  52. pulumi_gcp/networkconnectivity/__init__.py +1 -0
  53. pulumi_gcp/networkconnectivity/_inputs.py +148 -0
  54. pulumi_gcp/networkconnectivity/group.py +764 -0
  55. pulumi_gcp/networkconnectivity/outputs.py +125 -0
  56. pulumi_gcp/networkconnectivity/spoke.py +144 -0
  57. pulumi_gcp/networksecurity/server_tls_policy.py +2 -2
  58. pulumi_gcp/oracledatabase/__init__.py +20 -0
  59. pulumi_gcp/oracledatabase/_inputs.py +4745 -0
  60. pulumi_gcp/oracledatabase/autonomous_database.py +983 -0
  61. pulumi_gcp/oracledatabase/cloud_exadata_infrastructure.py +842 -0
  62. pulumi_gcp/oracledatabase/cloud_vm_cluster.py +1086 -0
  63. pulumi_gcp/oracledatabase/get_autonomous_database.py +290 -0
  64. pulumi_gcp/oracledatabase/get_autonomous_databases.py +150 -0
  65. pulumi_gcp/oracledatabase/get_cloud_exadata_infrastructure.py +257 -0
  66. pulumi_gcp/oracledatabase/get_cloud_exadata_infrastructures.py +150 -0
  67. pulumi_gcp/oracledatabase/get_cloud_vm_cluster.py +290 -0
  68. pulumi_gcp/oracledatabase/get_cloud_vm_clusters.py +150 -0
  69. pulumi_gcp/oracledatabase/get_db_nodes.py +245 -0
  70. pulumi_gcp/oracledatabase/get_db_servers.py +245 -0
  71. pulumi_gcp/oracledatabase/outputs.py +9304 -0
  72. pulumi_gcp/organizations/folder.py +7 -7
  73. pulumi_gcp/organizations/project.py +7 -7
  74. pulumi_gcp/orgpolicy/_inputs.py +3 -3
  75. pulumi_gcp/orgpolicy/outputs.py +2 -2
  76. pulumi_gcp/privilegedaccessmanager/get_entitlement.py +46 -2
  77. pulumi_gcp/provider.py +40 -0
  78. pulumi_gcp/pulumi-plugin.json +1 -1
  79. pulumi_gcp/secretmanager/get_regional_secret_version.py +24 -5
  80. pulumi_gcp/secretmanager/get_regional_secret_version_access.py +24 -5
  81. pulumi_gcp/secretmanager/get_secret_version.py +22 -3
  82. pulumi_gcp/secretmanager/get_secret_version_access.py +22 -3
  83. pulumi_gcp/secretmanager/regional_secret.py +2 -2
  84. pulumi_gcp/siteverification/get_token.py +0 -16
  85. pulumi_gcp/siteverification/owner.py +0 -16
  86. pulumi_gcp/spanner/_inputs.py +29 -5
  87. pulumi_gcp/spanner/outputs.py +20 -3
  88. pulumi_gcp/sql/_inputs.py +6 -6
  89. pulumi_gcp/sql/outputs.py +4 -4
  90. pulumi_gcp/sql/user.py +28 -21
  91. pulumi_gcp/storage/_inputs.py +36 -0
  92. pulumi_gcp/storage/bucket.py +47 -0
  93. pulumi_gcp/storage/get_bucket.py +12 -1
  94. pulumi_gcp/storage/outputs.py +40 -0
  95. pulumi_gcp/transcoder/__init__.py +11 -0
  96. pulumi_gcp/transcoder/_inputs.py +3991 -0
  97. pulumi_gcp/transcoder/job.py +2134 -0
  98. pulumi_gcp/transcoder/job_template.py +1524 -0
  99. pulumi_gcp/transcoder/outputs.py +2918 -0
  100. pulumi_gcp/vertex/ai_deployment_resource_pool.py +2 -2
  101. pulumi_gcp/vmwareengine/_inputs.py +440 -0
  102. pulumi_gcp/vmwareengine/cluster.py +100 -2
  103. pulumi_gcp/vmwareengine/get_cluster.py +12 -1
  104. pulumi_gcp/vmwareengine/outputs.py +615 -0
  105. pulumi_gcp/workstations/_inputs.py +54 -0
  106. pulumi_gcp/workstations/outputs.py +32 -0
  107. pulumi_gcp/workstations/workstation_config.py +205 -0
  108. {pulumi_gcp-8.7.0a1730183903.dist-info → pulumi_gcp-8.7.0a1730196225.dist-info}/METADATA +1 -1
  109. {pulumi_gcp-8.7.0a1730183903.dist-info → pulumi_gcp-8.7.0a1730196225.dist-info}/RECORD +111 -89
  110. {pulumi_gcp-8.7.0a1730183903.dist-info → pulumi_gcp-8.7.0a1730196225.dist-info}/WHEEL +1 -1
  111. {pulumi_gcp-8.7.0a1730183903.dist-info → pulumi_gcp-8.7.0a1730196225.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,2134 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import copy
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from .. import _utilities
16
+ from . import outputs
17
+ from ._inputs import *
18
+
19
+ __all__ = ['JobArgs', 'Job']
20
+
21
+ @pulumi.input_type
22
+ class JobArgs:
23
+ def __init__(__self__, *,
24
+ location: pulumi.Input[str],
25
+ config: Optional[pulumi.Input['JobConfigArgs']] = None,
26
+ labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
27
+ project: Optional[pulumi.Input[str]] = None,
28
+ template_id: Optional[pulumi.Input[str]] = None):
29
+ """
30
+ The set of arguments for constructing a Job resource.
31
+ :param pulumi.Input[str] location: The location of the transcoding job resource.
32
+
33
+
34
+ - - -
35
+ :param pulumi.Input['JobConfigArgs'] config: The configuration for this template.
36
+ Structure is documented below.
37
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: The labels associated with this job. You can use these to organize and group your jobs.
38
+
39
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
40
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
41
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
42
+ If it is not provided, the provider project is used.
43
+ :param pulumi.Input[str] template_id: Specify the templateId to use for populating Job.config.
44
+ The default is preset/web-hd, which is the only supported preset.
45
+ """
46
+ pulumi.set(__self__, "location", location)
47
+ if config is not None:
48
+ pulumi.set(__self__, "config", config)
49
+ if labels is not None:
50
+ pulumi.set(__self__, "labels", labels)
51
+ if project is not None:
52
+ pulumi.set(__self__, "project", project)
53
+ if template_id is not None:
54
+ pulumi.set(__self__, "template_id", template_id)
55
+
56
+ @property
57
+ @pulumi.getter
58
+ def location(self) -> pulumi.Input[str]:
59
+ """
60
+ The location of the transcoding job resource.
61
+
62
+
63
+ - - -
64
+ """
65
+ return pulumi.get(self, "location")
66
+
67
+ @location.setter
68
+ def location(self, value: pulumi.Input[str]):
69
+ pulumi.set(self, "location", value)
70
+
71
+ @property
72
+ @pulumi.getter
73
+ def config(self) -> Optional[pulumi.Input['JobConfigArgs']]:
74
+ """
75
+ The configuration for this template.
76
+ Structure is documented below.
77
+ """
78
+ return pulumi.get(self, "config")
79
+
80
+ @config.setter
81
+ def config(self, value: Optional[pulumi.Input['JobConfigArgs']]):
82
+ pulumi.set(self, "config", value)
83
+
84
+ @property
85
+ @pulumi.getter
86
+ def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
87
+ """
88
+ The labels associated with this job. You can use these to organize and group your jobs.
89
+
90
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
91
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
92
+ """
93
+ return pulumi.get(self, "labels")
94
+
95
+ @labels.setter
96
+ def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
97
+ pulumi.set(self, "labels", value)
98
+
99
+ @property
100
+ @pulumi.getter
101
+ def project(self) -> Optional[pulumi.Input[str]]:
102
+ """
103
+ The ID of the project in which the resource belongs.
104
+ If it is not provided, the provider project is used.
105
+ """
106
+ return pulumi.get(self, "project")
107
+
108
+ @project.setter
109
+ def project(self, value: Optional[pulumi.Input[str]]):
110
+ pulumi.set(self, "project", value)
111
+
112
+ @property
113
+ @pulumi.getter(name="templateId")
114
+ def template_id(self) -> Optional[pulumi.Input[str]]:
115
+ """
116
+ Specify the templateId to use for populating Job.config.
117
+ The default is preset/web-hd, which is the only supported preset.
118
+ """
119
+ return pulumi.get(self, "template_id")
120
+
121
+ @template_id.setter
122
+ def template_id(self, value: Optional[pulumi.Input[str]]):
123
+ pulumi.set(self, "template_id", value)
124
+
125
+
126
+ @pulumi.input_type
127
+ class _JobState:
128
+ def __init__(__self__, *,
129
+ config: Optional[pulumi.Input['JobConfigArgs']] = None,
130
+ create_time: Optional[pulumi.Input[str]] = None,
131
+ effective_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
132
+ end_time: Optional[pulumi.Input[str]] = None,
133
+ labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
134
+ location: Optional[pulumi.Input[str]] = None,
135
+ name: Optional[pulumi.Input[str]] = None,
136
+ project: Optional[pulumi.Input[str]] = None,
137
+ pulumi_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
138
+ start_time: Optional[pulumi.Input[str]] = None,
139
+ state: Optional[pulumi.Input[str]] = None,
140
+ template_id: Optional[pulumi.Input[str]] = None):
141
+ """
142
+ Input properties used for looking up and filtering Job resources.
143
+ :param pulumi.Input['JobConfigArgs'] config: The configuration for this template.
144
+ Structure is documented below.
145
+ :param pulumi.Input[str] create_time: The time the job was created.
146
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] effective_labels: All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
147
+ :param pulumi.Input[str] end_time: The time the transcoding finished.
148
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: The labels associated with this job. You can use these to organize and group your jobs.
149
+
150
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
151
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
152
+ :param pulumi.Input[str] location: The location of the transcoding job resource.
153
+
154
+
155
+ - - -
156
+ :param pulumi.Input[str] name: The resource name of the job.
157
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
158
+ If it is not provided, the provider project is used.
159
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] pulumi_labels: The combination of labels configured directly on the resource
160
+ and default labels configured on the provider.
161
+ :param pulumi.Input[str] start_time: The time the transcoding started.
162
+ :param pulumi.Input[str] state: The current state of the job.
163
+ :param pulumi.Input[str] template_id: Specify the templateId to use for populating Job.config.
164
+ The default is preset/web-hd, which is the only supported preset.
165
+ """
166
+ if config is not None:
167
+ pulumi.set(__self__, "config", config)
168
+ if create_time is not None:
169
+ pulumi.set(__self__, "create_time", create_time)
170
+ if effective_labels is not None:
171
+ pulumi.set(__self__, "effective_labels", effective_labels)
172
+ if end_time is not None:
173
+ pulumi.set(__self__, "end_time", end_time)
174
+ if labels is not None:
175
+ pulumi.set(__self__, "labels", labels)
176
+ if location is not None:
177
+ pulumi.set(__self__, "location", location)
178
+ if name is not None:
179
+ pulumi.set(__self__, "name", name)
180
+ if project is not None:
181
+ pulumi.set(__self__, "project", project)
182
+ if pulumi_labels is not None:
183
+ pulumi.set(__self__, "pulumi_labels", pulumi_labels)
184
+ if start_time is not None:
185
+ pulumi.set(__self__, "start_time", start_time)
186
+ if state is not None:
187
+ pulumi.set(__self__, "state", state)
188
+ if template_id is not None:
189
+ pulumi.set(__self__, "template_id", template_id)
190
+
191
+ @property
192
+ @pulumi.getter
193
+ def config(self) -> Optional[pulumi.Input['JobConfigArgs']]:
194
+ """
195
+ The configuration for this template.
196
+ Structure is documented below.
197
+ """
198
+ return pulumi.get(self, "config")
199
+
200
+ @config.setter
201
+ def config(self, value: Optional[pulumi.Input['JobConfigArgs']]):
202
+ pulumi.set(self, "config", value)
203
+
204
+ @property
205
+ @pulumi.getter(name="createTime")
206
+ def create_time(self) -> Optional[pulumi.Input[str]]:
207
+ """
208
+ The time the job was created.
209
+ """
210
+ return pulumi.get(self, "create_time")
211
+
212
+ @create_time.setter
213
+ def create_time(self, value: Optional[pulumi.Input[str]]):
214
+ pulumi.set(self, "create_time", value)
215
+
216
+ @property
217
+ @pulumi.getter(name="effectiveLabels")
218
+ def effective_labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
219
+ """
220
+ All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
221
+ """
222
+ return pulumi.get(self, "effective_labels")
223
+
224
+ @effective_labels.setter
225
+ def effective_labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
226
+ pulumi.set(self, "effective_labels", value)
227
+
228
+ @property
229
+ @pulumi.getter(name="endTime")
230
+ def end_time(self) -> Optional[pulumi.Input[str]]:
231
+ """
232
+ The time the transcoding finished.
233
+ """
234
+ return pulumi.get(self, "end_time")
235
+
236
+ @end_time.setter
237
+ def end_time(self, value: Optional[pulumi.Input[str]]):
238
+ pulumi.set(self, "end_time", value)
239
+
240
+ @property
241
+ @pulumi.getter
242
+ def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
243
+ """
244
+ The labels associated with this job. You can use these to organize and group your jobs.
245
+
246
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
247
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
248
+ """
249
+ return pulumi.get(self, "labels")
250
+
251
+ @labels.setter
252
+ def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
253
+ pulumi.set(self, "labels", value)
254
+
255
+ @property
256
+ @pulumi.getter
257
+ def location(self) -> Optional[pulumi.Input[str]]:
258
+ """
259
+ The location of the transcoding job resource.
260
+
261
+
262
+ - - -
263
+ """
264
+ return pulumi.get(self, "location")
265
+
266
+ @location.setter
267
+ def location(self, value: Optional[pulumi.Input[str]]):
268
+ pulumi.set(self, "location", value)
269
+
270
+ @property
271
+ @pulumi.getter
272
+ def name(self) -> Optional[pulumi.Input[str]]:
273
+ """
274
+ The resource name of the job.
275
+ """
276
+ return pulumi.get(self, "name")
277
+
278
+ @name.setter
279
+ def name(self, value: Optional[pulumi.Input[str]]):
280
+ pulumi.set(self, "name", value)
281
+
282
+ @property
283
+ @pulumi.getter
284
+ def project(self) -> Optional[pulumi.Input[str]]:
285
+ """
286
+ The ID of the project in which the resource belongs.
287
+ If it is not provided, the provider project is used.
288
+ """
289
+ return pulumi.get(self, "project")
290
+
291
+ @project.setter
292
+ def project(self, value: Optional[pulumi.Input[str]]):
293
+ pulumi.set(self, "project", value)
294
+
295
+ @property
296
+ @pulumi.getter(name="pulumiLabels")
297
+ def pulumi_labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
298
+ """
299
+ The combination of labels configured directly on the resource
300
+ and default labels configured on the provider.
301
+ """
302
+ return pulumi.get(self, "pulumi_labels")
303
+
304
+ @pulumi_labels.setter
305
+ def pulumi_labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
306
+ pulumi.set(self, "pulumi_labels", value)
307
+
308
+ @property
309
+ @pulumi.getter(name="startTime")
310
+ def start_time(self) -> Optional[pulumi.Input[str]]:
311
+ """
312
+ The time the transcoding started.
313
+ """
314
+ return pulumi.get(self, "start_time")
315
+
316
+ @start_time.setter
317
+ def start_time(self, value: Optional[pulumi.Input[str]]):
318
+ pulumi.set(self, "start_time", value)
319
+
320
+ @property
321
+ @pulumi.getter
322
+ def state(self) -> Optional[pulumi.Input[str]]:
323
+ """
324
+ The current state of the job.
325
+ """
326
+ return pulumi.get(self, "state")
327
+
328
+ @state.setter
329
+ def state(self, value: Optional[pulumi.Input[str]]):
330
+ pulumi.set(self, "state", value)
331
+
332
+ @property
333
+ @pulumi.getter(name="templateId")
334
+ def template_id(self) -> Optional[pulumi.Input[str]]:
335
+ """
336
+ Specify the templateId to use for populating Job.config.
337
+ The default is preset/web-hd, which is the only supported preset.
338
+ """
339
+ return pulumi.get(self, "template_id")
340
+
341
+ @template_id.setter
342
+ def template_id(self, value: Optional[pulumi.Input[str]]):
343
+ pulumi.set(self, "template_id", value)
344
+
345
+
346
+ class Job(pulumi.CustomResource):
347
+ @overload
348
+ def __init__(__self__,
349
+ resource_name: str,
350
+ opts: Optional[pulumi.ResourceOptions] = None,
351
+ config: Optional[pulumi.Input[Union['JobConfigArgs', 'JobConfigArgsDict']]] = None,
352
+ labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
353
+ location: Optional[pulumi.Input[str]] = None,
354
+ project: Optional[pulumi.Input[str]] = None,
355
+ template_id: Optional[pulumi.Input[str]] = None,
356
+ __props__=None):
357
+ """
358
+ Transcoding Job Resource
359
+
360
+ To get more information about Job, see:
361
+
362
+ * [API documentation](https://cloud.google.com/transcoder/docs/reference/rest/v1/projects.locations.jobs)
363
+ * How-to Guides
364
+ * [Transcoder](https://cloud.google.com/transcoder/docs/)
365
+
366
+ ## Example Usage
367
+
368
+ ### Transcoder Job Basic
369
+
370
+ ```python
371
+ import pulumi
372
+ import pulumi_gcp as gcp
373
+
374
+ default = gcp.storage.Bucket("default",
375
+ name="transcoder-job",
376
+ location="US",
377
+ force_destroy=True,
378
+ uniform_bucket_level_access=True,
379
+ public_access_prevention="enforced")
380
+ example_mp4 = gcp.storage.BucketObject("example_mp4",
381
+ name="example.mp4",
382
+ source=pulumi.FileAsset("./test-fixtures/example.mp4"),
383
+ bucket=default.name)
384
+ default_job_template = gcp.transcoder.JobTemplate("default",
385
+ job_template_id="example-job-template",
386
+ location="us-central1",
387
+ config={
388
+ "inputs": [{
389
+ "key": "input0",
390
+ "uri": pulumi.Output.all(
391
+ defaultName=default.name,
392
+ exampleMp4Name=example_mp4.name
393
+ ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['defaultName']}/{resolved_outputs['exampleMp4Name']}")
394
+ ,
395
+ }],
396
+ "output": {
397
+ "uri": default.name.apply(lambda name: f"gs://{name}/outputs/"),
398
+ },
399
+ "edit_lists": [{
400
+ "key": "atom0",
401
+ "inputs": ["input0"],
402
+ "start_time_offset": "0s",
403
+ }],
404
+ "elementary_streams": [
405
+ {
406
+ "key": "video-stream0",
407
+ "video_stream": {
408
+ "h264": {
409
+ "width_pixels": 640,
410
+ "height_pixels": 360,
411
+ "bitrate_bps": 550000,
412
+ "frame_rate": 60,
413
+ "pixel_format": "yuv420p",
414
+ "rate_control_mode": "vbr",
415
+ "crf_level": 21,
416
+ "gop_duration": "3s",
417
+ "vbv_size_bits": 550000,
418
+ "vbv_fullness_bits": 495000,
419
+ "entropy_coder": "cabac",
420
+ "profile": "high",
421
+ "preset": "veryfast",
422
+ },
423
+ },
424
+ },
425
+ {
426
+ "key": "video-stream1",
427
+ "video_stream": {
428
+ "h264": {
429
+ "width_pixels": 1280,
430
+ "height_pixels": 720,
431
+ "bitrate_bps": 550000,
432
+ "frame_rate": 60,
433
+ "pixel_format": "yuv420p",
434
+ "rate_control_mode": "vbr",
435
+ "crf_level": 21,
436
+ "gop_duration": "3s",
437
+ "vbv_size_bits": 2500000,
438
+ "vbv_fullness_bits": 2250000,
439
+ "entropy_coder": "cabac",
440
+ "profile": "high",
441
+ "preset": "veryfast",
442
+ },
443
+ },
444
+ },
445
+ {
446
+ "key": "audio-stream0",
447
+ "audio_stream": {
448
+ "codec": "aac",
449
+ "bitrate_bps": 64000,
450
+ "channel_count": 2,
451
+ "channel_layouts": [
452
+ "fl",
453
+ "fr",
454
+ ],
455
+ "sample_rate_hertz": 48000,
456
+ },
457
+ },
458
+ ],
459
+ "mux_streams": [
460
+ {
461
+ "key": "sd",
462
+ "file_name": "sd.mp4",
463
+ "container": "mp4",
464
+ "elementary_streams": [
465
+ "video-stream0",
466
+ "audio-stream0",
467
+ ],
468
+ },
469
+ {
470
+ "key": "hd",
471
+ "file_name": "hd.mp4",
472
+ "container": "mp4",
473
+ "elementary_streams": [
474
+ "video-stream1",
475
+ "audio-stream0",
476
+ ],
477
+ },
478
+ ],
479
+ },
480
+ labels={
481
+ "label": "key",
482
+ })
483
+ default_job = gcp.transcoder.Job("default",
484
+ template_id=default_job_template.name,
485
+ location="us-central1",
486
+ labels={
487
+ "label": "key",
488
+ })
489
+ ```
490
+ ### Transcoder Job Pubsub
491
+
492
+ ```python
493
+ import pulumi
494
+ import pulumi_gcp as gcp
495
+
496
+ default = gcp.storage.Bucket("default",
497
+ name="transcoder-job",
498
+ location="US",
499
+ force_destroy=True,
500
+ uniform_bucket_level_access=True,
501
+ public_access_prevention="enforced")
502
+ example_mp4 = gcp.storage.BucketObject("example_mp4",
503
+ name="example.mp4",
504
+ source=pulumi.FileAsset("./test-fixtures/example.mp4"),
505
+ bucket=default.name)
506
+ transcoder_notifications = gcp.pubsub.Topic("transcoder_notifications", name="transcoder-notifications")
507
+ default_job = gcp.transcoder.Job("default",
508
+ location="us-central1",
509
+ config={
510
+ "inputs": [{
511
+ "key": "input0",
512
+ "uri": pulumi.Output.all(
513
+ defaultName=default.name,
514
+ exampleMp4Name=example_mp4.name
515
+ ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['defaultName']}/{resolved_outputs['exampleMp4Name']}")
516
+ ,
517
+ }],
518
+ "edit_lists": [{
519
+ "key": "atom0",
520
+ "inputs": ["input0"],
521
+ "start_time_offset": "0s",
522
+ }],
523
+ "ad_breaks": [{
524
+ "start_time_offset": "3.500s",
525
+ }],
526
+ "elementary_streams": [
527
+ {
528
+ "key": "video-stream0",
529
+ "video_stream": {
530
+ "h264": {
531
+ "width_pixels": 640,
532
+ "height_pixels": 360,
533
+ "bitrate_bps": 550000,
534
+ "frame_rate": 60,
535
+ "pixel_format": "yuv420p",
536
+ "rate_control_mode": "vbr",
537
+ "crf_level": 21,
538
+ "gop_duration": "3s",
539
+ "vbv_size_bits": 550000,
540
+ "vbv_fullness_bits": 495000,
541
+ "entropy_coder": "cabac",
542
+ "profile": "high",
543
+ "preset": "veryfast",
544
+ },
545
+ },
546
+ },
547
+ {
548
+ "key": "video-stream1",
549
+ "video_stream": {
550
+ "h264": {
551
+ "width_pixels": 1280,
552
+ "height_pixels": 720,
553
+ "bitrate_bps": 550000,
554
+ "frame_rate": 60,
555
+ "pixel_format": "yuv420p",
556
+ "rate_control_mode": "vbr",
557
+ "crf_level": 21,
558
+ "gop_duration": "3s",
559
+ "vbv_size_bits": 2500000,
560
+ "vbv_fullness_bits": 2250000,
561
+ "entropy_coder": "cabac",
562
+ "profile": "high",
563
+ "preset": "veryfast",
564
+ },
565
+ },
566
+ },
567
+ {
568
+ "key": "audio-stream0",
569
+ "audio_stream": {
570
+ "codec": "aac",
571
+ "bitrate_bps": 64000,
572
+ "channel_count": 2,
573
+ "channel_layouts": [
574
+ "fl",
575
+ "fr",
576
+ ],
577
+ "sample_rate_hertz": 48000,
578
+ },
579
+ },
580
+ ],
581
+ "mux_streams": [
582
+ {
583
+ "key": "sd",
584
+ "file_name": "sd.mp4",
585
+ "container": "mp4",
586
+ "elementary_streams": [
587
+ "video-stream0",
588
+ "audio-stream0",
589
+ ],
590
+ },
591
+ {
592
+ "key": "hd",
593
+ "file_name": "hd.mp4",
594
+ "container": "mp4",
595
+ "elementary_streams": [
596
+ "video-stream1",
597
+ "audio-stream0",
598
+ ],
599
+ },
600
+ ],
601
+ "pubsub_destination": {
602
+ "topic": transcoder_notifications.id,
603
+ },
604
+ "output": {
605
+ "uri": default.name.apply(lambda name: f"gs://{name}/outputs/"),
606
+ },
607
+ },
608
+ labels={
609
+ "label": "key",
610
+ })
611
+ ```
612
+ ### Transcoder Job Encryptions
613
+
614
+ ```python
615
+ import pulumi
616
+ import pulumi_gcp as gcp
617
+
618
+ default = gcp.storage.Bucket("default",
619
+ name="transcoder-job",
620
+ location="US",
621
+ force_destroy=True,
622
+ uniform_bucket_level_access=True,
623
+ public_access_prevention="enforced")
624
+ example_mp4 = gcp.storage.BucketObject("example_mp4",
625
+ name="example.mp4",
626
+ source=pulumi.FileAsset("./test-fixtures/example.mp4"),
627
+ bucket=default.name)
628
+ encryption_key = gcp.secretmanager.Secret("encryption_key",
629
+ secret_id="transcoder-encryption-key",
630
+ replication={
631
+ "auto": {},
632
+ })
633
+ encryption_key_secret_version = gcp.secretmanager.SecretVersion("encryption_key",
634
+ secret=encryption_key.name,
635
+ secret_data="4A67F2C1B8E93A4F6D3E7890A1BC23DF")
636
+ project = gcp.organizations.get_project()
637
+ # this is required to allow the transcoder service identity to access the secret
638
+ transcoder = gcp.projects.ServiceIdentity("transcoder",
639
+ project=project.project_id,
640
+ service="transcoder.googleapis.com")
641
+ transcoder_encryption_key_accessor = gcp.secretmanager.SecretIamMember("transcoder_encryption_key_accessor",
642
+ secret_id=encryption_key.secret_id,
643
+ project=encryption_key.project,
644
+ role="roles/secretmanager.secretAccessor",
645
+ member=transcoder.email.apply(lambda email: f"serviceAccount:{email}"))
646
+ default_job = gcp.transcoder.Job("default",
647
+ location="us-central1",
648
+ config={
649
+ "inputs": [{
650
+ "key": "input0",
651
+ "uri": pulumi.Output.all(
652
+ defaultName=default.name,
653
+ exampleMp4Name=example_mp4.name
654
+ ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['defaultName']}/{resolved_outputs['exampleMp4Name']}")
655
+ ,
656
+ }],
657
+ "elementary_streams": [
658
+ {
659
+ "key": "es_video",
660
+ "video_stream": {
661
+ "h264": {
662
+ "profile": "main",
663
+ "height_pixels": 600,
664
+ "width_pixels": 800,
665
+ "bitrate_bps": 1000000,
666
+ "frame_rate": 60,
667
+ },
668
+ },
669
+ },
670
+ {
671
+ "key": "es_audio",
672
+ "audio_stream": {
673
+ "codec": "aac",
674
+ "channel_count": 2,
675
+ "bitrate_bps": 160000,
676
+ },
677
+ },
678
+ ],
679
+ "encryptions": [
680
+ {
681
+ "id": "aes-128",
682
+ "secret_manager_key_source": {
683
+ "secret_version": encryption_key_secret_version.name,
684
+ },
685
+ "drm_systems": {
686
+ "clearkey": {},
687
+ },
688
+ "aes128": {},
689
+ },
690
+ {
691
+ "id": "cenc",
692
+ "secret_manager_key_source": {
693
+ "secret_version": encryption_key_secret_version.name,
694
+ },
695
+ "drm_systems": {
696
+ "widevine": {},
697
+ },
698
+ "mpeg_cenc": {
699
+ "scheme": "cenc",
700
+ },
701
+ },
702
+ {
703
+ "id": "cbcs",
704
+ "secret_manager_key_source": {
705
+ "secret_version": encryption_key_secret_version.name,
706
+ },
707
+ "drm_systems": {
708
+ "widevine": {},
709
+ },
710
+ "mpeg_cenc": {
711
+ "scheme": "cbcs",
712
+ },
713
+ },
714
+ ],
715
+ "mux_streams": [
716
+ {
717
+ "key": "ts_aes128",
718
+ "container": "ts",
719
+ "elementary_streams": [
720
+ "es_video",
721
+ "es_audio",
722
+ ],
723
+ "segment_settings": {
724
+ "segment_duration": "6s",
725
+ },
726
+ "encryption_id": "aes-128",
727
+ },
728
+ {
729
+ "key": "fmp4_cenc_video",
730
+ "container": "fmp4",
731
+ "elementary_streams": ["es_video"],
732
+ "segment_settings": {
733
+ "segment_duration": "6s",
734
+ },
735
+ "encryption_id": "cenc",
736
+ },
737
+ {
738
+ "key": "fmp4_cenc_audio",
739
+ "container": "fmp4",
740
+ "elementary_streams": ["es_audio"],
741
+ "segment_settings": {
742
+ "segment_duration": "6s",
743
+ },
744
+ "encryption_id": "cenc",
745
+ },
746
+ {
747
+ "key": "fmp4_cbcs_video",
748
+ "container": "fmp4",
749
+ "elementary_streams": ["es_video"],
750
+ "segment_settings": {
751
+ "segment_duration": "6s",
752
+ },
753
+ "encryption_id": "cbcs",
754
+ },
755
+ {
756
+ "key": "fmp4_cbcs_audio",
757
+ "container": "fmp4",
758
+ "elementary_streams": ["es_audio"],
759
+ "segment_settings": {
760
+ "segment_duration": "6s",
761
+ },
762
+ "encryption_id": "cbcs",
763
+ },
764
+ ],
765
+ "manifests": [
766
+ {
767
+ "file_name": "manifest_aes128.m3u8",
768
+ "type": "HLS",
769
+ "mux_streams": ["ts_aes128"],
770
+ },
771
+ {
772
+ "file_name": "manifest_cenc.mpd",
773
+ "type": "DASH",
774
+ "mux_streams": [
775
+ "fmp4_cenc_video",
776
+ "fmp4_cenc_audio",
777
+ ],
778
+ },
779
+ {
780
+ "file_name": "manifest_cbcs.mpd",
781
+ "type": "DASH",
782
+ "mux_streams": [
783
+ "fmp4_cbcs_video",
784
+ "fmp4_cbcs_audio",
785
+ ],
786
+ },
787
+ ],
788
+ "output": {
789
+ "uri": default.name.apply(lambda name: f"gs://{name}/outputs/"),
790
+ },
791
+ },
792
+ labels={
793
+ "label": "key",
794
+ })
795
+ ```
796
+ ### Transcoder Job Overlays
797
+
798
+ ```python
799
+ import pulumi
800
+ import pulumi_gcp as gcp
801
+
802
+ default = gcp.storage.Bucket("default",
803
+ name="transcoder-job",
804
+ location="US",
805
+ force_destroy=True,
806
+ uniform_bucket_level_access=True,
807
+ public_access_prevention="enforced")
808
+ example_mp4 = gcp.storage.BucketObject("example_mp4",
809
+ name="example.mp4",
810
+ source=pulumi.FileAsset("./test-fixtures/example.mp4"),
811
+ bucket=default.name)
812
+ overlay_png = gcp.storage.BucketObject("overlay_png",
813
+ name="overlay.png",
814
+ source=pulumi.FileAsset("./test-fixtures/overlay.png"),
815
+ bucket=default.name)
816
+ default_job = gcp.transcoder.Job("default",
817
+ location="us-central1",
818
+ config={
819
+ "inputs": [{
820
+ "key": "input0",
821
+ "uri": pulumi.Output.all(
822
+ defaultName=default.name,
823
+ exampleMp4Name=example_mp4.name
824
+ ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['defaultName']}/{resolved_outputs['exampleMp4Name']}")
825
+ ,
826
+ }],
827
+ "edit_lists": [{
828
+ "key": "atom0",
829
+ "inputs": ["input0"],
830
+ "start_time_offset": "0s",
831
+ }],
832
+ "ad_breaks": [{
833
+ "start_time_offset": "3.500s",
834
+ }],
835
+ "overlays": [{
836
+ "animations": [{
837
+ "animation_fade": {
838
+ "fade_type": "FADE_IN",
839
+ "start_time_offset": "1.500s",
840
+ "end_time_offset": "3.500s",
841
+ "xy": {
842
+ "x": 1,
843
+ "y": 0.5,
844
+ },
845
+ },
846
+ }],
847
+ "image": {
848
+ "uri": pulumi.Output.all(
849
+ defaultName=default.name,
850
+ overlayPngName=overlay_png.name
851
+ ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['defaultName']}/{resolved_outputs['overlayPngName']}")
852
+ ,
853
+ },
854
+ }],
855
+ "elementary_streams": [
856
+ {
857
+ "key": "video-stream0",
858
+ "video_stream": {
859
+ "h264": {
860
+ "width_pixels": 640,
861
+ "height_pixels": 360,
862
+ "bitrate_bps": 550000,
863
+ "frame_rate": 60,
864
+ "pixel_format": "yuv420p",
865
+ "rate_control_mode": "vbr",
866
+ "crf_level": 21,
867
+ "gop_duration": "3s",
868
+ "vbv_size_bits": 550000,
869
+ "vbv_fullness_bits": 495000,
870
+ "entropy_coder": "cabac",
871
+ "profile": "high",
872
+ "preset": "veryfast",
873
+ },
874
+ },
875
+ },
876
+ {
877
+ "key": "video-stream1",
878
+ "video_stream": {
879
+ "h264": {
880
+ "width_pixels": 1280,
881
+ "height_pixels": 720,
882
+ "bitrate_bps": 550000,
883
+ "frame_rate": 60,
884
+ "pixel_format": "yuv420p",
885
+ "rate_control_mode": "vbr",
886
+ "crf_level": 21,
887
+ "gop_duration": "3s",
888
+ "vbv_size_bits": 2500000,
889
+ "vbv_fullness_bits": 2250000,
890
+ "entropy_coder": "cabac",
891
+ "profile": "high",
892
+ "preset": "veryfast",
893
+ },
894
+ },
895
+ },
896
+ {
897
+ "key": "audio-stream0",
898
+ "audio_stream": {
899
+ "codec": "aac",
900
+ "bitrate_bps": 64000,
901
+ "channel_count": 2,
902
+ "channel_layouts": [
903
+ "fl",
904
+ "fr",
905
+ ],
906
+ "sample_rate_hertz": 48000,
907
+ },
908
+ },
909
+ ],
910
+ "mux_streams": [
911
+ {
912
+ "key": "sd",
913
+ "file_name": "sd.mp4",
914
+ "container": "mp4",
915
+ "elementary_streams": [
916
+ "video-stream0",
917
+ "audio-stream0",
918
+ ],
919
+ },
920
+ {
921
+ "key": "hd",
922
+ "file_name": "hd.mp4",
923
+ "container": "mp4",
924
+ "elementary_streams": [
925
+ "video-stream1",
926
+ "audio-stream0",
927
+ ],
928
+ },
929
+ ],
930
+ "output": {
931
+ "uri": default.name.apply(lambda name: f"gs://{name}/outputs/"),
932
+ },
933
+ },
934
+ labels={
935
+ "label": "key",
936
+ })
937
+ ```
938
+ ### Transcoder Job Manifests
939
+
940
+ ```python
941
+ import pulumi
942
+ import pulumi_gcp as gcp
943
+
944
+ default = gcp.storage.Bucket("default",
945
+ name="transcoder-job",
946
+ location="US",
947
+ force_destroy=True,
948
+ uniform_bucket_level_access=True,
949
+ public_access_prevention="enforced")
950
+ example_mp4 = gcp.storage.BucketObject("example_mp4",
951
+ name="example.mp4",
952
+ source=pulumi.FileAsset("./test-fixtures/example.mp4"),
953
+ bucket=default.name)
954
+ default_job = gcp.transcoder.Job("default",
955
+ location="us-central1",
956
+ config={
957
+ "inputs": [{
958
+ "key": "input0",
959
+ "uri": pulumi.Output.all(
960
+ defaultName=default.name,
961
+ exampleMp4Name=example_mp4.name
962
+ ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['defaultName']}/{resolved_outputs['exampleMp4Name']}")
963
+ ,
964
+ }],
965
+ "edit_lists": [{
966
+ "key": "atom0",
967
+ "start_time_offset": "0s",
968
+ "inputs": ["input0"],
969
+ }],
970
+ "ad_breaks": [{
971
+ "start_time_offset": "3.500s",
972
+ }],
973
+ "elementary_streams": [
974
+ {
975
+ "key": "video-stream0",
976
+ "video_stream": {
977
+ "h264": {
978
+ "width_pixels": 640,
979
+ "height_pixels": 360,
980
+ "bitrate_bps": 550000,
981
+ "frame_rate": 60,
982
+ "pixel_format": "yuv420p",
983
+ "rate_control_mode": "vbr",
984
+ "crf_level": 21,
985
+ "gop_duration": "3s",
986
+ "vbv_size_bits": 550000,
987
+ "vbv_fullness_bits": 495000,
988
+ "entropy_coder": "cabac",
989
+ "profile": "high",
990
+ "preset": "veryfast",
991
+ },
992
+ },
993
+ },
994
+ {
995
+ "key": "video-stream1",
996
+ "video_stream": {
997
+ "h264": {
998
+ "width_pixels": 1280,
999
+ "height_pixels": 720,
1000
+ "bitrate_bps": 550000,
1001
+ "frame_rate": 60,
1002
+ "pixel_format": "yuv420p",
1003
+ "rate_control_mode": "vbr",
1004
+ "crf_level": 21,
1005
+ "gop_duration": "3s",
1006
+ "vbv_size_bits": 2500000,
1007
+ "vbv_fullness_bits": 2250000,
1008
+ "entropy_coder": "cabac",
1009
+ "profile": "high",
1010
+ "preset": "veryfast",
1011
+ },
1012
+ },
1013
+ },
1014
+ {
1015
+ "key": "audio-stream0",
1016
+ "audio_stream": {
1017
+ "codec": "aac",
1018
+ "bitrate_bps": 64000,
1019
+ "channel_count": 2,
1020
+ "channel_layouts": [
1021
+ "fl",
1022
+ "fr",
1023
+ ],
1024
+ "sample_rate_hertz": 48000,
1025
+ },
1026
+ },
1027
+ ],
1028
+ "mux_streams": [
1029
+ {
1030
+ "key": "sd",
1031
+ "file_name": "sd.mp4",
1032
+ "container": "mp4",
1033
+ "elementary_streams": [
1034
+ "video-stream0",
1035
+ "audio-stream0",
1036
+ ],
1037
+ },
1038
+ {
1039
+ "key": "hd",
1040
+ "file_name": "hd.mp4",
1041
+ "container": "mp4",
1042
+ "elementary_streams": [
1043
+ "video-stream1",
1044
+ "audio-stream0",
1045
+ ],
1046
+ },
1047
+ {
1048
+ "key": "media-sd",
1049
+ "file_name": "media-sd.ts",
1050
+ "container": "ts",
1051
+ "elementary_streams": [
1052
+ "video-stream0",
1053
+ "audio-stream0",
1054
+ ],
1055
+ },
1056
+ {
1057
+ "key": "media-hd",
1058
+ "file_name": "media-hd.ts",
1059
+ "container": "ts",
1060
+ "elementary_streams": [
1061
+ "video-stream1",
1062
+ "audio-stream0",
1063
+ ],
1064
+ },
1065
+ {
1066
+ "key": "video-only-sd",
1067
+ "file_name": "video-only-sd.m4s",
1068
+ "container": "fmp4",
1069
+ "elementary_streams": ["video-stream0"],
1070
+ },
1071
+ {
1072
+ "key": "video-only-hd",
1073
+ "file_name": "video-only-hd.m4s",
1074
+ "container": "fmp4",
1075
+ "elementary_streams": ["video-stream1"],
1076
+ },
1077
+ {
1078
+ "key": "audio-only",
1079
+ "file_name": "audio-only.m4s",
1080
+ "container": "fmp4",
1081
+ "elementary_streams": ["audio-stream0"],
1082
+ },
1083
+ ],
1084
+ "manifests": [
1085
+ {
1086
+ "file_name": "manifest.m3u8",
1087
+ "type": "HLS",
1088
+ "mux_streams": [
1089
+ "media-sd",
1090
+ "media-hd",
1091
+ ],
1092
+ },
1093
+ {
1094
+ "file_name": "manifest.mpd",
1095
+ "type": "DASH",
1096
+ "mux_streams": [
1097
+ "video-only-sd",
1098
+ "video-only-hd",
1099
+ "audio-only",
1100
+ ],
1101
+ },
1102
+ ],
1103
+ "output": {
1104
+ "uri": default.name.apply(lambda name: f"gs://{name}/outputs/"),
1105
+ },
1106
+ },
1107
+ labels={
1108
+ "label": "key",
1109
+ })
1110
+ ```
1111
+
1112
+ ## Import
1113
+
1114
+ Job can be imported using any of these accepted formats:
1115
+
1116
+ * `{{name}}`
1117
+
1118
+ When using the `pulumi import` command, Job can be imported using one of the formats above. For example:
1119
+
1120
+ ```sh
1121
+ $ pulumi import gcp:transcoder/job:Job default {{name}}
1122
+ ```
1123
+
1124
+ :param str resource_name: The name of the resource.
1125
+ :param pulumi.ResourceOptions opts: Options for the resource.
1126
+ :param pulumi.Input[Union['JobConfigArgs', 'JobConfigArgsDict']] config: The configuration for this template.
1127
+ Structure is documented below.
1128
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: The labels associated with this job. You can use these to organize and group your jobs.
1129
+
1130
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
1131
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
1132
+ :param pulumi.Input[str] location: The location of the transcoding job resource.
1133
+
1134
+
1135
+ - - -
1136
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
1137
+ If it is not provided, the provider project is used.
1138
+ :param pulumi.Input[str] template_id: Specify the templateId to use for populating Job.config.
1139
+ The default is preset/web-hd, which is the only supported preset.
1140
+ """
1141
+ ...
1142
+ @overload
1143
+ def __init__(__self__,
1144
+ resource_name: str,
1145
+ args: JobArgs,
1146
+ opts: Optional[pulumi.ResourceOptions] = None):
1147
+ """
1148
+ Transcoding Job Resource
1149
+
1150
+ To get more information about Job, see:
1151
+
1152
+ * [API documentation](https://cloud.google.com/transcoder/docs/reference/rest/v1/projects.locations.jobs)
1153
+ * How-to Guides
1154
+ * [Transcoder](https://cloud.google.com/transcoder/docs/)
1155
+
1156
+ ## Example Usage
1157
+
1158
+ ### Transcoder Job Basic
1159
+
1160
+ ```python
1161
+ import pulumi
1162
+ import pulumi_gcp as gcp
1163
+
1164
+ default = gcp.storage.Bucket("default",
1165
+ name="transcoder-job",
1166
+ location="US",
1167
+ force_destroy=True,
1168
+ uniform_bucket_level_access=True,
1169
+ public_access_prevention="enforced")
1170
+ example_mp4 = gcp.storage.BucketObject("example_mp4",
1171
+ name="example.mp4",
1172
+ source=pulumi.FileAsset("./test-fixtures/example.mp4"),
1173
+ bucket=default.name)
1174
+ default_job_template = gcp.transcoder.JobTemplate("default",
1175
+ job_template_id="example-job-template",
1176
+ location="us-central1",
1177
+ config={
1178
+ "inputs": [{
1179
+ "key": "input0",
1180
+ "uri": pulumi.Output.all(
1181
+ defaultName=default.name,
1182
+ exampleMp4Name=example_mp4.name
1183
+ ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['defaultName']}/{resolved_outputs['exampleMp4Name']}")
1184
+ ,
1185
+ }],
1186
+ "output": {
1187
+ "uri": default.name.apply(lambda name: f"gs://{name}/outputs/"),
1188
+ },
1189
+ "edit_lists": [{
1190
+ "key": "atom0",
1191
+ "inputs": ["input0"],
1192
+ "start_time_offset": "0s",
1193
+ }],
1194
+ "elementary_streams": [
1195
+ {
1196
+ "key": "video-stream0",
1197
+ "video_stream": {
1198
+ "h264": {
1199
+ "width_pixels": 640,
1200
+ "height_pixels": 360,
1201
+ "bitrate_bps": 550000,
1202
+ "frame_rate": 60,
1203
+ "pixel_format": "yuv420p",
1204
+ "rate_control_mode": "vbr",
1205
+ "crf_level": 21,
1206
+ "gop_duration": "3s",
1207
+ "vbv_size_bits": 550000,
1208
+ "vbv_fullness_bits": 495000,
1209
+ "entropy_coder": "cabac",
1210
+ "profile": "high",
1211
+ "preset": "veryfast",
1212
+ },
1213
+ },
1214
+ },
1215
+ {
1216
+ "key": "video-stream1",
1217
+ "video_stream": {
1218
+ "h264": {
1219
+ "width_pixels": 1280,
1220
+ "height_pixels": 720,
1221
+ "bitrate_bps": 550000,
1222
+ "frame_rate": 60,
1223
+ "pixel_format": "yuv420p",
1224
+ "rate_control_mode": "vbr",
1225
+ "crf_level": 21,
1226
+ "gop_duration": "3s",
1227
+ "vbv_size_bits": 2500000,
1228
+ "vbv_fullness_bits": 2250000,
1229
+ "entropy_coder": "cabac",
1230
+ "profile": "high",
1231
+ "preset": "veryfast",
1232
+ },
1233
+ },
1234
+ },
1235
+ {
1236
+ "key": "audio-stream0",
1237
+ "audio_stream": {
1238
+ "codec": "aac",
1239
+ "bitrate_bps": 64000,
1240
+ "channel_count": 2,
1241
+ "channel_layouts": [
1242
+ "fl",
1243
+ "fr",
1244
+ ],
1245
+ "sample_rate_hertz": 48000,
1246
+ },
1247
+ },
1248
+ ],
1249
+ "mux_streams": [
1250
+ {
1251
+ "key": "sd",
1252
+ "file_name": "sd.mp4",
1253
+ "container": "mp4",
1254
+ "elementary_streams": [
1255
+ "video-stream0",
1256
+ "audio-stream0",
1257
+ ],
1258
+ },
1259
+ {
1260
+ "key": "hd",
1261
+ "file_name": "hd.mp4",
1262
+ "container": "mp4",
1263
+ "elementary_streams": [
1264
+ "video-stream1",
1265
+ "audio-stream0",
1266
+ ],
1267
+ },
1268
+ ],
1269
+ },
1270
+ labels={
1271
+ "label": "key",
1272
+ })
1273
+ default_job = gcp.transcoder.Job("default",
1274
+ template_id=default_job_template.name,
1275
+ location="us-central1",
1276
+ labels={
1277
+ "label": "key",
1278
+ })
1279
+ ```
1280
+ ### Transcoder Job Pubsub
1281
+
1282
+ ```python
1283
+ import pulumi
1284
+ import pulumi_gcp as gcp
1285
+
1286
+ default = gcp.storage.Bucket("default",
1287
+ name="transcoder-job",
1288
+ location="US",
1289
+ force_destroy=True,
1290
+ uniform_bucket_level_access=True,
1291
+ public_access_prevention="enforced")
1292
+ example_mp4 = gcp.storage.BucketObject("example_mp4",
1293
+ name="example.mp4",
1294
+ source=pulumi.FileAsset("./test-fixtures/example.mp4"),
1295
+ bucket=default.name)
1296
+ transcoder_notifications = gcp.pubsub.Topic("transcoder_notifications", name="transcoder-notifications")
1297
+ default_job = gcp.transcoder.Job("default",
1298
+ location="us-central1",
1299
+ config={
1300
+ "inputs": [{
1301
+ "key": "input0",
1302
+ "uri": pulumi.Output.all(
1303
+ defaultName=default.name,
1304
+ exampleMp4Name=example_mp4.name
1305
+ ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['defaultName']}/{resolved_outputs['exampleMp4Name']}")
1306
+ ,
1307
+ }],
1308
+ "edit_lists": [{
1309
+ "key": "atom0",
1310
+ "inputs": ["input0"],
1311
+ "start_time_offset": "0s",
1312
+ }],
1313
+ "ad_breaks": [{
1314
+ "start_time_offset": "3.500s",
1315
+ }],
1316
+ "elementary_streams": [
1317
+ {
1318
+ "key": "video-stream0",
1319
+ "video_stream": {
1320
+ "h264": {
1321
+ "width_pixels": 640,
1322
+ "height_pixels": 360,
1323
+ "bitrate_bps": 550000,
1324
+ "frame_rate": 60,
1325
+ "pixel_format": "yuv420p",
1326
+ "rate_control_mode": "vbr",
1327
+ "crf_level": 21,
1328
+ "gop_duration": "3s",
1329
+ "vbv_size_bits": 550000,
1330
+ "vbv_fullness_bits": 495000,
1331
+ "entropy_coder": "cabac",
1332
+ "profile": "high",
1333
+ "preset": "veryfast",
1334
+ },
1335
+ },
1336
+ },
1337
+ {
1338
+ "key": "video-stream1",
1339
+ "video_stream": {
1340
+ "h264": {
1341
+ "width_pixels": 1280,
1342
+ "height_pixels": 720,
1343
+ "bitrate_bps": 550000,
1344
+ "frame_rate": 60,
1345
+ "pixel_format": "yuv420p",
1346
+ "rate_control_mode": "vbr",
1347
+ "crf_level": 21,
1348
+ "gop_duration": "3s",
1349
+ "vbv_size_bits": 2500000,
1350
+ "vbv_fullness_bits": 2250000,
1351
+ "entropy_coder": "cabac",
1352
+ "profile": "high",
1353
+ "preset": "veryfast",
1354
+ },
1355
+ },
1356
+ },
1357
+ {
1358
+ "key": "audio-stream0",
1359
+ "audio_stream": {
1360
+ "codec": "aac",
1361
+ "bitrate_bps": 64000,
1362
+ "channel_count": 2,
1363
+ "channel_layouts": [
1364
+ "fl",
1365
+ "fr",
1366
+ ],
1367
+ "sample_rate_hertz": 48000,
1368
+ },
1369
+ },
1370
+ ],
1371
+ "mux_streams": [
1372
+ {
1373
+ "key": "sd",
1374
+ "file_name": "sd.mp4",
1375
+ "container": "mp4",
1376
+ "elementary_streams": [
1377
+ "video-stream0",
1378
+ "audio-stream0",
1379
+ ],
1380
+ },
1381
+ {
1382
+ "key": "hd",
1383
+ "file_name": "hd.mp4",
1384
+ "container": "mp4",
1385
+ "elementary_streams": [
1386
+ "video-stream1",
1387
+ "audio-stream0",
1388
+ ],
1389
+ },
1390
+ ],
1391
+ "pubsub_destination": {
1392
+ "topic": transcoder_notifications.id,
1393
+ },
1394
+ "output": {
1395
+ "uri": default.name.apply(lambda name: f"gs://{name}/outputs/"),
1396
+ },
1397
+ },
1398
+ labels={
1399
+ "label": "key",
1400
+ })
1401
+ ```
1402
+ ### Transcoder Job Encryptions
1403
+
1404
+ ```python
1405
+ import pulumi
1406
+ import pulumi_gcp as gcp
1407
+
1408
+ default = gcp.storage.Bucket("default",
1409
+ name="transcoder-job",
1410
+ location="US",
1411
+ force_destroy=True,
1412
+ uniform_bucket_level_access=True,
1413
+ public_access_prevention="enforced")
1414
+ example_mp4 = gcp.storage.BucketObject("example_mp4",
1415
+ name="example.mp4",
1416
+ source=pulumi.FileAsset("./test-fixtures/example.mp4"),
1417
+ bucket=default.name)
1418
+ encryption_key = gcp.secretmanager.Secret("encryption_key",
1419
+ secret_id="transcoder-encryption-key",
1420
+ replication={
1421
+ "auto": {},
1422
+ })
1423
+ encryption_key_secret_version = gcp.secretmanager.SecretVersion("encryption_key",
1424
+ secret=encryption_key.name,
1425
+ secret_data="4A67F2C1B8E93A4F6D3E7890A1BC23DF")
1426
+ project = gcp.organizations.get_project()
1427
+ # this is required to allow the transcoder service identity to access the secret
1428
+ transcoder = gcp.projects.ServiceIdentity("transcoder",
1429
+ project=project.project_id,
1430
+ service="transcoder.googleapis.com")
1431
+ transcoder_encryption_key_accessor = gcp.secretmanager.SecretIamMember("transcoder_encryption_key_accessor",
1432
+ secret_id=encryption_key.secret_id,
1433
+ project=encryption_key.project,
1434
+ role="roles/secretmanager.secretAccessor",
1435
+ member=transcoder.email.apply(lambda email: f"serviceAccount:{email}"))
1436
+ default_job = gcp.transcoder.Job("default",
1437
+ location="us-central1",
1438
+ config={
1439
+ "inputs": [{
1440
+ "key": "input0",
1441
+ "uri": pulumi.Output.all(
1442
+ defaultName=default.name,
1443
+ exampleMp4Name=example_mp4.name
1444
+ ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['defaultName']}/{resolved_outputs['exampleMp4Name']}")
1445
+ ,
1446
+ }],
1447
+ "elementary_streams": [
1448
+ {
1449
+ "key": "es_video",
1450
+ "video_stream": {
1451
+ "h264": {
1452
+ "profile": "main",
1453
+ "height_pixels": 600,
1454
+ "width_pixels": 800,
1455
+ "bitrate_bps": 1000000,
1456
+ "frame_rate": 60,
1457
+ },
1458
+ },
1459
+ },
1460
+ {
1461
+ "key": "es_audio",
1462
+ "audio_stream": {
1463
+ "codec": "aac",
1464
+ "channel_count": 2,
1465
+ "bitrate_bps": 160000,
1466
+ },
1467
+ },
1468
+ ],
1469
+ "encryptions": [
1470
+ {
1471
+ "id": "aes-128",
1472
+ "secret_manager_key_source": {
1473
+ "secret_version": encryption_key_secret_version.name,
1474
+ },
1475
+ "drm_systems": {
1476
+ "clearkey": {},
1477
+ },
1478
+ "aes128": {},
1479
+ },
1480
+ {
1481
+ "id": "cenc",
1482
+ "secret_manager_key_source": {
1483
+ "secret_version": encryption_key_secret_version.name,
1484
+ },
1485
+ "drm_systems": {
1486
+ "widevine": {},
1487
+ },
1488
+ "mpeg_cenc": {
1489
+ "scheme": "cenc",
1490
+ },
1491
+ },
1492
+ {
1493
+ "id": "cbcs",
1494
+ "secret_manager_key_source": {
1495
+ "secret_version": encryption_key_secret_version.name,
1496
+ },
1497
+ "drm_systems": {
1498
+ "widevine": {},
1499
+ },
1500
+ "mpeg_cenc": {
1501
+ "scheme": "cbcs",
1502
+ },
1503
+ },
1504
+ ],
1505
+ "mux_streams": [
1506
+ {
1507
+ "key": "ts_aes128",
1508
+ "container": "ts",
1509
+ "elementary_streams": [
1510
+ "es_video",
1511
+ "es_audio",
1512
+ ],
1513
+ "segment_settings": {
1514
+ "segment_duration": "6s",
1515
+ },
1516
+ "encryption_id": "aes-128",
1517
+ },
1518
+ {
1519
+ "key": "fmp4_cenc_video",
1520
+ "container": "fmp4",
1521
+ "elementary_streams": ["es_video"],
1522
+ "segment_settings": {
1523
+ "segment_duration": "6s",
1524
+ },
1525
+ "encryption_id": "cenc",
1526
+ },
1527
+ {
1528
+ "key": "fmp4_cenc_audio",
1529
+ "container": "fmp4",
1530
+ "elementary_streams": ["es_audio"],
1531
+ "segment_settings": {
1532
+ "segment_duration": "6s",
1533
+ },
1534
+ "encryption_id": "cenc",
1535
+ },
1536
+ {
1537
+ "key": "fmp4_cbcs_video",
1538
+ "container": "fmp4",
1539
+ "elementary_streams": ["es_video"],
1540
+ "segment_settings": {
1541
+ "segment_duration": "6s",
1542
+ },
1543
+ "encryption_id": "cbcs",
1544
+ },
1545
+ {
1546
+ "key": "fmp4_cbcs_audio",
1547
+ "container": "fmp4",
1548
+ "elementary_streams": ["es_audio"],
1549
+ "segment_settings": {
1550
+ "segment_duration": "6s",
1551
+ },
1552
+ "encryption_id": "cbcs",
1553
+ },
1554
+ ],
1555
+ "manifests": [
1556
+ {
1557
+ "file_name": "manifest_aes128.m3u8",
1558
+ "type": "HLS",
1559
+ "mux_streams": ["ts_aes128"],
1560
+ },
1561
+ {
1562
+ "file_name": "manifest_cenc.mpd",
1563
+ "type": "DASH",
1564
+ "mux_streams": [
1565
+ "fmp4_cenc_video",
1566
+ "fmp4_cenc_audio",
1567
+ ],
1568
+ },
1569
+ {
1570
+ "file_name": "manifest_cbcs.mpd",
1571
+ "type": "DASH",
1572
+ "mux_streams": [
1573
+ "fmp4_cbcs_video",
1574
+ "fmp4_cbcs_audio",
1575
+ ],
1576
+ },
1577
+ ],
1578
+ "output": {
1579
+ "uri": default.name.apply(lambda name: f"gs://{name}/outputs/"),
1580
+ },
1581
+ },
1582
+ labels={
1583
+ "label": "key",
1584
+ })
1585
+ ```
1586
+ ### Transcoder Job Overlays
1587
+
1588
+ ```python
1589
+ import pulumi
1590
+ import pulumi_gcp as gcp
1591
+
1592
+ default = gcp.storage.Bucket("default",
1593
+ name="transcoder-job",
1594
+ location="US",
1595
+ force_destroy=True,
1596
+ uniform_bucket_level_access=True,
1597
+ public_access_prevention="enforced")
1598
+ example_mp4 = gcp.storage.BucketObject("example_mp4",
1599
+ name="example.mp4",
1600
+ source=pulumi.FileAsset("./test-fixtures/example.mp4"),
1601
+ bucket=default.name)
1602
+ overlay_png = gcp.storage.BucketObject("overlay_png",
1603
+ name="overlay.png",
1604
+ source=pulumi.FileAsset("./test-fixtures/overlay.png"),
1605
+ bucket=default.name)
1606
+ default_job = gcp.transcoder.Job("default",
1607
+ location="us-central1",
1608
+ config={
1609
+ "inputs": [{
1610
+ "key": "input0",
1611
+ "uri": pulumi.Output.all(
1612
+ defaultName=default.name,
1613
+ exampleMp4Name=example_mp4.name
1614
+ ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['defaultName']}/{resolved_outputs['exampleMp4Name']}")
1615
+ ,
1616
+ }],
1617
+ "edit_lists": [{
1618
+ "key": "atom0",
1619
+ "inputs": ["input0"],
1620
+ "start_time_offset": "0s",
1621
+ }],
1622
+ "ad_breaks": [{
1623
+ "start_time_offset": "3.500s",
1624
+ }],
1625
+ "overlays": [{
1626
+ "animations": [{
1627
+ "animation_fade": {
1628
+ "fade_type": "FADE_IN",
1629
+ "start_time_offset": "1.500s",
1630
+ "end_time_offset": "3.500s",
1631
+ "xy": {
1632
+ "x": 1,
1633
+ "y": 0.5,
1634
+ },
1635
+ },
1636
+ }],
1637
+ "image": {
1638
+ "uri": pulumi.Output.all(
1639
+ defaultName=default.name,
1640
+ overlayPngName=overlay_png.name
1641
+ ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['defaultName']}/{resolved_outputs['overlayPngName']}")
1642
+ ,
1643
+ },
1644
+ }],
1645
+ "elementary_streams": [
1646
+ {
1647
+ "key": "video-stream0",
1648
+ "video_stream": {
1649
+ "h264": {
1650
+ "width_pixels": 640,
1651
+ "height_pixels": 360,
1652
+ "bitrate_bps": 550000,
1653
+ "frame_rate": 60,
1654
+ "pixel_format": "yuv420p",
1655
+ "rate_control_mode": "vbr",
1656
+ "crf_level": 21,
1657
+ "gop_duration": "3s",
1658
+ "vbv_size_bits": 550000,
1659
+ "vbv_fullness_bits": 495000,
1660
+ "entropy_coder": "cabac",
1661
+ "profile": "high",
1662
+ "preset": "veryfast",
1663
+ },
1664
+ },
1665
+ },
1666
+ {
1667
+ "key": "video-stream1",
1668
+ "video_stream": {
1669
+ "h264": {
1670
+ "width_pixels": 1280,
1671
+ "height_pixels": 720,
1672
+ "bitrate_bps": 550000,
1673
+ "frame_rate": 60,
1674
+ "pixel_format": "yuv420p",
1675
+ "rate_control_mode": "vbr",
1676
+ "crf_level": 21,
1677
+ "gop_duration": "3s",
1678
+ "vbv_size_bits": 2500000,
1679
+ "vbv_fullness_bits": 2250000,
1680
+ "entropy_coder": "cabac",
1681
+ "profile": "high",
1682
+ "preset": "veryfast",
1683
+ },
1684
+ },
1685
+ },
1686
+ {
1687
+ "key": "audio-stream0",
1688
+ "audio_stream": {
1689
+ "codec": "aac",
1690
+ "bitrate_bps": 64000,
1691
+ "channel_count": 2,
1692
+ "channel_layouts": [
1693
+ "fl",
1694
+ "fr",
1695
+ ],
1696
+ "sample_rate_hertz": 48000,
1697
+ },
1698
+ },
1699
+ ],
1700
+ "mux_streams": [
1701
+ {
1702
+ "key": "sd",
1703
+ "file_name": "sd.mp4",
1704
+ "container": "mp4",
1705
+ "elementary_streams": [
1706
+ "video-stream0",
1707
+ "audio-stream0",
1708
+ ],
1709
+ },
1710
+ {
1711
+ "key": "hd",
1712
+ "file_name": "hd.mp4",
1713
+ "container": "mp4",
1714
+ "elementary_streams": [
1715
+ "video-stream1",
1716
+ "audio-stream0",
1717
+ ],
1718
+ },
1719
+ ],
1720
+ "output": {
1721
+ "uri": default.name.apply(lambda name: f"gs://{name}/outputs/"),
1722
+ },
1723
+ },
1724
+ labels={
1725
+ "label": "key",
1726
+ })
1727
+ ```
1728
+ ### Transcoder Job Manifests
1729
+
1730
+ ```python
1731
+ import pulumi
1732
+ import pulumi_gcp as gcp
1733
+
1734
+ default = gcp.storage.Bucket("default",
1735
+ name="transcoder-job",
1736
+ location="US",
1737
+ force_destroy=True,
1738
+ uniform_bucket_level_access=True,
1739
+ public_access_prevention="enforced")
1740
+ example_mp4 = gcp.storage.BucketObject("example_mp4",
1741
+ name="example.mp4",
1742
+ source=pulumi.FileAsset("./test-fixtures/example.mp4"),
1743
+ bucket=default.name)
1744
+ default_job = gcp.transcoder.Job("default",
1745
+ location="us-central1",
1746
+ config={
1747
+ "inputs": [{
1748
+ "key": "input0",
1749
+ "uri": pulumi.Output.all(
1750
+ defaultName=default.name,
1751
+ exampleMp4Name=example_mp4.name
1752
+ ).apply(lambda resolved_outputs: f"gs://{resolved_outputs['defaultName']}/{resolved_outputs['exampleMp4Name']}")
1753
+ ,
1754
+ }],
1755
+ "edit_lists": [{
1756
+ "key": "atom0",
1757
+ "start_time_offset": "0s",
1758
+ "inputs": ["input0"],
1759
+ }],
1760
+ "ad_breaks": [{
1761
+ "start_time_offset": "3.500s",
1762
+ }],
1763
+ "elementary_streams": [
1764
+ {
1765
+ "key": "video-stream0",
1766
+ "video_stream": {
1767
+ "h264": {
1768
+ "width_pixels": 640,
1769
+ "height_pixels": 360,
1770
+ "bitrate_bps": 550000,
1771
+ "frame_rate": 60,
1772
+ "pixel_format": "yuv420p",
1773
+ "rate_control_mode": "vbr",
1774
+ "crf_level": 21,
1775
+ "gop_duration": "3s",
1776
+ "vbv_size_bits": 550000,
1777
+ "vbv_fullness_bits": 495000,
1778
+ "entropy_coder": "cabac",
1779
+ "profile": "high",
1780
+ "preset": "veryfast",
1781
+ },
1782
+ },
1783
+ },
1784
+ {
1785
+ "key": "video-stream1",
1786
+ "video_stream": {
1787
+ "h264": {
1788
+ "width_pixels": 1280,
1789
+ "height_pixels": 720,
1790
+ "bitrate_bps": 550000,
1791
+ "frame_rate": 60,
1792
+ "pixel_format": "yuv420p",
1793
+ "rate_control_mode": "vbr",
1794
+ "crf_level": 21,
1795
+ "gop_duration": "3s",
1796
+ "vbv_size_bits": 2500000,
1797
+ "vbv_fullness_bits": 2250000,
1798
+ "entropy_coder": "cabac",
1799
+ "profile": "high",
1800
+ "preset": "veryfast",
1801
+ },
1802
+ },
1803
+ },
1804
+ {
1805
+ "key": "audio-stream0",
1806
+ "audio_stream": {
1807
+ "codec": "aac",
1808
+ "bitrate_bps": 64000,
1809
+ "channel_count": 2,
1810
+ "channel_layouts": [
1811
+ "fl",
1812
+ "fr",
1813
+ ],
1814
+ "sample_rate_hertz": 48000,
1815
+ },
1816
+ },
1817
+ ],
1818
+ "mux_streams": [
1819
+ {
1820
+ "key": "sd",
1821
+ "file_name": "sd.mp4",
1822
+ "container": "mp4",
1823
+ "elementary_streams": [
1824
+ "video-stream0",
1825
+ "audio-stream0",
1826
+ ],
1827
+ },
1828
+ {
1829
+ "key": "hd",
1830
+ "file_name": "hd.mp4",
1831
+ "container": "mp4",
1832
+ "elementary_streams": [
1833
+ "video-stream1",
1834
+ "audio-stream0",
1835
+ ],
1836
+ },
1837
+ {
1838
+ "key": "media-sd",
1839
+ "file_name": "media-sd.ts",
1840
+ "container": "ts",
1841
+ "elementary_streams": [
1842
+ "video-stream0",
1843
+ "audio-stream0",
1844
+ ],
1845
+ },
1846
+ {
1847
+ "key": "media-hd",
1848
+ "file_name": "media-hd.ts",
1849
+ "container": "ts",
1850
+ "elementary_streams": [
1851
+ "video-stream1",
1852
+ "audio-stream0",
1853
+ ],
1854
+ },
1855
+ {
1856
+ "key": "video-only-sd",
1857
+ "file_name": "video-only-sd.m4s",
1858
+ "container": "fmp4",
1859
+ "elementary_streams": ["video-stream0"],
1860
+ },
1861
+ {
1862
+ "key": "video-only-hd",
1863
+ "file_name": "video-only-hd.m4s",
1864
+ "container": "fmp4",
1865
+ "elementary_streams": ["video-stream1"],
1866
+ },
1867
+ {
1868
+ "key": "audio-only",
1869
+ "file_name": "audio-only.m4s",
1870
+ "container": "fmp4",
1871
+ "elementary_streams": ["audio-stream0"],
1872
+ },
1873
+ ],
1874
+ "manifests": [
1875
+ {
1876
+ "file_name": "manifest.m3u8",
1877
+ "type": "HLS",
1878
+ "mux_streams": [
1879
+ "media-sd",
1880
+ "media-hd",
1881
+ ],
1882
+ },
1883
+ {
1884
+ "file_name": "manifest.mpd",
1885
+ "type": "DASH",
1886
+ "mux_streams": [
1887
+ "video-only-sd",
1888
+ "video-only-hd",
1889
+ "audio-only",
1890
+ ],
1891
+ },
1892
+ ],
1893
+ "output": {
1894
+ "uri": default.name.apply(lambda name: f"gs://{name}/outputs/"),
1895
+ },
1896
+ },
1897
+ labels={
1898
+ "label": "key",
1899
+ })
1900
+ ```
1901
+
1902
+ ## Import
1903
+
1904
+ Job can be imported using any of these accepted formats:
1905
+
1906
+ * `{{name}}`
1907
+
1908
+ When using the `pulumi import` command, Job can be imported using one of the formats above. For example:
1909
+
1910
+ ```sh
1911
+ $ pulumi import gcp:transcoder/job:Job default {{name}}
1912
+ ```
1913
+
1914
+ :param str resource_name: The name of the resource.
1915
+ :param JobArgs args: The arguments to use to populate this resource's properties.
1916
+ :param pulumi.ResourceOptions opts: Options for the resource.
1917
+ """
1918
+ ...
1919
+ def __init__(__self__, resource_name: str, *args, **kwargs):
1920
+ resource_args, opts = _utilities.get_resource_args_opts(JobArgs, pulumi.ResourceOptions, *args, **kwargs)
1921
+ if resource_args is not None:
1922
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
1923
+ else:
1924
+ __self__._internal_init(resource_name, *args, **kwargs)
1925
+
1926
+ def _internal_init(__self__,
1927
+ resource_name: str,
1928
+ opts: Optional[pulumi.ResourceOptions] = None,
1929
+ config: Optional[pulumi.Input[Union['JobConfigArgs', 'JobConfigArgsDict']]] = None,
1930
+ labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
1931
+ location: Optional[pulumi.Input[str]] = None,
1932
+ project: Optional[pulumi.Input[str]] = None,
1933
+ template_id: Optional[pulumi.Input[str]] = None,
1934
+ __props__=None):
1935
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
1936
+ if not isinstance(opts, pulumi.ResourceOptions):
1937
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
1938
+ if opts.id is None:
1939
+ if __props__ is not None:
1940
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
1941
+ __props__ = JobArgs.__new__(JobArgs)
1942
+
1943
+ __props__.__dict__["config"] = config
1944
+ __props__.__dict__["labels"] = labels
1945
+ if location is None and not opts.urn:
1946
+ raise TypeError("Missing required property 'location'")
1947
+ __props__.__dict__["location"] = location
1948
+ __props__.__dict__["project"] = project
1949
+ __props__.__dict__["template_id"] = template_id
1950
+ __props__.__dict__["create_time"] = None
1951
+ __props__.__dict__["effective_labels"] = None
1952
+ __props__.__dict__["end_time"] = None
1953
+ __props__.__dict__["name"] = None
1954
+ __props__.__dict__["pulumi_labels"] = None
1955
+ __props__.__dict__["start_time"] = None
1956
+ __props__.__dict__["state"] = None
1957
+ secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["effectiveLabels", "pulumiLabels"])
1958
+ opts = pulumi.ResourceOptions.merge(opts, secret_opts)
1959
+ super(Job, __self__).__init__(
1960
+ 'gcp:transcoder/job:Job',
1961
+ resource_name,
1962
+ __props__,
1963
+ opts)
1964
+
1965
+ @staticmethod
1966
+ def get(resource_name: str,
1967
+ id: pulumi.Input[str],
1968
+ opts: Optional[pulumi.ResourceOptions] = None,
1969
+ config: Optional[pulumi.Input[Union['JobConfigArgs', 'JobConfigArgsDict']]] = None,
1970
+ create_time: Optional[pulumi.Input[str]] = None,
1971
+ effective_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
1972
+ end_time: Optional[pulumi.Input[str]] = None,
1973
+ labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
1974
+ location: Optional[pulumi.Input[str]] = None,
1975
+ name: Optional[pulumi.Input[str]] = None,
1976
+ project: Optional[pulumi.Input[str]] = None,
1977
+ pulumi_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
1978
+ start_time: Optional[pulumi.Input[str]] = None,
1979
+ state: Optional[pulumi.Input[str]] = None,
1980
+ template_id: Optional[pulumi.Input[str]] = None) -> 'Job':
1981
+ """
1982
+ Get an existing Job resource's state with the given name, id, and optional extra
1983
+ properties used to qualify the lookup.
1984
+
1985
+ :param str resource_name: The unique name of the resulting resource.
1986
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
1987
+ :param pulumi.ResourceOptions opts: Options for the resource.
1988
+ :param pulumi.Input[Union['JobConfigArgs', 'JobConfigArgsDict']] config: The configuration for this template.
1989
+ Structure is documented below.
1990
+ :param pulumi.Input[str] create_time: The time the job was created.
1991
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] effective_labels: All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
1992
+ :param pulumi.Input[str] end_time: The time the transcoding finished.
1993
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: The labels associated with this job. You can use these to organize and group your jobs.
1994
+
1995
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
1996
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
1997
+ :param pulumi.Input[str] location: The location of the transcoding job resource.
1998
+
1999
+
2000
+ - - -
2001
+ :param pulumi.Input[str] name: The resource name of the job.
2002
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
2003
+ If it is not provided, the provider project is used.
2004
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] pulumi_labels: The combination of labels configured directly on the resource
2005
+ and default labels configured on the provider.
2006
+ :param pulumi.Input[str] start_time: The time the transcoding started.
2007
+ :param pulumi.Input[str] state: The current state of the job.
2008
+ :param pulumi.Input[str] template_id: Specify the templateId to use for populating Job.config.
2009
+ The default is preset/web-hd, which is the only supported preset.
2010
+ """
2011
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
2012
+
2013
+ __props__ = _JobState.__new__(_JobState)
2014
+
2015
+ __props__.__dict__["config"] = config
2016
+ __props__.__dict__["create_time"] = create_time
2017
+ __props__.__dict__["effective_labels"] = effective_labels
2018
+ __props__.__dict__["end_time"] = end_time
2019
+ __props__.__dict__["labels"] = labels
2020
+ __props__.__dict__["location"] = location
2021
+ __props__.__dict__["name"] = name
2022
+ __props__.__dict__["project"] = project
2023
+ __props__.__dict__["pulumi_labels"] = pulumi_labels
2024
+ __props__.__dict__["start_time"] = start_time
2025
+ __props__.__dict__["state"] = state
2026
+ __props__.__dict__["template_id"] = template_id
2027
+ return Job(resource_name, opts=opts, __props__=__props__)
2028
+
2029
+ @property
2030
+ @pulumi.getter
2031
+ def config(self) -> pulumi.Output['outputs.JobConfig']:
2032
+ """
2033
+ The configuration for this template.
2034
+ Structure is documented below.
2035
+ """
2036
+ return pulumi.get(self, "config")
2037
+
2038
+ @property
2039
+ @pulumi.getter(name="createTime")
2040
+ def create_time(self) -> pulumi.Output[str]:
2041
+ """
2042
+ The time the job was created.
2043
+ """
2044
+ return pulumi.get(self, "create_time")
2045
+
2046
+ @property
2047
+ @pulumi.getter(name="effectiveLabels")
2048
+ def effective_labels(self) -> pulumi.Output[Mapping[str, str]]:
2049
+ """
2050
+ All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
2051
+ """
2052
+ return pulumi.get(self, "effective_labels")
2053
+
2054
+ @property
2055
+ @pulumi.getter(name="endTime")
2056
+ def end_time(self) -> pulumi.Output[str]:
2057
+ """
2058
+ The time the transcoding finished.
2059
+ """
2060
+ return pulumi.get(self, "end_time")
2061
+
2062
+ @property
2063
+ @pulumi.getter
2064
+ def labels(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
2065
+ """
2066
+ The labels associated with this job. You can use these to organize and group your jobs.
2067
+
2068
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
2069
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
2070
+ """
2071
+ return pulumi.get(self, "labels")
2072
+
2073
+ @property
2074
+ @pulumi.getter
2075
+ def location(self) -> pulumi.Output[str]:
2076
+ """
2077
+ The location of the transcoding job resource.
2078
+
2079
+
2080
+ - - -
2081
+ """
2082
+ return pulumi.get(self, "location")
2083
+
2084
+ @property
2085
+ @pulumi.getter
2086
+ def name(self) -> pulumi.Output[str]:
2087
+ """
2088
+ The resource name of the job.
2089
+ """
2090
+ return pulumi.get(self, "name")
2091
+
2092
+ @property
2093
+ @pulumi.getter
2094
+ def project(self) -> pulumi.Output[str]:
2095
+ """
2096
+ The ID of the project in which the resource belongs.
2097
+ If it is not provided, the provider project is used.
2098
+ """
2099
+ return pulumi.get(self, "project")
2100
+
2101
+ @property
2102
+ @pulumi.getter(name="pulumiLabels")
2103
+ def pulumi_labels(self) -> pulumi.Output[Mapping[str, str]]:
2104
+ """
2105
+ The combination of labels configured directly on the resource
2106
+ and default labels configured on the provider.
2107
+ """
2108
+ return pulumi.get(self, "pulumi_labels")
2109
+
2110
+ @property
2111
+ @pulumi.getter(name="startTime")
2112
+ def start_time(self) -> pulumi.Output[str]:
2113
+ """
2114
+ The time the transcoding started.
2115
+ """
2116
+ return pulumi.get(self, "start_time")
2117
+
2118
+ @property
2119
+ @pulumi.getter
2120
+ def state(self) -> pulumi.Output[str]:
2121
+ """
2122
+ The current state of the job.
2123
+ """
2124
+ return pulumi.get(self, "state")
2125
+
2126
+ @property
2127
+ @pulumi.getter(name="templateId")
2128
+ def template_id(self) -> pulumi.Output[str]:
2129
+ """
2130
+ Specify the templateId to use for populating Job.config.
2131
+ The default is preset/web-hd, which is the only supported preset.
2132
+ """
2133
+ return pulumi.get(self, "template_id")
2134
+