@pulumi/digitalocean 4.7.0-alpha.1633346817

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 (240) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +68 -0
  3. package/app.d.ts +203 -0
  4. package/app.js +174 -0
  5. package/app.js.map +1 -0
  6. package/cdn.d.ts +169 -0
  7. package/cdn.js +116 -0
  8. package/cdn.js.map +1 -0
  9. package/certificate.d.ts +225 -0
  10. package/certificate.js +137 -0
  11. package/certificate.js.map +1 -0
  12. package/config/index.d.ts +1 -0
  13. package/config/index.js +10 -0
  14. package/config/index.js.map +1 -0
  15. package/config/vars.d.ts +20 -0
  16. package/config/vars.js +28 -0
  17. package/config/vars.js.map +1 -0
  18. package/containerRegistry.d.ts +88 -0
  19. package/containerRegistry.js +83 -0
  20. package/containerRegistry.js.map +1 -0
  21. package/containerRegistryDockerCredentials.d.ts +108 -0
  22. package/containerRegistryDockerCredentials.js +93 -0
  23. package/containerRegistryDockerCredentials.js.map +1 -0
  24. package/customImage.d.ts +155 -0
  25. package/customImage.js +113 -0
  26. package/customImage.js.map +1 -0
  27. package/databaseCluster.d.ts +306 -0
  28. package/databaseCluster.js +165 -0
  29. package/databaseCluster.js.map +1 -0
  30. package/databaseConnectionPool.d.ts +189 -0
  31. package/databaseConnectionPool.js +120 -0
  32. package/databaseConnectionPool.js.map +1 -0
  33. package/databaseDb.d.ts +87 -0
  34. package/databaseDb.js +82 -0
  35. package/databaseDb.js.map +1 -0
  36. package/databaseFirewall.d.ts +129 -0
  37. package/databaseFirewall.js +126 -0
  38. package/databaseFirewall.js.map +1 -0
  39. package/databaseReplica.d.ts +204 -0
  40. package/databaseReplica.js +110 -0
  41. package/databaseReplica.js.map +1 -0
  42. package/databaseUser.d.ts +117 -0
  43. package/databaseUser.js +90 -0
  44. package/databaseUser.js.map +1 -0
  45. package/dnsRecord.d.ts +200 -0
  46. package/dnsRecord.js +114 -0
  47. package/dnsRecord.js.map +1 -0
  48. package/domain.d.ts +103 -0
  49. package/domain.js +83 -0
  50. package/domain.js.map +1 -0
  51. package/droplet.d.ts +386 -0
  52. package/droplet.js +137 -0
  53. package/droplet.js.map +1 -0
  54. package/dropletSnapshot.d.ts +117 -0
  55. package/dropletSnapshot.js +88 -0
  56. package/dropletSnapshot.js.map +1 -0
  57. package/firewall.d.ts +226 -0
  58. package/firewall.js +150 -0
  59. package/firewall.js.map +1 -0
  60. package/floatingIp.d.ts +112 -0
  61. package/floatingIp.js +91 -0
  62. package/floatingIp.js.map +1 -0
  63. package/floatingIpAssignment.d.ts +85 -0
  64. package/floatingIpAssignment.js +83 -0
  65. package/floatingIpAssignment.js.map +1 -0
  66. package/getAccount.d.ts +32 -0
  67. package/getAccount.js +31 -0
  68. package/getAccount.js.map +1 -0
  69. package/getApp.d.ts +63 -0
  70. package/getApp.js +36 -0
  71. package/getApp.js.map +1 -0
  72. package/getCertificate.d.ts +48 -0
  73. package/getCertificate.js +40 -0
  74. package/getCertificate.js.map +1 -0
  75. package/getContainerRegistry.d.ts +54 -0
  76. package/getContainerRegistry.js +41 -0
  77. package/getContainerRegistry.js.map +1 -0
  78. package/getDatabaseCluster.d.ts +103 -0
  79. package/getDatabaseCluster.js +35 -0
  80. package/getDatabaseCluster.js.map +1 -0
  81. package/getDatabaseReplica.d.ts +87 -0
  82. package/getDatabaseReplica.js +40 -0
  83. package/getDatabaseReplica.js.map +1 -0
  84. package/getDomain.d.ts +37 -0
  85. package/getDomain.js +28 -0
  86. package/getDomain.js.map +1 -0
  87. package/getDomains.d.ts +61 -0
  88. package/getDomains.js +49 -0
  89. package/getDomains.js.map +1 -0
  90. package/getDroplet.d.ts +161 -0
  91. package/getDroplet.js +67 -0
  92. package/getDroplet.js.map +1 -0
  93. package/getDropletSnapshot.d.ts +76 -0
  94. package/getDropletSnapshot.js +43 -0
  95. package/getDropletSnapshot.js.map +1 -0
  96. package/getDroplets.d.ts +85 -0
  97. package/getDroplets.js +73 -0
  98. package/getDroplets.js.map +1 -0
  99. package/getFirewall.d.ts +83 -0
  100. package/getFirewall.js +40 -0
  101. package/getFirewall.js.map +1 -0
  102. package/getFloatingIp.d.ts +48 -0
  103. package/getFloatingIp.js +43 -0
  104. package/getFloatingIp.js.map +1 -0
  105. package/getImage.d.ts +110 -0
  106. package/getImage.js +71 -0
  107. package/getImage.js.map +1 -0
  108. package/getImages.d.ts +90 -0
  109. package/getImages.js +74 -0
  110. package/getImages.js.map +1 -0
  111. package/getKubernetesCluster.d.ts +95 -0
  112. package/getKubernetesCluster.js +23 -0
  113. package/getKubernetesCluster.js.map +1 -0
  114. package/getKubernetesVersions.d.ts +79 -0
  115. package/getKubernetesVersions.js +70 -0
  116. package/getKubernetesVersions.js.map +1 -0
  117. package/getLoadBalancer.d.ts +59 -0
  118. package/getLoadBalancer.js +41 -0
  119. package/getLoadBalancer.js.map +1 -0
  120. package/getProject.d.ts +72 -0
  121. package/getProject.js +37 -0
  122. package/getProject.js.map +1 -0
  123. package/getProjects.d.ts +85 -0
  124. package/getProjects.js +72 -0
  125. package/getProjects.js.map +1 -0
  126. package/getRecord.d.ts +42 -0
  127. package/getRecord.js +28 -0
  128. package/getRecord.js.map +1 -0
  129. package/getRecords.d.ts +39 -0
  130. package/getRecords.js +25 -0
  131. package/getRecords.js.map +1 -0
  132. package/getRegion.d.ts +56 -0
  133. package/getRegion.js +35 -0
  134. package/getRegion.js.map +1 -0
  135. package/getRegions.d.ts +82 -0
  136. package/getRegions.js +70 -0
  137. package/getRegions.js.map +1 -0
  138. package/getSizes.d.ts +35 -0
  139. package/getSizes.js +26 -0
  140. package/getSizes.js.map +1 -0
  141. package/getSpacesBucket.d.ts +59 -0
  142. package/getSpacesBucket.js +39 -0
  143. package/getSpacesBucket.js.map +1 -0
  144. package/getSpacesBucketObject.d.ts +125 -0
  145. package/getSpacesBucketObject.js +53 -0
  146. package/getSpacesBucketObject.js.map +1 -0
  147. package/getSpacesBucketObjects.d.ts +83 -0
  148. package/getSpacesBucketObjects.js +49 -0
  149. package/getSpacesBucketObjects.js.map +1 -0
  150. package/getSpacesBuckets.d.ts +75 -0
  151. package/getSpacesBuckets.js +63 -0
  152. package/getSpacesBuckets.js.map +1 -0
  153. package/getSshKey.d.ts +47 -0
  154. package/getSshKey.js +46 -0
  155. package/getSshKey.js.map +1 -0
  156. package/getSshKeys.d.ts +58 -0
  157. package/getSshKeys.js +46 -0
  158. package/getSshKeys.js.map +1 -0
  159. package/getTag.d.ts +71 -0
  160. package/getTag.js +45 -0
  161. package/getTag.js.map +1 -0
  162. package/getTags.d.ts +50 -0
  163. package/getTags.js +41 -0
  164. package/getTags.js.map +1 -0
  165. package/getVolume.d.ts +98 -0
  166. package/getVolume.js +64 -0
  167. package/getVolume.js.map +1 -0
  168. package/getVolumeSnapshot.d.ts +98 -0
  169. package/getVolumeSnapshot.js +61 -0
  170. package/getVolumeSnapshot.js.map +1 -0
  171. package/getVpc.d.ts +95 -0
  172. package/getVpc.js +61 -0
  173. package/getVpc.js.map +1 -0
  174. package/index.d.ts +74 -0
  175. package/index.js +240 -0
  176. package/index.js.map +1 -0
  177. package/kubernetesCluster.d.ts +220 -0
  178. package/kubernetesCluster.js +102 -0
  179. package/kubernetesCluster.js.map +1 -0
  180. package/kubernetesNodePool.d.ts +242 -0
  181. package/kubernetesNodePool.js +141 -0
  182. package/kubernetesNodePool.js.map +1 -0
  183. package/loadBalancer.d.ts +307 -0
  184. package/loadBalancer.js +161 -0
  185. package/loadBalancer.js.map +1 -0
  186. package/monitorAlert.d.ts +193 -0
  187. package/monitorAlert.js +99 -0
  188. package/monitorAlert.js.map +1 -0
  189. package/package.json +28 -0
  190. package/package.json.bak +27 -0
  191. package/package.json.dev +27 -0
  192. package/project.d.ts +191 -0
  193. package/project.js +129 -0
  194. package/project.js.map +1 -0
  195. package/projectResources.d.ts +100 -0
  196. package/projectResources.js +98 -0
  197. package/projectResources.js.map +1 -0
  198. package/provider.d.ts +67 -0
  199. package/provider.js +51 -0
  200. package/provider.js.map +1 -0
  201. package/scripts/install-pulumi-plugin.js +21 -0
  202. package/spacesBucket.d.ts +210 -0
  203. package/spacesBucket.js +139 -0
  204. package/spacesBucket.js.map +1 -0
  205. package/spacesBucketObject.d.ts +293 -0
  206. package/spacesBucketObject.js +139 -0
  207. package/spacesBucketObject.js.map +1 -0
  208. package/sshKey.d.ts +103 -0
  209. package/sshKey.js +89 -0
  210. package/sshKey.js.map +1 -0
  211. package/tag.d.ts +127 -0
  212. package/tag.js +93 -0
  213. package/tag.js.map +1 -0
  214. package/types/enums/index.d.ts +151 -0
  215. package/types/enums/index.js +148 -0
  216. package/types/enums/index.js.map +1 -0
  217. package/types/index.d.ts +4 -0
  218. package/types/index.js +12 -0
  219. package/types/index.js.map +1 -0
  220. package/types/input.d.ts +1584 -0
  221. package/types/input.js +5 -0
  222. package/types/input.js.map +1 -0
  223. package/types/output.d.ts +2730 -0
  224. package/types/output.js +5 -0
  225. package/types/output.js.map +1 -0
  226. package/utilities.d.ts +4 -0
  227. package/utilities.js +51 -0
  228. package/utilities.js.map +1 -0
  229. package/volume.d.ts +225 -0
  230. package/volume.js +128 -0
  231. package/volume.js.map +1 -0
  232. package/volumeAttachment.d.ts +88 -0
  233. package/volumeAttachment.js +86 -0
  234. package/volumeAttachment.js.map +1 -0
  235. package/volumeSnapshot.d.ts +129 -0
  236. package/volumeSnapshot.js +90 -0
  237. package/volumeSnapshot.js.map +1 -0
  238. package/vpc.d.ts +152 -0
  239. package/vpc.js +109 -0
  240. package/vpc.js.map +1 -0
@@ -0,0 +1,293 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * Provides a bucket object resource for Spaces, DigitalOcean's object storage product.
4
+ * The `digitalocean.SpacesBucketObject` resource allows the provider to upload content
5
+ * to Spaces.
6
+ *
7
+ * The [Spaces API](https://docs.digitalocean.com/reference/api/spaces-api/) was
8
+ * designed to be interoperable with Amazon's AWS S3 API. This allows users to
9
+ * interact with the service while using the tools they already know. Spaces
10
+ * mirrors S3's authentication framework and requests to Spaces require a key pair
11
+ * similar to Amazon's Access ID and Secret Key.
12
+ *
13
+ * The authentication requirement can be met by either setting the
14
+ * `SPACES_ACCESS_KEY_ID` and `SPACES_SECRET_ACCESS_KEY` environment variables or
15
+ * the provider's `spacesAccessId` and `spacesSecretKey` arguments to the
16
+ * access ID and secret you generate via the DigitalOcean control panel. For
17
+ * example:
18
+ *
19
+ * ```typescript
20
+ * import * as pulumi from "@pulumi/pulumi";
21
+ * import * as digitalocean from "@pulumi/digitalocean";
22
+ *
23
+ * const static_assets = new digitalocean.SpacesBucket("static-assets", {});
24
+ * // ...
25
+ * ```
26
+ *
27
+ * For more information, See [An Introduction to DigitalOcean Spaces](https://www.digitalocean.com/community/tutorials/an-introduction-to-digitalocean-spaces)
28
+ *
29
+ * ## Example Usage
30
+ * ### Create a Key in a Spaces Bucket
31
+ *
32
+ * ```typescript
33
+ * import * as pulumi from "@pulumi/pulumi";
34
+ * import * as digitalocean from "@pulumi/digitalocean";
35
+ *
36
+ * const foobar = new digitalocean.SpacesBucket("foobar", {region: "nyc3"});
37
+ * const index = new digitalocean.SpacesBucketObject("index", {
38
+ * region: foobar.region,
39
+ * bucket: foobar.name,
40
+ * key: "index.html",
41
+ * content: "<html><body><p>This page is empty.</p></body></html>",
42
+ * contentType: "text/html",
43
+ * });
44
+ * ```
45
+ *
46
+ * ## Import
47
+ *
48
+ * Importing this resource is not supported.
49
+ */
50
+ export declare class SpacesBucketObject extends pulumi.CustomResource {
51
+ /**
52
+ * Get an existing SpacesBucketObject resource's state with the given name, ID, and optional extra
53
+ * properties used to qualify the lookup.
54
+ *
55
+ * @param name The _unique_ name of the resulting resource.
56
+ * @param id The _unique_ provider ID of the resource to lookup.
57
+ * @param state Any extra arguments used during the lookup.
58
+ * @param opts Optional settings to control the behavior of the CustomResource.
59
+ */
60
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SpacesBucketObjectState, opts?: pulumi.CustomResourceOptions): SpacesBucketObject;
61
+ /**
62
+ * Returns true if the given object is an instance of SpacesBucketObject. This is designed to work even
63
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
64
+ */
65
+ static isInstance(obj: any): obj is SpacesBucketObject;
66
+ /**
67
+ * The canned ACL to apply. DigitalOcean supports "private" and "public-read". (Defaults to "private".)
68
+ */
69
+ readonly acl: pulumi.Output<string | undefined>;
70
+ /**
71
+ * The name of the bucket to put the file in.
72
+ */
73
+ readonly bucket: pulumi.Output<string>;
74
+ /**
75
+ * Specifies caching behavior along the request/reply chain Read [w3c cacheControl](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details.
76
+ */
77
+ readonly cacheControl: pulumi.Output<string | undefined>;
78
+ /**
79
+ * Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
80
+ */
81
+ readonly content: pulumi.Output<string | undefined>;
82
+ /**
83
+ * Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the `gzipbase64` function with small text strings. For larger objects, use `source` to stream the content from a disk file.
84
+ */
85
+ readonly contentBase64: pulumi.Output<string | undefined>;
86
+ /**
87
+ * Specifies presentational information for the object. Read [w3c contentDisposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information.
88
+ */
89
+ readonly contentDisposition: pulumi.Output<string | undefined>;
90
+ /**
91
+ * Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information.
92
+ */
93
+ readonly contentEncoding: pulumi.Output<string | undefined>;
94
+ /**
95
+ * The language the content is in e.g. en-US or en-GB.
96
+ */
97
+ readonly contentLanguage: pulumi.Output<string | undefined>;
98
+ /**
99
+ * A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.
100
+ */
101
+ readonly contentType: pulumi.Output<string>;
102
+ /**
103
+ * Used to trigger updates.
104
+ */
105
+ readonly etag: pulumi.Output<string>;
106
+ /**
107
+ * Allow the object to be deleted by removing any legal hold on any object version.
108
+ * Default is `false`. This value should be set to `true` only if the bucket has S3 object lock enabled.
109
+ */
110
+ readonly forceDestroy: pulumi.Output<boolean | undefined>;
111
+ /**
112
+ * The name of the object once it is in the bucket.
113
+ */
114
+ readonly key: pulumi.Output<string>;
115
+ /**
116
+ * A mapping of keys/values to provision metadata (will be automatically prefixed by `x-amz-meta-`, note that only lowercase label are currently supported by the AWS Go API).
117
+ */
118
+ readonly metadata: pulumi.Output<{
119
+ [key: string]: string;
120
+ } | undefined>;
121
+ /**
122
+ * The region where the bucket resides (Defaults to `nyc3`)
123
+ */
124
+ readonly region: pulumi.Output<string>;
125
+ /**
126
+ * The path to a file that will be read and uploaded as raw bytes for the object content.
127
+ */
128
+ readonly source: pulumi.Output<string | undefined>;
129
+ /**
130
+ * A unique version ID value for the object, if bucket versioning is enabled.
131
+ */
132
+ readonly versionId: pulumi.Output<string>;
133
+ /**
134
+ * Specifies a target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
135
+ */
136
+ readonly websiteRedirect: pulumi.Output<string | undefined>;
137
+ /**
138
+ * Create a SpacesBucketObject resource with the given unique name, arguments, and options.
139
+ *
140
+ * @param name The _unique_ name of the resource.
141
+ * @param args The arguments to use to populate this resource's properties.
142
+ * @param opts A bag of options that control this resource's behavior.
143
+ */
144
+ constructor(name: string, args: SpacesBucketObjectArgs, opts?: pulumi.CustomResourceOptions);
145
+ }
146
+ /**
147
+ * Input properties used for looking up and filtering SpacesBucketObject resources.
148
+ */
149
+ export interface SpacesBucketObjectState {
150
+ /**
151
+ * The canned ACL to apply. DigitalOcean supports "private" and "public-read". (Defaults to "private".)
152
+ */
153
+ acl?: pulumi.Input<string>;
154
+ /**
155
+ * The name of the bucket to put the file in.
156
+ */
157
+ bucket?: pulumi.Input<string>;
158
+ /**
159
+ * Specifies caching behavior along the request/reply chain Read [w3c cacheControl](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details.
160
+ */
161
+ cacheControl?: pulumi.Input<string>;
162
+ /**
163
+ * Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
164
+ */
165
+ content?: pulumi.Input<string>;
166
+ /**
167
+ * Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the `gzipbase64` function with small text strings. For larger objects, use `source` to stream the content from a disk file.
168
+ */
169
+ contentBase64?: pulumi.Input<string>;
170
+ /**
171
+ * Specifies presentational information for the object. Read [w3c contentDisposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information.
172
+ */
173
+ contentDisposition?: pulumi.Input<string>;
174
+ /**
175
+ * Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information.
176
+ */
177
+ contentEncoding?: pulumi.Input<string>;
178
+ /**
179
+ * The language the content is in e.g. en-US or en-GB.
180
+ */
181
+ contentLanguage?: pulumi.Input<string>;
182
+ /**
183
+ * A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.
184
+ */
185
+ contentType?: pulumi.Input<string>;
186
+ /**
187
+ * Used to trigger updates.
188
+ */
189
+ etag?: pulumi.Input<string>;
190
+ /**
191
+ * Allow the object to be deleted by removing any legal hold on any object version.
192
+ * Default is `false`. This value should be set to `true` only if the bucket has S3 object lock enabled.
193
+ */
194
+ forceDestroy?: pulumi.Input<boolean>;
195
+ /**
196
+ * The name of the object once it is in the bucket.
197
+ */
198
+ key?: pulumi.Input<string>;
199
+ /**
200
+ * A mapping of keys/values to provision metadata (will be automatically prefixed by `x-amz-meta-`, note that only lowercase label are currently supported by the AWS Go API).
201
+ */
202
+ metadata?: pulumi.Input<{
203
+ [key: string]: pulumi.Input<string>;
204
+ }>;
205
+ /**
206
+ * The region where the bucket resides (Defaults to `nyc3`)
207
+ */
208
+ region?: pulumi.Input<string>;
209
+ /**
210
+ * The path to a file that will be read and uploaded as raw bytes for the object content.
211
+ */
212
+ source?: pulumi.Input<string>;
213
+ /**
214
+ * A unique version ID value for the object, if bucket versioning is enabled.
215
+ */
216
+ versionId?: pulumi.Input<string>;
217
+ /**
218
+ * Specifies a target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
219
+ */
220
+ websiteRedirect?: pulumi.Input<string>;
221
+ }
222
+ /**
223
+ * The set of arguments for constructing a SpacesBucketObject resource.
224
+ */
225
+ export interface SpacesBucketObjectArgs {
226
+ /**
227
+ * The canned ACL to apply. DigitalOcean supports "private" and "public-read". (Defaults to "private".)
228
+ */
229
+ acl?: pulumi.Input<string>;
230
+ /**
231
+ * The name of the bucket to put the file in.
232
+ */
233
+ bucket: pulumi.Input<string>;
234
+ /**
235
+ * Specifies caching behavior along the request/reply chain Read [w3c cacheControl](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for further details.
236
+ */
237
+ cacheControl?: pulumi.Input<string>;
238
+ /**
239
+ * Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.
240
+ */
241
+ content?: pulumi.Input<string>;
242
+ /**
243
+ * Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the `gzipbase64` function with small text strings. For larger objects, use `source` to stream the content from a disk file.
244
+ */
245
+ contentBase64?: pulumi.Input<string>;
246
+ /**
247
+ * Specifies presentational information for the object. Read [w3c contentDisposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information.
248
+ */
249
+ contentDisposition?: pulumi.Input<string>;
250
+ /**
251
+ * Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information.
252
+ */
253
+ contentEncoding?: pulumi.Input<string>;
254
+ /**
255
+ * The language the content is in e.g. en-US or en-GB.
256
+ */
257
+ contentLanguage?: pulumi.Input<string>;
258
+ /**
259
+ * A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.
260
+ */
261
+ contentType?: pulumi.Input<string>;
262
+ /**
263
+ * Used to trigger updates.
264
+ */
265
+ etag?: pulumi.Input<string>;
266
+ /**
267
+ * Allow the object to be deleted by removing any legal hold on any object version.
268
+ * Default is `false`. This value should be set to `true` only if the bucket has S3 object lock enabled.
269
+ */
270
+ forceDestroy?: pulumi.Input<boolean>;
271
+ /**
272
+ * The name of the object once it is in the bucket.
273
+ */
274
+ key: pulumi.Input<string>;
275
+ /**
276
+ * A mapping of keys/values to provision metadata (will be automatically prefixed by `x-amz-meta-`, note that only lowercase label are currently supported by the AWS Go API).
277
+ */
278
+ metadata?: pulumi.Input<{
279
+ [key: string]: pulumi.Input<string>;
280
+ }>;
281
+ /**
282
+ * The region where the bucket resides (Defaults to `nyc3`)
283
+ */
284
+ region: pulumi.Input<string>;
285
+ /**
286
+ * The path to a file that will be read and uploaded as raw bytes for the object content.
287
+ */
288
+ source?: pulumi.Input<string>;
289
+ /**
290
+ * Specifies a target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
291
+ */
292
+ websiteRedirect?: pulumi.Input<string>;
293
+ }
@@ -0,0 +1,139 @@
1
+ "use strict";
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
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ const pulumi = require("@pulumi/pulumi");
6
+ const utilities = require("./utilities");
7
+ /**
8
+ * Provides a bucket object resource for Spaces, DigitalOcean's object storage product.
9
+ * The `digitalocean.SpacesBucketObject` resource allows the provider to upload content
10
+ * to Spaces.
11
+ *
12
+ * The [Spaces API](https://docs.digitalocean.com/reference/api/spaces-api/) was
13
+ * designed to be interoperable with Amazon's AWS S3 API. This allows users to
14
+ * interact with the service while using the tools they already know. Spaces
15
+ * mirrors S3's authentication framework and requests to Spaces require a key pair
16
+ * similar to Amazon's Access ID and Secret Key.
17
+ *
18
+ * The authentication requirement can be met by either setting the
19
+ * `SPACES_ACCESS_KEY_ID` and `SPACES_SECRET_ACCESS_KEY` environment variables or
20
+ * the provider's `spacesAccessId` and `spacesSecretKey` arguments to the
21
+ * access ID and secret you generate via the DigitalOcean control panel. For
22
+ * example:
23
+ *
24
+ * ```typescript
25
+ * import * as pulumi from "@pulumi/pulumi";
26
+ * import * as digitalocean from "@pulumi/digitalocean";
27
+ *
28
+ * const static_assets = new digitalocean.SpacesBucket("static-assets", {});
29
+ * // ...
30
+ * ```
31
+ *
32
+ * For more information, See [An Introduction to DigitalOcean Spaces](https://www.digitalocean.com/community/tutorials/an-introduction-to-digitalocean-spaces)
33
+ *
34
+ * ## Example Usage
35
+ * ### Create a Key in a Spaces Bucket
36
+ *
37
+ * ```typescript
38
+ * import * as pulumi from "@pulumi/pulumi";
39
+ * import * as digitalocean from "@pulumi/digitalocean";
40
+ *
41
+ * const foobar = new digitalocean.SpacesBucket("foobar", {region: "nyc3"});
42
+ * const index = new digitalocean.SpacesBucketObject("index", {
43
+ * region: foobar.region,
44
+ * bucket: foobar.name,
45
+ * key: "index.html",
46
+ * content: "<html><body><p>This page is empty.</p></body></html>",
47
+ * contentType: "text/html",
48
+ * });
49
+ * ```
50
+ *
51
+ * ## Import
52
+ *
53
+ * Importing this resource is not supported.
54
+ */
55
+ class SpacesBucketObject extends pulumi.CustomResource {
56
+ constructor(name, argsOrState, opts) {
57
+ let inputs = {};
58
+ opts = opts || {};
59
+ if (opts.id) {
60
+ const state = argsOrState;
61
+ inputs["acl"] = state ? state.acl : undefined;
62
+ inputs["bucket"] = state ? state.bucket : undefined;
63
+ inputs["cacheControl"] = state ? state.cacheControl : undefined;
64
+ inputs["content"] = state ? state.content : undefined;
65
+ inputs["contentBase64"] = state ? state.contentBase64 : undefined;
66
+ inputs["contentDisposition"] = state ? state.contentDisposition : undefined;
67
+ inputs["contentEncoding"] = state ? state.contentEncoding : undefined;
68
+ inputs["contentLanguage"] = state ? state.contentLanguage : undefined;
69
+ inputs["contentType"] = state ? state.contentType : undefined;
70
+ inputs["etag"] = state ? state.etag : undefined;
71
+ inputs["forceDestroy"] = state ? state.forceDestroy : undefined;
72
+ inputs["key"] = state ? state.key : undefined;
73
+ inputs["metadata"] = state ? state.metadata : undefined;
74
+ inputs["region"] = state ? state.region : undefined;
75
+ inputs["source"] = state ? state.source : undefined;
76
+ inputs["versionId"] = state ? state.versionId : undefined;
77
+ inputs["websiteRedirect"] = state ? state.websiteRedirect : undefined;
78
+ }
79
+ else {
80
+ const args = argsOrState;
81
+ if ((!args || args.bucket === undefined) && !opts.urn) {
82
+ throw new Error("Missing required property 'bucket'");
83
+ }
84
+ if ((!args || args.key === undefined) && !opts.urn) {
85
+ throw new Error("Missing required property 'key'");
86
+ }
87
+ if ((!args || args.region === undefined) && !opts.urn) {
88
+ throw new Error("Missing required property 'region'");
89
+ }
90
+ inputs["acl"] = args ? args.acl : undefined;
91
+ inputs["bucket"] = args ? args.bucket : undefined;
92
+ inputs["cacheControl"] = args ? args.cacheControl : undefined;
93
+ inputs["content"] = args ? args.content : undefined;
94
+ inputs["contentBase64"] = args ? args.contentBase64 : undefined;
95
+ inputs["contentDisposition"] = args ? args.contentDisposition : undefined;
96
+ inputs["contentEncoding"] = args ? args.contentEncoding : undefined;
97
+ inputs["contentLanguage"] = args ? args.contentLanguage : undefined;
98
+ inputs["contentType"] = args ? args.contentType : undefined;
99
+ inputs["etag"] = args ? args.etag : undefined;
100
+ inputs["forceDestroy"] = args ? args.forceDestroy : undefined;
101
+ inputs["key"] = args ? args.key : undefined;
102
+ inputs["metadata"] = args ? args.metadata : undefined;
103
+ inputs["region"] = args ? args.region : undefined;
104
+ inputs["source"] = args ? args.source : undefined;
105
+ inputs["websiteRedirect"] = args ? args.websiteRedirect : undefined;
106
+ inputs["versionId"] = undefined /*out*/;
107
+ }
108
+ if (!opts.version) {
109
+ opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
110
+ }
111
+ super(SpacesBucketObject.__pulumiType, name, inputs, opts);
112
+ }
113
+ /**
114
+ * Get an existing SpacesBucketObject resource's state with the given name, ID, and optional extra
115
+ * properties used to qualify the lookup.
116
+ *
117
+ * @param name The _unique_ name of the resulting resource.
118
+ * @param id The _unique_ provider ID of the resource to lookup.
119
+ * @param state Any extra arguments used during the lookup.
120
+ * @param opts Optional settings to control the behavior of the CustomResource.
121
+ */
122
+ static get(name, id, state, opts) {
123
+ return new SpacesBucketObject(name, state, Object.assign(Object.assign({}, opts), { id: id }));
124
+ }
125
+ /**
126
+ * Returns true if the given object is an instance of SpacesBucketObject. This is designed to work even
127
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
128
+ */
129
+ static isInstance(obj) {
130
+ if (obj === undefined || obj === null) {
131
+ return false;
132
+ }
133
+ return obj['__pulumiType'] === SpacesBucketObject.__pulumiType;
134
+ }
135
+ }
136
+ exports.SpacesBucketObject = SpacesBucketObject;
137
+ /** @internal */
138
+ SpacesBucketObject.__pulumiType = 'digitalocean:index/spacesBucketObject:SpacesBucketObject';
139
+ //# sourceMappingURL=spacesBucketObject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spacesBucketObject.js","sourceRoot":"","sources":["../spacesBucketObject.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAa,kBAAmB,SAAQ,MAAM,CAAC,cAAc;IA0GzD,YAAY,IAAY,EAAE,WAA8D,EAAE,IAAmC;QACzH,IAAI,MAAM,GAAkB,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IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,kBAAkB,CAAC,YAAY,CAAC;IACnE,CAAC;;AA1BL,gDAkKC;AApJG,gBAAgB;AACO,+BAAY,GAAG,0DAA0D,CAAC"}
package/sshKey.d.ts ADDED
@@ -0,0 +1,103 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * Provides a DigitalOcean SSH key resource to allow you to manage SSH
4
+ * keys for Droplet access. Keys created with this resource
5
+ * can be referenced in your Droplet configuration via their ID or
6
+ * fingerprint.
7
+ *
8
+ * ## Example Usage
9
+ *
10
+ * ```typescript
11
+ * import * as pulumi from "@pulumi/pulumi";
12
+ * import * as digitalocean from "@pulumi/digitalocean";
13
+ * import * from "fs";
14
+ *
15
+ * // Create a new SSH key
16
+ * const _default = new digitalocean.SshKey("default", {publicKey: fs.readFileSync("/Users/myuser/.ssh/id_rsa.pub")});
17
+ * // Create a new Droplet using the SSH key
18
+ * const web = new digitalocean.Droplet("web", {
19
+ * image: "ubuntu-18-04-x64",
20
+ * region: "nyc3",
21
+ * size: "s-1vcpu-1gb",
22
+ * sshKeys: [_default.fingerprint],
23
+ * });
24
+ * ```
25
+ *
26
+ * ## Import
27
+ *
28
+ * SSH Keys can be imported using the `ssh key id`, e.g.
29
+ *
30
+ * ```sh
31
+ * $ pulumi import digitalocean:index/sshKey:SshKey mykey 263654
32
+ * ```
33
+ */
34
+ export declare class SshKey extends pulumi.CustomResource {
35
+ /**
36
+ * Get an existing SshKey resource's state with the given name, ID, and optional extra
37
+ * properties used to qualify the lookup.
38
+ *
39
+ * @param name The _unique_ name of the resulting resource.
40
+ * @param id The _unique_ provider ID of the resource to lookup.
41
+ * @param state Any extra arguments used during the lookup.
42
+ * @param opts Optional settings to control the behavior of the CustomResource.
43
+ */
44
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SshKeyState, opts?: pulumi.CustomResourceOptions): SshKey;
45
+ /**
46
+ * Returns true if the given object is an instance of SshKey. This is designed to work even
47
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
48
+ */
49
+ static isInstance(obj: any): obj is SshKey;
50
+ /**
51
+ * The fingerprint of the SSH key
52
+ */
53
+ readonly fingerprint: pulumi.Output<string>;
54
+ /**
55
+ * The name of the SSH key for identification
56
+ */
57
+ readonly name: pulumi.Output<string>;
58
+ /**
59
+ * The public key. If this is a file, it
60
+ * can be read using the file interpolation function
61
+ */
62
+ readonly publicKey: pulumi.Output<string>;
63
+ /**
64
+ * Create a SshKey resource with the given unique name, arguments, and options.
65
+ *
66
+ * @param name The _unique_ name of the resource.
67
+ * @param args The arguments to use to populate this resource's properties.
68
+ * @param opts A bag of options that control this resource's behavior.
69
+ */
70
+ constructor(name: string, args: SshKeyArgs, opts?: pulumi.CustomResourceOptions);
71
+ }
72
+ /**
73
+ * Input properties used for looking up and filtering SshKey resources.
74
+ */
75
+ export interface SshKeyState {
76
+ /**
77
+ * The fingerprint of the SSH key
78
+ */
79
+ fingerprint?: pulumi.Input<string>;
80
+ /**
81
+ * The name of the SSH key for identification
82
+ */
83
+ name?: pulumi.Input<string>;
84
+ /**
85
+ * The public key. If this is a file, it
86
+ * can be read using the file interpolation function
87
+ */
88
+ publicKey?: pulumi.Input<string>;
89
+ }
90
+ /**
91
+ * The set of arguments for constructing a SshKey resource.
92
+ */
93
+ export interface SshKeyArgs {
94
+ /**
95
+ * The name of the SSH key for identification
96
+ */
97
+ name?: pulumi.Input<string>;
98
+ /**
99
+ * The public key. If this is a file, it
100
+ * can be read using the file interpolation function
101
+ */
102
+ publicKey: pulumi.Input<string>;
103
+ }
package/sshKey.js ADDED
@@ -0,0 +1,89 @@
1
+ "use strict";
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
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ const pulumi = require("@pulumi/pulumi");
6
+ const utilities = require("./utilities");
7
+ /**
8
+ * Provides a DigitalOcean SSH key resource to allow you to manage SSH
9
+ * keys for Droplet access. Keys created with this resource
10
+ * can be referenced in your Droplet configuration via their ID or
11
+ * fingerprint.
12
+ *
13
+ * ## Example Usage
14
+ *
15
+ * ```typescript
16
+ * import * as pulumi from "@pulumi/pulumi";
17
+ * import * as digitalocean from "@pulumi/digitalocean";
18
+ * import * from "fs";
19
+ *
20
+ * // Create a new SSH key
21
+ * const _default = new digitalocean.SshKey("default", {publicKey: fs.readFileSync("/Users/myuser/.ssh/id_rsa.pub")});
22
+ * // Create a new Droplet using the SSH key
23
+ * const web = new digitalocean.Droplet("web", {
24
+ * image: "ubuntu-18-04-x64",
25
+ * region: "nyc3",
26
+ * size: "s-1vcpu-1gb",
27
+ * sshKeys: [_default.fingerprint],
28
+ * });
29
+ * ```
30
+ *
31
+ * ## Import
32
+ *
33
+ * SSH Keys can be imported using the `ssh key id`, e.g.
34
+ *
35
+ * ```sh
36
+ * $ pulumi import digitalocean:index/sshKey:SshKey mykey 263654
37
+ * ```
38
+ */
39
+ class SshKey extends pulumi.CustomResource {
40
+ constructor(name, argsOrState, opts) {
41
+ let inputs = {};
42
+ opts = opts || {};
43
+ if (opts.id) {
44
+ const state = argsOrState;
45
+ inputs["fingerprint"] = state ? state.fingerprint : undefined;
46
+ inputs["name"] = state ? state.name : undefined;
47
+ inputs["publicKey"] = state ? state.publicKey : undefined;
48
+ }
49
+ else {
50
+ const args = argsOrState;
51
+ if ((!args || args.publicKey === undefined) && !opts.urn) {
52
+ throw new Error("Missing required property 'publicKey'");
53
+ }
54
+ inputs["name"] = args ? args.name : undefined;
55
+ inputs["publicKey"] = args ? args.publicKey : undefined;
56
+ inputs["fingerprint"] = undefined /*out*/;
57
+ }
58
+ if (!opts.version) {
59
+ opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
60
+ }
61
+ super(SshKey.__pulumiType, name, inputs, opts);
62
+ }
63
+ /**
64
+ * Get an existing SshKey resource's state with the given name, ID, and optional extra
65
+ * properties used to qualify the lookup.
66
+ *
67
+ * @param name The _unique_ name of the resulting resource.
68
+ * @param id The _unique_ provider ID of the resource to lookup.
69
+ * @param state Any extra arguments used during the lookup.
70
+ * @param opts Optional settings to control the behavior of the CustomResource.
71
+ */
72
+ static get(name, id, state, opts) {
73
+ return new SshKey(name, state, Object.assign(Object.assign({}, opts), { id: id }));
74
+ }
75
+ /**
76
+ * Returns true if the given object is an instance of SshKey. This is designed to work even
77
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
78
+ */
79
+ static isInstance(obj) {
80
+ if (obj === undefined || obj === null) {
81
+ return false;
82
+ }
83
+ return obj['__pulumiType'] === SshKey.__pulumiType;
84
+ }
85
+ }
86
+ exports.SshKey = SshKey;
87
+ /** @internal */
88
+ SshKey.__pulumiType = 'digitalocean:index/sshKey:SshKey';
89
+ //# sourceMappingURL=sshKey.js.map
package/sshKey.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sshKey.js","sourceRoot":"","sources":["../sshKey.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAkD7C,YAAY,IAAY,EAAE,WAAsC,EAAE,IAAmC;QACjG,IAAI,MAAM,GAAkB,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAsC,CAAC;YACrD,MAAM,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,C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