pulumi-github 6.12.0__py3-none-any.whl → 6.12.0a1769172728__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 (31) hide show
  1. pulumi_github/__init__.py +0 -28
  2. pulumi_github/_inputs.py +19 -324
  3. pulumi_github/actions_environment_secret.py +12 -141
  4. pulumi_github/actions_environment_variable.py +37 -71
  5. pulumi_github/actions_organization_permissions.py +3 -50
  6. pulumi_github/actions_organization_secret.py +55 -164
  7. pulumi_github/actions_organization_secret_repositories.py +28 -44
  8. pulumi_github/actions_organization_secret_repository.py +28 -44
  9. pulumi_github/actions_organization_variable.py +47 -44
  10. pulumi_github/actions_repository_permissions.py +3 -50
  11. pulumi_github/actions_secret.py +41 -176
  12. pulumi_github/actions_variable.py +33 -65
  13. pulumi_github/app_installation_repositories.py +6 -6
  14. pulumi_github/app_installation_repository.py +6 -6
  15. pulumi_github/dependabot_organization_secret.py +59 -128
  16. pulumi_github/dependabot_organization_secret_repositories.py +36 -44
  17. pulumi_github/dependabot_secret.py +41 -154
  18. pulumi_github/emu_group_mapping.py +4 -64
  19. pulumi_github/organization_ruleset.py +17 -11
  20. pulumi_github/outputs.py +13 -234
  21. pulumi_github/pulumi-plugin.json +1 -1
  22. pulumi_github/repository.py +27 -32
  23. pulumi_github/repository_ruleset.py +7 -7
  24. {pulumi_github-6.12.0.dist-info → pulumi_github-6.12.0a1769172728.dist-info}/METADATA +1 -1
  25. {pulumi_github-6.12.0.dist-info → pulumi_github-6.12.0a1769172728.dist-info}/RECORD +27 -31
  26. {pulumi_github-6.12.0.dist-info → pulumi_github-6.12.0a1769172728.dist-info}/WHEEL +1 -1
  27. pulumi_github/actions_organization_variable_repositories.py +0 -262
  28. pulumi_github/actions_organization_variable_repository.py +0 -262
  29. pulumi_github/dependabot_organization_secret_repository.py +0 -262
  30. pulumi_github/get_release_asset.py +0 -370
  31. {pulumi_github-6.12.0.dist-info → pulumi_github-6.12.0a1769172728.dist-info}/top_level.txt +0 -0
@@ -1,262 +0,0 @@
1
- # coding=utf-8
2
- # *** WARNING: this file was generated by pulumi-language-python. ***
3
- # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
-
5
- import builtins as _builtins
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
-
17
- __all__ = ['DependabotOrganizationSecretRepositoryArgs', 'DependabotOrganizationSecretRepository']
18
-
19
- @pulumi.input_type
20
- class DependabotOrganizationSecretRepositoryArgs:
21
- def __init__(__self__, *,
22
- repository_id: pulumi.Input[_builtins.int],
23
- secret_name: pulumi.Input[_builtins.str]):
24
- """
25
- The set of arguments for constructing a DependabotOrganizationSecretRepository resource.
26
- :param pulumi.Input[_builtins.int] repository_id: ID of the repository that should be able to access the secret.
27
- :param pulumi.Input[_builtins.str] secret_name: Name of the Dependabot organization secret.
28
- """
29
- pulumi.set(__self__, "repository_id", repository_id)
30
- pulumi.set(__self__, "secret_name", secret_name)
31
-
32
- @_builtins.property
33
- @pulumi.getter(name="repositoryId")
34
- def repository_id(self) -> pulumi.Input[_builtins.int]:
35
- """
36
- ID of the repository that should be able to access the secret.
37
- """
38
- return pulumi.get(self, "repository_id")
39
-
40
- @repository_id.setter
41
- def repository_id(self, value: pulumi.Input[_builtins.int]):
42
- pulumi.set(self, "repository_id", value)
43
-
44
- @_builtins.property
45
- @pulumi.getter(name="secretName")
46
- def secret_name(self) -> pulumi.Input[_builtins.str]:
47
- """
48
- Name of the Dependabot organization secret.
49
- """
50
- return pulumi.get(self, "secret_name")
51
-
52
- @secret_name.setter
53
- def secret_name(self, value: pulumi.Input[_builtins.str]):
54
- pulumi.set(self, "secret_name", value)
55
-
56
-
57
- @pulumi.input_type
58
- class _DependabotOrganizationSecretRepositoryState:
59
- def __init__(__self__, *,
60
- repository_id: Optional[pulumi.Input[_builtins.int]] = None,
61
- secret_name: Optional[pulumi.Input[_builtins.str]] = None):
62
- """
63
- Input properties used for looking up and filtering DependabotOrganizationSecretRepository resources.
64
- :param pulumi.Input[_builtins.int] repository_id: ID of the repository that should be able to access the secret.
65
- :param pulumi.Input[_builtins.str] secret_name: Name of the Dependabot organization secret.
66
- """
67
- if repository_id is not None:
68
- pulumi.set(__self__, "repository_id", repository_id)
69
- if secret_name is not None:
70
- pulumi.set(__self__, "secret_name", secret_name)
71
-
72
- @_builtins.property
73
- @pulumi.getter(name="repositoryId")
74
- def repository_id(self) -> Optional[pulumi.Input[_builtins.int]]:
75
- """
76
- ID of the repository that should be able to access the secret.
77
- """
78
- return pulumi.get(self, "repository_id")
79
-
80
- @repository_id.setter
81
- def repository_id(self, value: Optional[pulumi.Input[_builtins.int]]):
82
- pulumi.set(self, "repository_id", value)
83
-
84
- @_builtins.property
85
- @pulumi.getter(name="secretName")
86
- def secret_name(self) -> Optional[pulumi.Input[_builtins.str]]:
87
- """
88
- Name of the Dependabot organization secret.
89
- """
90
- return pulumi.get(self, "secret_name")
91
-
92
- @secret_name.setter
93
- def secret_name(self, value: Optional[pulumi.Input[_builtins.str]]):
94
- pulumi.set(self, "secret_name", value)
95
-
96
-
97
- @pulumi.type_token("github:index/dependabotOrganizationSecretRepository:DependabotOrganizationSecretRepository")
98
- class DependabotOrganizationSecretRepository(pulumi.CustomResource):
99
- @overload
100
- def __init__(__self__,
101
- resource_name: str,
102
- opts: Optional[pulumi.ResourceOptions] = None,
103
- repository_id: Optional[pulumi.Input[_builtins.int]] = None,
104
- secret_name: Optional[pulumi.Input[_builtins.str]] = None,
105
- __props__=None):
106
- """
107
- This resource adds permission for a repository to use a Dependabot secret within your GitHub organization.
108
- You must have write access to an organization secret to use this resource.
109
-
110
- This resource is only applicable when `visibility` of the existing organization secret has been set to `selected`.
111
-
112
- ## Example Usage
113
-
114
- ```python
115
- import pulumi
116
- import pulumi_github as github
117
-
118
- example = github.DependabotOrganizationSecret("example",
119
- secret_name="mysecret",
120
- plaintext_value="foo",
121
- visibility="selected")
122
- example_repository = github.Repository("example",
123
- name="myrepo",
124
- visibility="public")
125
- example_dependabot_organization_secret_repository = github.DependabotOrganizationSecretRepository("example",
126
- secret_name=example.name,
127
- repository_id=example_repository.repo_id)
128
- ```
129
-
130
- ## Import
131
-
132
- ### Import Command
133
-
134
- The following command imports the access of repository ID `123456` for the Dependabot organization secret named `mysecret` to a `v` resource named `example`.
135
-
136
- ```sh
137
- $ pulumi import github:index/dependabotOrganizationSecretRepository:DependabotOrganizationSecretRepository example mysecret:123456
138
- ```
139
-
140
- :param str resource_name: The name of the resource.
141
- :param pulumi.ResourceOptions opts: Options for the resource.
142
- :param pulumi.Input[_builtins.int] repository_id: ID of the repository that should be able to access the secret.
143
- :param pulumi.Input[_builtins.str] secret_name: Name of the Dependabot organization secret.
144
- """
145
- ...
146
- @overload
147
- def __init__(__self__,
148
- resource_name: str,
149
- args: DependabotOrganizationSecretRepositoryArgs,
150
- opts: Optional[pulumi.ResourceOptions] = None):
151
- """
152
- This resource adds permission for a repository to use a Dependabot secret within your GitHub organization.
153
- You must have write access to an organization secret to use this resource.
154
-
155
- This resource is only applicable when `visibility` of the existing organization secret has been set to `selected`.
156
-
157
- ## Example Usage
158
-
159
- ```python
160
- import pulumi
161
- import pulumi_github as github
162
-
163
- example = github.DependabotOrganizationSecret("example",
164
- secret_name="mysecret",
165
- plaintext_value="foo",
166
- visibility="selected")
167
- example_repository = github.Repository("example",
168
- name="myrepo",
169
- visibility="public")
170
- example_dependabot_organization_secret_repository = github.DependabotOrganizationSecretRepository("example",
171
- secret_name=example.name,
172
- repository_id=example_repository.repo_id)
173
- ```
174
-
175
- ## Import
176
-
177
- ### Import Command
178
-
179
- The following command imports the access of repository ID `123456` for the Dependabot organization secret named `mysecret` to a `v` resource named `example`.
180
-
181
- ```sh
182
- $ pulumi import github:index/dependabotOrganizationSecretRepository:DependabotOrganizationSecretRepository example mysecret:123456
183
- ```
184
-
185
- :param str resource_name: The name of the resource.
186
- :param DependabotOrganizationSecretRepositoryArgs args: The arguments to use to populate this resource's properties.
187
- :param pulumi.ResourceOptions opts: Options for the resource.
188
- """
189
- ...
190
- def __init__(__self__, resource_name: str, *args, **kwargs):
191
- resource_args, opts = _utilities.get_resource_args_opts(DependabotOrganizationSecretRepositoryArgs, pulumi.ResourceOptions, *args, **kwargs)
192
- if resource_args is not None:
193
- __self__._internal_init(resource_name, opts, **resource_args.__dict__)
194
- else:
195
- __self__._internal_init(resource_name, *args, **kwargs)
196
-
197
- def _internal_init(__self__,
198
- resource_name: str,
199
- opts: Optional[pulumi.ResourceOptions] = None,
200
- repository_id: Optional[pulumi.Input[_builtins.int]] = None,
201
- secret_name: Optional[pulumi.Input[_builtins.str]] = None,
202
- __props__=None):
203
- opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
204
- if not isinstance(opts, pulumi.ResourceOptions):
205
- raise TypeError('Expected resource options to be a ResourceOptions instance')
206
- if opts.id is None:
207
- if __props__ is not None:
208
- raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
209
- __props__ = DependabotOrganizationSecretRepositoryArgs.__new__(DependabotOrganizationSecretRepositoryArgs)
210
-
211
- if repository_id is None and not opts.urn:
212
- raise TypeError("Missing required property 'repository_id'")
213
- __props__.__dict__["repository_id"] = repository_id
214
- if secret_name is None and not opts.urn:
215
- raise TypeError("Missing required property 'secret_name'")
216
- __props__.__dict__["secret_name"] = secret_name
217
- super(DependabotOrganizationSecretRepository, __self__).__init__(
218
- 'github:index/dependabotOrganizationSecretRepository:DependabotOrganizationSecretRepository',
219
- resource_name,
220
- __props__,
221
- opts)
222
-
223
- @staticmethod
224
- def get(resource_name: str,
225
- id: pulumi.Input[str],
226
- opts: Optional[pulumi.ResourceOptions] = None,
227
- repository_id: Optional[pulumi.Input[_builtins.int]] = None,
228
- secret_name: Optional[pulumi.Input[_builtins.str]] = None) -> 'DependabotOrganizationSecretRepository':
229
- """
230
- Get an existing DependabotOrganizationSecretRepository resource's state with the given name, id, and optional extra
231
- properties used to qualify the lookup.
232
-
233
- :param str resource_name: The unique name of the resulting resource.
234
- :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
235
- :param pulumi.ResourceOptions opts: Options for the resource.
236
- :param pulumi.Input[_builtins.int] repository_id: ID of the repository that should be able to access the secret.
237
- :param pulumi.Input[_builtins.str] secret_name: Name of the Dependabot organization secret.
238
- """
239
- opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
240
-
241
- __props__ = _DependabotOrganizationSecretRepositoryState.__new__(_DependabotOrganizationSecretRepositoryState)
242
-
243
- __props__.__dict__["repository_id"] = repository_id
244
- __props__.__dict__["secret_name"] = secret_name
245
- return DependabotOrganizationSecretRepository(resource_name, opts=opts, __props__=__props__)
246
-
247
- @_builtins.property
248
- @pulumi.getter(name="repositoryId")
249
- def repository_id(self) -> pulumi.Output[_builtins.int]:
250
- """
251
- ID of the repository that should be able to access the secret.
252
- """
253
- return pulumi.get(self, "repository_id")
254
-
255
- @_builtins.property
256
- @pulumi.getter(name="secretName")
257
- def secret_name(self) -> pulumi.Output[_builtins.str]:
258
- """
259
- Name of the Dependabot organization secret.
260
- """
261
- return pulumi.get(self, "secret_name")
262
-
@@ -1,370 +0,0 @@
1
- # coding=utf-8
2
- # *** WARNING: this file was generated by pulumi-language-python. ***
3
- # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
-
5
- import builtins as _builtins
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
-
17
- __all__ = [
18
- 'GetReleaseAssetResult',
19
- 'AwaitableGetReleaseAssetResult',
20
- 'get_release_asset',
21
- 'get_release_asset_output',
22
- ]
23
-
24
- @pulumi.output_type
25
- class GetReleaseAssetResult:
26
- """
27
- A collection of values returned by getReleaseAsset.
28
- """
29
- def __init__(__self__, asset_id=None, browser_download_url=None, content_type=None, created_at=None, download_file_contents=None, file_contents=None, id=None, label=None, name=None, node_id=None, owner=None, repository=None, size=None, updated_at=None, url=None):
30
- if asset_id and not isinstance(asset_id, int):
31
- raise TypeError("Expected argument 'asset_id' to be a int")
32
- pulumi.set(__self__, "asset_id", asset_id)
33
- if browser_download_url and not isinstance(browser_download_url, str):
34
- raise TypeError("Expected argument 'browser_download_url' to be a str")
35
- pulumi.set(__self__, "browser_download_url", browser_download_url)
36
- if content_type and not isinstance(content_type, str):
37
- raise TypeError("Expected argument 'content_type' to be a str")
38
- pulumi.set(__self__, "content_type", content_type)
39
- if created_at and not isinstance(created_at, str):
40
- raise TypeError("Expected argument 'created_at' to be a str")
41
- pulumi.set(__self__, "created_at", created_at)
42
- if download_file_contents and not isinstance(download_file_contents, bool):
43
- raise TypeError("Expected argument 'download_file_contents' to be a bool")
44
- pulumi.set(__self__, "download_file_contents", download_file_contents)
45
- if file_contents and not isinstance(file_contents, str):
46
- raise TypeError("Expected argument 'file_contents' to be a str")
47
- pulumi.set(__self__, "file_contents", file_contents)
48
- if id and not isinstance(id, str):
49
- raise TypeError("Expected argument 'id' to be a str")
50
- pulumi.set(__self__, "id", id)
51
- if label and not isinstance(label, str):
52
- raise TypeError("Expected argument 'label' to be a str")
53
- pulumi.set(__self__, "label", label)
54
- if name and not isinstance(name, str):
55
- raise TypeError("Expected argument 'name' to be a str")
56
- pulumi.set(__self__, "name", name)
57
- if node_id and not isinstance(node_id, str):
58
- raise TypeError("Expected argument 'node_id' to be a str")
59
- pulumi.set(__self__, "node_id", node_id)
60
- if owner and not isinstance(owner, str):
61
- raise TypeError("Expected argument 'owner' to be a str")
62
- pulumi.set(__self__, "owner", owner)
63
- if repository and not isinstance(repository, str):
64
- raise TypeError("Expected argument 'repository' to be a str")
65
- pulumi.set(__self__, "repository", repository)
66
- if size and not isinstance(size, int):
67
- raise TypeError("Expected argument 'size' to be a int")
68
- pulumi.set(__self__, "size", size)
69
- if updated_at and not isinstance(updated_at, str):
70
- raise TypeError("Expected argument 'updated_at' to be a str")
71
- pulumi.set(__self__, "updated_at", updated_at)
72
- if url and not isinstance(url, str):
73
- raise TypeError("Expected argument 'url' to be a str")
74
- pulumi.set(__self__, "url", url)
75
-
76
- @_builtins.property
77
- @pulumi.getter(name="assetId")
78
- def asset_id(self) -> _builtins.int:
79
- return pulumi.get(self, "asset_id")
80
-
81
- @_builtins.property
82
- @pulumi.getter(name="browserDownloadUrl")
83
- def browser_download_url(self) -> _builtins.str:
84
- """
85
- Browser URL from which the release asset can be downloaded
86
- """
87
- return pulumi.get(self, "browser_download_url")
88
-
89
- @_builtins.property
90
- @pulumi.getter(name="contentType")
91
- def content_type(self) -> _builtins.str:
92
- """
93
- MIME type of the asset
94
- """
95
- return pulumi.get(self, "content_type")
96
-
97
- @_builtins.property
98
- @pulumi.getter(name="createdAt")
99
- def created_at(self) -> _builtins.str:
100
- """
101
- Date the asset was created
102
- """
103
- return pulumi.get(self, "created_at")
104
-
105
- @_builtins.property
106
- @pulumi.getter(name="downloadFileContents")
107
- def download_file_contents(self) -> Optional[_builtins.bool]:
108
- return pulumi.get(self, "download_file_contents")
109
-
110
- @_builtins.property
111
- @pulumi.getter(name="fileContents")
112
- def file_contents(self) -> _builtins.str:
113
- """
114
- The base64-encoded release asset file contents (requires `download_file_contents` to be `true`)
115
- """
116
- return pulumi.get(self, "file_contents")
117
-
118
- @_builtins.property
119
- @pulumi.getter
120
- def id(self) -> _builtins.str:
121
- """
122
- The provider-assigned unique ID for this managed resource.
123
- """
124
- return pulumi.get(self, "id")
125
-
126
- @_builtins.property
127
- @pulumi.getter
128
- def label(self) -> _builtins.str:
129
- """
130
- Label for the asset
131
- """
132
- return pulumi.get(self, "label")
133
-
134
- @_builtins.property
135
- @pulumi.getter
136
- def name(self) -> _builtins.str:
137
- """
138
- The file name of the asset
139
- """
140
- return pulumi.get(self, "name")
141
-
142
- @_builtins.property
143
- @pulumi.getter(name="nodeId")
144
- def node_id(self) -> _builtins.str:
145
- """
146
- Node ID of the asset
147
- """
148
- return pulumi.get(self, "node_id")
149
-
150
- @_builtins.property
151
- @pulumi.getter
152
- def owner(self) -> _builtins.str:
153
- return pulumi.get(self, "owner")
154
-
155
- @_builtins.property
156
- @pulumi.getter
157
- def repository(self) -> _builtins.str:
158
- return pulumi.get(self, "repository")
159
-
160
- @_builtins.property
161
- @pulumi.getter
162
- def size(self) -> _builtins.int:
163
- """
164
- Asset size in bytes
165
- """
166
- return pulumi.get(self, "size")
167
-
168
- @_builtins.property
169
- @pulumi.getter(name="updatedAt")
170
- def updated_at(self) -> _builtins.str:
171
- """
172
- Date the asset was last updated
173
- """
174
- return pulumi.get(self, "updated_at")
175
-
176
- @_builtins.property
177
- @pulumi.getter
178
- def url(self) -> _builtins.str:
179
- """
180
- URL of the asset
181
- """
182
- return pulumi.get(self, "url")
183
-
184
-
185
- class AwaitableGetReleaseAssetResult(GetReleaseAssetResult):
186
- # pylint: disable=using-constant-test
187
- def __await__(self):
188
- if False:
189
- yield self
190
- return GetReleaseAssetResult(
191
- asset_id=self.asset_id,
192
- browser_download_url=self.browser_download_url,
193
- content_type=self.content_type,
194
- created_at=self.created_at,
195
- download_file_contents=self.download_file_contents,
196
- file_contents=self.file_contents,
197
- id=self.id,
198
- label=self.label,
199
- name=self.name,
200
- node_id=self.node_id,
201
- owner=self.owner,
202
- repository=self.repository,
203
- size=self.size,
204
- updated_at=self.updated_at,
205
- url=self.url)
206
-
207
-
208
- def get_release_asset(asset_id: Optional[_builtins.int] = None,
209
- download_file_contents: Optional[_builtins.bool] = None,
210
- owner: Optional[_builtins.str] = None,
211
- repository: Optional[_builtins.str] = None,
212
- opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetReleaseAssetResult:
213
- """
214
- Use this data source to retrieve information about a GitHub release asset.
215
-
216
- ## Example Usage
217
-
218
- To retrieve a specific release asset from a repository based on its ID:
219
-
220
- ```python
221
- import pulumi
222
- import pulumi_github as github
223
-
224
- example = github.get_release_asset(repository="example-repository",
225
- owner="example-owner",
226
- asset_id=12345)
227
- ```
228
-
229
- To retrieve a specific release asset from a repository, and download the file
230
- into a `file` attribute on the data source:
231
-
232
- To retrieve the first release asset associated with the latest release in a repository:
233
-
234
- ```python
235
- import pulumi
236
- import pulumi_github as github
237
-
238
- example = github.get_release(repository="example-repository",
239
- owner="example-owner",
240
- retrieve_by="latest")
241
- example_get_release_asset = github.get_release_asset(repository="example-repository",
242
- owner="example-owner",
243
- asset_id=example.assets[0].id)
244
- ```
245
-
246
- To retrieve all release assets associated with the the latest release in a repository:
247
-
248
- ```python
249
- import pulumi
250
- import pulumi_github as github
251
-
252
- example = github.get_release(repository="example-repository",
253
- owner="example-owner",
254
- retrieve_by="latest")
255
- example_get_release_asset = [github.get_release_asset(repository="example-repository",
256
- owner="example-owner",
257
- asset_id=example.assets[__index].id) for __index in len(example.assets).apply(lambda length: range(length))]
258
- ```
259
-
260
-
261
- :param _builtins.int asset_id: ID of the release asset to retrieve
262
- :param _builtins.bool download_file_contents: Whether to download the asset file content into the `file_contents` attribute (defaults to `false`)
263
- :param _builtins.str owner: Owner of the repository
264
- :param _builtins.str repository: Name of the repository to retrieve the release from
265
- """
266
- __args__ = dict()
267
- __args__['assetId'] = asset_id
268
- __args__['downloadFileContents'] = download_file_contents
269
- __args__['owner'] = owner
270
- __args__['repository'] = repository
271
- opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
272
- __ret__ = pulumi.runtime.invoke('github:index/getReleaseAsset:getReleaseAsset', __args__, opts=opts, typ=GetReleaseAssetResult).value
273
-
274
- return AwaitableGetReleaseAssetResult(
275
- asset_id=pulumi.get(__ret__, 'asset_id'),
276
- browser_download_url=pulumi.get(__ret__, 'browser_download_url'),
277
- content_type=pulumi.get(__ret__, 'content_type'),
278
- created_at=pulumi.get(__ret__, 'created_at'),
279
- download_file_contents=pulumi.get(__ret__, 'download_file_contents'),
280
- file_contents=pulumi.get(__ret__, 'file_contents'),
281
- id=pulumi.get(__ret__, 'id'),
282
- label=pulumi.get(__ret__, 'label'),
283
- name=pulumi.get(__ret__, 'name'),
284
- node_id=pulumi.get(__ret__, 'node_id'),
285
- owner=pulumi.get(__ret__, 'owner'),
286
- repository=pulumi.get(__ret__, 'repository'),
287
- size=pulumi.get(__ret__, 'size'),
288
- updated_at=pulumi.get(__ret__, 'updated_at'),
289
- url=pulumi.get(__ret__, 'url'))
290
- def get_release_asset_output(asset_id: Optional[pulumi.Input[_builtins.int]] = None,
291
- download_file_contents: Optional[pulumi.Input[Optional[_builtins.bool]]] = None,
292
- owner: Optional[pulumi.Input[_builtins.str]] = None,
293
- repository: Optional[pulumi.Input[_builtins.str]] = None,
294
- opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetReleaseAssetResult]:
295
- """
296
- Use this data source to retrieve information about a GitHub release asset.
297
-
298
- ## Example Usage
299
-
300
- To retrieve a specific release asset from a repository based on its ID:
301
-
302
- ```python
303
- import pulumi
304
- import pulumi_github as github
305
-
306
- example = github.get_release_asset(repository="example-repository",
307
- owner="example-owner",
308
- asset_id=12345)
309
- ```
310
-
311
- To retrieve a specific release asset from a repository, and download the file
312
- into a `file` attribute on the data source:
313
-
314
- To retrieve the first release asset associated with the latest release in a repository:
315
-
316
- ```python
317
- import pulumi
318
- import pulumi_github as github
319
-
320
- example = github.get_release(repository="example-repository",
321
- owner="example-owner",
322
- retrieve_by="latest")
323
- example_get_release_asset = github.get_release_asset(repository="example-repository",
324
- owner="example-owner",
325
- asset_id=example.assets[0].id)
326
- ```
327
-
328
- To retrieve all release assets associated with the the latest release in a repository:
329
-
330
- ```python
331
- import pulumi
332
- import pulumi_github as github
333
-
334
- example = github.get_release(repository="example-repository",
335
- owner="example-owner",
336
- retrieve_by="latest")
337
- example_get_release_asset = [github.get_release_asset(repository="example-repository",
338
- owner="example-owner",
339
- asset_id=example.assets[__index].id) for __index in len(example.assets).apply(lambda length: range(length))]
340
- ```
341
-
342
-
343
- :param _builtins.int asset_id: ID of the release asset to retrieve
344
- :param _builtins.bool download_file_contents: Whether to download the asset file content into the `file_contents` attribute (defaults to `false`)
345
- :param _builtins.str owner: Owner of the repository
346
- :param _builtins.str repository: Name of the repository to retrieve the release from
347
- """
348
- __args__ = dict()
349
- __args__['assetId'] = asset_id
350
- __args__['downloadFileContents'] = download_file_contents
351
- __args__['owner'] = owner
352
- __args__['repository'] = repository
353
- opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
354
- __ret__ = pulumi.runtime.invoke_output('github:index/getReleaseAsset:getReleaseAsset', __args__, opts=opts, typ=GetReleaseAssetResult)
355
- return __ret__.apply(lambda __response__: GetReleaseAssetResult(
356
- asset_id=pulumi.get(__response__, 'asset_id'),
357
- browser_download_url=pulumi.get(__response__, 'browser_download_url'),
358
- content_type=pulumi.get(__response__, 'content_type'),
359
- created_at=pulumi.get(__response__, 'created_at'),
360
- download_file_contents=pulumi.get(__response__, 'download_file_contents'),
361
- file_contents=pulumi.get(__response__, 'file_contents'),
362
- id=pulumi.get(__response__, 'id'),
363
- label=pulumi.get(__response__, 'label'),
364
- name=pulumi.get(__response__, 'name'),
365
- node_id=pulumi.get(__response__, 'node_id'),
366
- owner=pulumi.get(__response__, 'owner'),
367
- repository=pulumi.get(__response__, 'repository'),
368
- size=pulumi.get(__response__, 'size'),
369
- updated_at=pulumi.get(__response__, 'updated_at'),
370
- url=pulumi.get(__response__, 'url')))