-
Notifications
You must be signed in to change notification settings - Fork 19
/
folderContact.ts
127 lines (120 loc) · 5.84 KB
/
folderContact.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
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** 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";
/**
* Adds a new contact for a resource.
*/
export class FolderContact extends pulumi.CustomResource {
/**
* Get an existing FolderContact 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 opts Optional settings to control the behavior of the CustomResource.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): FolderContact {
return new FolderContact(name, undefined as any, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'google-native:essentialcontacts/v1:FolderContact';
/**
* Returns true if the given object is an instance of FolderContact. 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 FolderContact {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === FolderContact.__pulumiType;
}
/**
* Required. The email address to send notifications to. This does not need to be a Google account.
*/
public readonly email!: pulumi.Output<string>;
/**
* The preferred language for notifications, as a ISO 639-1 language code. See [Supported languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages) for a list of supported languages.
*/
public readonly languageTag!: pulumi.Output<string>;
/**
* The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}
*/
public readonly name!: pulumi.Output<string>;
/**
* The categories of notifications that the contact will receive communications for.
*/
public readonly notificationCategorySubscriptions!: pulumi.Output<string[]>;
/**
* The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago.
*/
public readonly validateTime!: pulumi.Output<string>;
/**
* The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.
*/
public readonly validationState!: pulumi.Output<string>;
/**
* Create a FolderContact 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: FolderContactArgs, opts?: pulumi.CustomResourceOptions) {
let inputs: pulumi.Inputs = {};
opts = opts || {};
if (!opts.id) {
if ((!args || args.folderId === undefined) && !opts.urn) {
throw new Error("Missing required property 'folderId'");
}
inputs["email"] = args ? args.email : undefined;
inputs["folderId"] = args ? args.folderId : undefined;
inputs["languageTag"] = args ? args.languageTag : undefined;
inputs["name"] = args ? args.name : undefined;
inputs["notificationCategorySubscriptions"] = args ? args.notificationCategorySubscriptions : undefined;
inputs["validateTime"] = args ? args.validateTime : undefined;
inputs["validationState"] = args ? args.validationState : undefined;
} else {
inputs["email"] = undefined /*out*/;
inputs["languageTag"] = undefined /*out*/;
inputs["name"] = undefined /*out*/;
inputs["notificationCategorySubscriptions"] = undefined /*out*/;
inputs["validateTime"] = undefined /*out*/;
inputs["validationState"] = undefined /*out*/;
}
if (!opts.version) {
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
}
super(FolderContact.__pulumiType, name, inputs, opts);
}
}
/**
* The set of arguments for constructing a FolderContact resource.
*/
export interface FolderContactArgs {
/**
* Required. The email address to send notifications to. This does not need to be a Google account.
*/
readonly email?: pulumi.Input<string>;
readonly folderId: pulumi.Input<string>;
/**
* The preferred language for notifications, as a ISO 639-1 language code. See [Supported languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages) for a list of supported languages.
*/
readonly languageTag?: pulumi.Input<string>;
/**
* The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}
*/
readonly name?: pulumi.Input<string>;
/**
* The categories of notifications that the contact will receive communications for.
*/
readonly notificationCategorySubscriptions?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago.
*/
readonly validateTime?: pulumi.Input<string>;
/**
* The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.
*/
readonly validationState?: pulumi.Input<string>;
}