/
apnsVoipSandboxChannel.ts
232 lines (223 loc) · 10.5 KB
/
apnsVoipSandboxChannel.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "../utilities";
/**
* Provides a Pinpoint APNs VoIP Sandbox Channel resource.
*
* > **Note:** All arguments, including certificates and tokens, will be stored in the raw state as plain-text.
* [Read more about sensitive data in state](https://www.terraform.io/docs/state/sensitive-data.html).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* import * as fs from "fs";
*
* const app = new aws.pinpoint.App("app", {});
* const apnsVoipSandbox = new aws.pinpoint.ApnsVoipSandboxChannel("apnsVoipSandbox", {
* applicationId: app.applicationId,
* certificate: fs.readFileSync("./certificate.pem", "utf-8"),
* privateKey: fs.readFileSync("./private_key.key", "utf-8"),
* });
* ```
*
* > This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/pinpoint_apns_voip_sandbox_channel.html.markdown.
*/
export class ApnsVoipSandboxChannel extends pulumi.CustomResource {
/**
* Get an existing ApnsVoipSandboxChannel resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ApnsVoipSandboxChannelState, opts?: pulumi.CustomResourceOptions): ApnsVoipSandboxChannel {
return new ApnsVoipSandboxChannel(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'aws:pinpoint/apnsVoipSandboxChannel:ApnsVoipSandboxChannel';
/**
* Returns true if the given object is an instance of ApnsVoipSandboxChannel. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is ApnsVoipSandboxChannel {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === ApnsVoipSandboxChannel.__pulumiType;
}
/**
* The application ID.
*/
public readonly applicationId!: pulumi.Output<string>;
/**
* The ID assigned to your iOS app. To find this value, choose Certificates, IDs & Profiles, choose App IDs in the Identifiers section, and choose your app.
*/
public readonly bundleId!: pulumi.Output<string | undefined>;
/**
* The pem encoded TLS Certificate from Apple.
*/
public readonly certificate!: pulumi.Output<string | undefined>;
/**
* The default authentication method used for APNs.
* __NOTE__: Amazon Pinpoint uses this default for every APNs push notification that you send using the console.
* You can override the default when you send a message programmatically using the Amazon Pinpoint API, the AWS CLI, or an AWS SDK.
* If your default authentication type fails, Amazon Pinpoint doesn't attempt to use the other authentication type.
*/
public readonly defaultAuthenticationMethod!: pulumi.Output<string | undefined>;
/**
* Whether the channel is enabled or disabled. Defaults to `true`.
*/
public readonly enabled!: pulumi.Output<boolean | undefined>;
/**
* The Certificate Private Key file (ie. `.key` file).
*/
public readonly privateKey!: pulumi.Output<string | undefined>;
/**
* The ID assigned to your Apple developer account team. This value is provided on the Membership page.
*/
public readonly teamId!: pulumi.Output<string | undefined>;
/**
* The `.p8` file that you download from your Apple developer account when you create an authentication key.
*/
public readonly tokenKey!: pulumi.Output<string | undefined>;
/**
* The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
*/
public readonly tokenKeyId!: pulumi.Output<string | undefined>;
/**
* Create a ApnsVoipSandboxChannel resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ApnsVoipSandboxChannelArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: ApnsVoipSandboxChannelArgs | ApnsVoipSandboxChannelState, opts?: pulumi.CustomResourceOptions) {
let inputs: pulumi.Inputs = {};
if (opts && opts.id) {
const state = argsOrState as ApnsVoipSandboxChannelState | undefined;
inputs["applicationId"] = state ? state.applicationId : undefined;
inputs["bundleId"] = state ? state.bundleId : undefined;
inputs["certificate"] = state ? state.certificate : undefined;
inputs["defaultAuthenticationMethod"] = state ? state.defaultAuthenticationMethod : undefined;
inputs["enabled"] = state ? state.enabled : undefined;
inputs["privateKey"] = state ? state.privateKey : undefined;
inputs["teamId"] = state ? state.teamId : undefined;
inputs["tokenKey"] = state ? state.tokenKey : undefined;
inputs["tokenKeyId"] = state ? state.tokenKeyId : undefined;
} else {
const args = argsOrState as ApnsVoipSandboxChannelArgs | undefined;
if (!args || args.applicationId === undefined) {
throw new Error("Missing required property 'applicationId'");
}
inputs["applicationId"] = args ? args.applicationId : undefined;
inputs["bundleId"] = args ? args.bundleId : undefined;
inputs["certificate"] = args ? args.certificate : undefined;
inputs["defaultAuthenticationMethod"] = args ? args.defaultAuthenticationMethod : undefined;
inputs["enabled"] = args ? args.enabled : undefined;
inputs["privateKey"] = args ? args.privateKey : undefined;
inputs["teamId"] = args ? args.teamId : undefined;
inputs["tokenKey"] = args ? args.tokenKey : undefined;
inputs["tokenKeyId"] = args ? args.tokenKeyId : undefined;
}
if (!opts) {
opts = {}
}
if (!opts.version) {
opts.version = utilities.getVersion();
}
super(ApnsVoipSandboxChannel.__pulumiType, name, inputs, opts);
}
}
/**
* Input properties used for looking up and filtering ApnsVoipSandboxChannel resources.
*/
export interface ApnsVoipSandboxChannelState {
/**
* The application ID.
*/
readonly applicationId?: pulumi.Input<string>;
/**
* The ID assigned to your iOS app. To find this value, choose Certificates, IDs & Profiles, choose App IDs in the Identifiers section, and choose your app.
*/
readonly bundleId?: pulumi.Input<string>;
/**
* The pem encoded TLS Certificate from Apple.
*/
readonly certificate?: pulumi.Input<string>;
/**
* The default authentication method used for APNs.
* __NOTE__: Amazon Pinpoint uses this default for every APNs push notification that you send using the console.
* You can override the default when you send a message programmatically using the Amazon Pinpoint API, the AWS CLI, or an AWS SDK.
* If your default authentication type fails, Amazon Pinpoint doesn't attempt to use the other authentication type.
*/
readonly defaultAuthenticationMethod?: pulumi.Input<string>;
/**
* Whether the channel is enabled or disabled. Defaults to `true`.
*/
readonly enabled?: pulumi.Input<boolean>;
/**
* The Certificate Private Key file (ie. `.key` file).
*/
readonly privateKey?: pulumi.Input<string>;
/**
* The ID assigned to your Apple developer account team. This value is provided on the Membership page.
*/
readonly teamId?: pulumi.Input<string>;
/**
* The `.p8` file that you download from your Apple developer account when you create an authentication key.
*/
readonly tokenKey?: pulumi.Input<string>;
/**
* The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
*/
readonly tokenKeyId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ApnsVoipSandboxChannel resource.
*/
export interface ApnsVoipSandboxChannelArgs {
/**
* The application ID.
*/
readonly applicationId: pulumi.Input<string>;
/**
* The ID assigned to your iOS app. To find this value, choose Certificates, IDs & Profiles, choose App IDs in the Identifiers section, and choose your app.
*/
readonly bundleId?: pulumi.Input<string>;
/**
* The pem encoded TLS Certificate from Apple.
*/
readonly certificate?: pulumi.Input<string>;
/**
* The default authentication method used for APNs.
* __NOTE__: Amazon Pinpoint uses this default for every APNs push notification that you send using the console.
* You can override the default when you send a message programmatically using the Amazon Pinpoint API, the AWS CLI, or an AWS SDK.
* If your default authentication type fails, Amazon Pinpoint doesn't attempt to use the other authentication type.
*/
readonly defaultAuthenticationMethod?: pulumi.Input<string>;
/**
* Whether the channel is enabled or disabled. Defaults to `true`.
*/
readonly enabled?: pulumi.Input<boolean>;
/**
* The Certificate Private Key file (ie. `.key` file).
*/
readonly privateKey?: pulumi.Input<string>;
/**
* The ID assigned to your Apple developer account team. This value is provided on the Membership page.
*/
readonly teamId?: pulumi.Input<string>;
/**
* The `.p8` file that you download from your Apple developer account when you create an authentication key.
*/
readonly tokenKey?: pulumi.Input<string>;
/**
* The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
*/
readonly tokenKeyId?: pulumi.Input<string>;
}