@quantcdn/pulumi-quant 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/project.ts ADDED
@@ -0,0 +1,214 @@
1
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
2
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
3
+
4
+ import * as pulumi from "@pulumi/pulumi";
5
+ import * as utilities from "./utilities";
6
+
7
+ export class Project extends pulumi.CustomResource {
8
+ /**
9
+ * Get an existing Project resource's state with the given name, ID, and optional extra
10
+ * properties used to qualify the lookup.
11
+ *
12
+ * @param name The _unique_ name of the resulting resource.
13
+ * @param id The _unique_ provider ID of the resource to lookup.
14
+ * @param state Any extra arguments used during the lookup.
15
+ * @param opts Optional settings to control the behavior of the CustomResource.
16
+ */
17
+ public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectState, opts?: pulumi.CustomResourceOptions): Project {
18
+ return new Project(name, <any>state, { ...opts, id: id });
19
+ }
20
+
21
+ /** @internal */
22
+ public static readonly __pulumiType = 'quant:index:Project';
23
+
24
+ /**
25
+ * Returns true if the given object is an instance of Project. This is designed to work even
26
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
27
+ */
28
+ public static isInstance(obj: any): obj is Project {
29
+ if (obj === undefined || obj === null) {
30
+ return false;
31
+ }
32
+ return obj['__pulumiType'] === Project.__pulumiType;
33
+ }
34
+
35
+ /**
36
+ * Allow query parameters
37
+ */
38
+ declare public readonly allowQueryParams: pulumi.Output<boolean>;
39
+ /**
40
+ * Basic auth password
41
+ */
42
+ declare public readonly basicAuthPassword: pulumi.Output<string>;
43
+ /**
44
+ * Apply basic auth to preview domain only
45
+ */
46
+ declare public readonly basicAuthPreviewOnly: pulumi.Output<boolean>;
47
+ /**
48
+ * Basic auth username
49
+ */
50
+ declare public readonly basicAuthUsername: pulumi.Output<string>;
51
+ /**
52
+ * Disable revisions
53
+ */
54
+ declare public readonly disableRevisions: pulumi.Output<boolean>;
55
+ /**
56
+ * Project machine name
57
+ */
58
+ declare public readonly machineName: pulumi.Output<string>;
59
+ /**
60
+ * Project name
61
+ */
62
+ declare public readonly name: pulumi.Output<string>;
63
+ declare public readonly organization: pulumi.Output<string>;
64
+ declare public readonly project: pulumi.Output<string>;
65
+ /**
66
+ * Project region
67
+ */
68
+ declare public readonly region: pulumi.Output<string>;
69
+ /**
70
+ * Project UUID
71
+ */
72
+ declare public /*out*/ readonly uuid: pulumi.Output<string>;
73
+ declare public readonly withToken: pulumi.Output<boolean>;
74
+ /**
75
+ * Write token for API access
76
+ */
77
+ declare public /*out*/ readonly writeToken: pulumi.Output<string>;
78
+
79
+ /**
80
+ * Create a Project resource with the given unique name, arguments, and options.
81
+ *
82
+ * @param name The _unique_ name of the resource.
83
+ * @param args The arguments to use to populate this resource's properties.
84
+ * @param opts A bag of options that control this resource's behavior.
85
+ */
86
+ constructor(name: string, args?: ProjectArgs, opts?: pulumi.CustomResourceOptions)
87
+ constructor(name: string, argsOrState?: ProjectArgs | ProjectState, opts?: pulumi.CustomResourceOptions) {
88
+ let resourceInputs: pulumi.Inputs = {};
89
+ opts = opts || {};
90
+ if (opts.id) {
91
+ const state = argsOrState as ProjectState | undefined;
92
+ resourceInputs["allowQueryParams"] = state?.allowQueryParams;
93
+ resourceInputs["basicAuthPassword"] = state?.basicAuthPassword;
94
+ resourceInputs["basicAuthPreviewOnly"] = state?.basicAuthPreviewOnly;
95
+ resourceInputs["basicAuthUsername"] = state?.basicAuthUsername;
96
+ resourceInputs["disableRevisions"] = state?.disableRevisions;
97
+ resourceInputs["machineName"] = state?.machineName;
98
+ resourceInputs["name"] = state?.name;
99
+ resourceInputs["organization"] = state?.organization;
100
+ resourceInputs["project"] = state?.project;
101
+ resourceInputs["region"] = state?.region;
102
+ resourceInputs["uuid"] = state?.uuid;
103
+ resourceInputs["withToken"] = state?.withToken;
104
+ resourceInputs["writeToken"] = state?.writeToken;
105
+ } else {
106
+ const args = argsOrState as ProjectArgs | undefined;
107
+ resourceInputs["allowQueryParams"] = args?.allowQueryParams;
108
+ resourceInputs["basicAuthPassword"] = args?.basicAuthPassword;
109
+ resourceInputs["basicAuthPreviewOnly"] = args?.basicAuthPreviewOnly;
110
+ resourceInputs["basicAuthUsername"] = args?.basicAuthUsername;
111
+ resourceInputs["disableRevisions"] = args?.disableRevisions;
112
+ resourceInputs["machineName"] = args?.machineName;
113
+ resourceInputs["name"] = args?.name;
114
+ resourceInputs["organization"] = args?.organization;
115
+ resourceInputs["project"] = args?.project;
116
+ resourceInputs["region"] = args?.region;
117
+ resourceInputs["withToken"] = args?.withToken;
118
+ resourceInputs["uuid"] = undefined /*out*/;
119
+ resourceInputs["writeToken"] = undefined /*out*/;
120
+ }
121
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
122
+ super(Project.__pulumiType, name, resourceInputs, opts);
123
+ }
124
+ }
125
+
126
+ /**
127
+ * Input properties used for looking up and filtering Project resources.
128
+ */
129
+ export interface ProjectState {
130
+ /**
131
+ * Allow query parameters
132
+ */
133
+ allowQueryParams?: pulumi.Input<boolean>;
134
+ /**
135
+ * Basic auth password
136
+ */
137
+ basicAuthPassword?: pulumi.Input<string>;
138
+ /**
139
+ * Apply basic auth to preview domain only
140
+ */
141
+ basicAuthPreviewOnly?: pulumi.Input<boolean>;
142
+ /**
143
+ * Basic auth username
144
+ */
145
+ basicAuthUsername?: pulumi.Input<string>;
146
+ /**
147
+ * Disable revisions
148
+ */
149
+ disableRevisions?: pulumi.Input<boolean>;
150
+ /**
151
+ * Project machine name
152
+ */
153
+ machineName?: pulumi.Input<string>;
154
+ /**
155
+ * Project name
156
+ */
157
+ name?: pulumi.Input<string>;
158
+ organization?: pulumi.Input<string>;
159
+ project?: pulumi.Input<string>;
160
+ /**
161
+ * Project region
162
+ */
163
+ region?: pulumi.Input<string>;
164
+ /**
165
+ * Project UUID
166
+ */
167
+ uuid?: pulumi.Input<string>;
168
+ withToken?: pulumi.Input<boolean>;
169
+ /**
170
+ * Write token for API access
171
+ */
172
+ writeToken?: pulumi.Input<string>;
173
+ }
174
+
175
+ /**
176
+ * The set of arguments for constructing a Project resource.
177
+ */
178
+ export interface ProjectArgs {
179
+ /**
180
+ * Allow query parameters
181
+ */
182
+ allowQueryParams?: pulumi.Input<boolean>;
183
+ /**
184
+ * Basic auth password
185
+ */
186
+ basicAuthPassword?: pulumi.Input<string>;
187
+ /**
188
+ * Apply basic auth to preview domain only
189
+ */
190
+ basicAuthPreviewOnly?: pulumi.Input<boolean>;
191
+ /**
192
+ * Basic auth username
193
+ */
194
+ basicAuthUsername?: pulumi.Input<string>;
195
+ /**
196
+ * Disable revisions
197
+ */
198
+ disableRevisions?: pulumi.Input<boolean>;
199
+ /**
200
+ * Project machine name
201
+ */
202
+ machineName?: pulumi.Input<string>;
203
+ /**
204
+ * Project name
205
+ */
206
+ name?: pulumi.Input<string>;
207
+ organization?: pulumi.Input<string>;
208
+ project?: pulumi.Input<string>;
209
+ /**
210
+ * Project region
211
+ */
212
+ region?: pulumi.Input<string>;
213
+ withToken?: pulumi.Input<boolean>;
214
+ }
package/provider.ts ADDED
@@ -0,0 +1,128 @@
1
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
2
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
3
+
4
+ import * as pulumi from "@pulumi/pulumi";
5
+ import * as utilities from "./utilities";
6
+
7
+ /**
8
+ * The provider type for the quant package. By default, resources use package-wide configuration
9
+ * settings, however an explicit `Provider` instance may be created and passed during resource
10
+ * construction to achieve fine-grained programmatic control over provider settings. See the
11
+ * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
12
+ */
13
+ export class Provider extends pulumi.ProviderResource {
14
+ /** @internal */
15
+ public static readonly __pulumiType = 'quant';
16
+
17
+ /**
18
+ * Returns true if the given object is an instance of Provider. This is designed to work even
19
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
20
+ */
21
+ public static isInstance(obj: any): obj is Provider {
22
+ if (obj === undefined || obj === null) {
23
+ return false;
24
+ }
25
+ return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType;
26
+ }
27
+
28
+ /**
29
+ * The base URL for the QuantCDN API. Can also be set via QUANTCDN_BASE_URL environment variable.
30
+ */
31
+ declare public readonly baseUrl: pulumi.Output<string | undefined>;
32
+ /**
33
+ * The QuantCDN API Bearer token used to authenticate requests. Can also be set via QUANTCDN_API_TOKEN environment variable.
34
+ */
35
+ declare public readonly bearer: pulumi.Output<string | undefined>;
36
+ /**
37
+ * The QuantCDN organization machine name. Can also be set via QUANTCDN_ORGANIZATION environment variable.
38
+ */
39
+ declare public readonly organization: pulumi.Output<string | undefined>;
40
+
41
+ /**
42
+ * Create a Provider resource with the given unique name, arguments, and options.
43
+ *
44
+ * @param name The _unique_ name of the resource.
45
+ * @param args The arguments to use to populate this resource's properties.
46
+ * @param opts A bag of options that control this resource's behavior.
47
+ */
48
+ constructor(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions) {
49
+ let resourceInputs: pulumi.Inputs = {};
50
+ opts = opts || {};
51
+ {
52
+ resourceInputs["baseDelayMs"] = pulumi.output(args?.baseDelayMs).apply(JSON.stringify);
53
+ resourceInputs["baseUrl"] = args?.baseUrl;
54
+ resourceInputs["bearer"] = args?.bearer ? pulumi.secret(args.bearer) : undefined;
55
+ resourceInputs["enableJitter"] = pulumi.output(args?.enableJitter).apply(JSON.stringify);
56
+ resourceInputs["maxDelayMs"] = pulumi.output(args?.maxDelayMs).apply(JSON.stringify);
57
+ resourceInputs["maxRetries"] = pulumi.output(args?.maxRetries).apply(JSON.stringify);
58
+ resourceInputs["organization"] = args?.organization;
59
+ resourceInputs["requestsPerSecond"] = pulumi.output(args?.requestsPerSecond).apply(JSON.stringify);
60
+ resourceInputs["timeoutSeconds"] = pulumi.output(args?.timeoutSeconds).apply(JSON.stringify);
61
+ }
62
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
63
+ const secretOpts = { additionalSecretOutputs: ["bearer"] };
64
+ opts = pulumi.mergeOptions(opts, secretOpts);
65
+ super(Provider.__pulumiType, name, resourceInputs, opts);
66
+ }
67
+
68
+ /**
69
+ * This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider.
70
+ */
71
+ terraformConfig(): pulumi.Output<Provider.TerraformConfigResult> {
72
+ return pulumi.runtime.call("pulumi:providers:quant/terraformConfig", {
73
+ "__self__": this,
74
+ }, this);
75
+ }
76
+ }
77
+
78
+ /**
79
+ * The set of arguments for constructing a Provider resource.
80
+ */
81
+ export interface ProviderArgs {
82
+ /**
83
+ * Base delay in milliseconds for exponential backoff. Defaults to 500
84
+ */
85
+ baseDelayMs?: pulumi.Input<number>;
86
+ /**
87
+ * The base URL for the QuantCDN API. Can also be set via QUANTCDN_BASE_URL environment variable.
88
+ */
89
+ baseUrl?: pulumi.Input<string>;
90
+ /**
91
+ * The QuantCDN API Bearer token used to authenticate requests. Can also be set via QUANTCDN_API_TOKEN environment variable.
92
+ */
93
+ bearer?: pulumi.Input<string>;
94
+ /**
95
+ * Whether to add random jitter to retry delays to avoid thundering herd. Defaults to true
96
+ */
97
+ enableJitter?: pulumi.Input<boolean>;
98
+ /**
99
+ * Maximum delay in milliseconds for exponential backoff. Defaults to 30000 (30 seconds)
100
+ */
101
+ maxDelayMs?: pulumi.Input<number>;
102
+ /**
103
+ * Maximum number of retry attempts for failed requests. Defaults to 3
104
+ */
105
+ maxRetries?: pulumi.Input<number>;
106
+ /**
107
+ * The QuantCDN organization machine name. Can also be set via QUANTCDN_ORGANIZATION environment variable.
108
+ */
109
+ organization?: pulumi.Input<string>;
110
+ /**
111
+ * Maximum number of requests per second to send to the API. Defaults to 10.0
112
+ */
113
+ requestsPerSecond?: pulumi.Input<number>;
114
+ /**
115
+ * HTTP client timeout in seconds for API requests. Defaults to 120 seconds to handle slow operations and potential deadlocks. Can also be set via QUANTCDN_TIMEOUT_SECONDS environment variable.
116
+ */
117
+ timeoutSeconds?: pulumi.Input<number>;
118
+ }
119
+
120
+ export namespace Provider {
121
+ /**
122
+ * The results of the Provider.terraformConfig method.
123
+ */
124
+ export interface TerraformConfigResult {
125
+ readonly result: {[key: string]: any};
126
+ }
127
+
128
+ }