-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathraiPolicy.ts
130 lines (123 loc) · 5.48 KB
/
raiPolicy.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
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../../types/input";
import * as outputs from "../../types/output";
import * as enums from "../../types/enums";
import * as utilities from "../../utilities";
/**
* Cognitive Services RaiPolicy.
*/
export class RaiPolicy extends pulumi.CustomResource {
/**
* Get an existing RaiPolicy 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): RaiPolicy {
return new RaiPolicy(name, undefined as any, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'azure-native:cognitiveservices/v20231001preview:RaiPolicy';
/**
* Returns true if the given object is an instance of RaiPolicy. 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 RaiPolicy {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === RaiPolicy.__pulumiType;
}
/**
* Resource Etag.
*/
public /*out*/ readonly etag!: pulumi.Output<string>;
/**
* The name of the resource
*/
public /*out*/ readonly name!: pulumi.Output<string>;
/**
* Properties of Cognitive Services RaiPolicy.
*/
public readonly properties!: pulumi.Output<outputs.cognitiveservices.v20231001preview.RaiPolicyPropertiesResponse>;
/**
* Metadata pertaining to creation and last modification of the resource.
*/
public /*out*/ readonly systemData!: pulumi.Output<outputs.cognitiveservices.v20231001preview.SystemDataResponse>;
/**
* Resource tags.
*/
public readonly tags!: pulumi.Output<{[key: string]: string} | undefined>;
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*/
public /*out*/ readonly type!: pulumi.Output<string>;
/**
* Create a RaiPolicy 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: RaiPolicyArgs, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (!opts.id) {
if ((!args || args.accountName === undefined) && !opts.urn) {
throw new Error("Missing required property 'accountName'");
}
if ((!args || args.resourceGroupName === undefined) && !opts.urn) {
throw new Error("Missing required property 'resourceGroupName'");
}
resourceInputs["accountName"] = args ? args.accountName : undefined;
resourceInputs["properties"] = args ? args.properties : undefined;
resourceInputs["raiPolicyName"] = args ? args.raiPolicyName : undefined;
resourceInputs["resourceGroupName"] = args ? args.resourceGroupName : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["etag"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["systemData"] = undefined /*out*/;
resourceInputs["type"] = undefined /*out*/;
} else {
resourceInputs["etag"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["properties"] = undefined /*out*/;
resourceInputs["systemData"] = undefined /*out*/;
resourceInputs["tags"] = undefined /*out*/;
resourceInputs["type"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const aliasOpts = { aliases: [{ type: "azure-native:cognitiveservices/v20240401preview:RaiPolicy" }, { type: "azure-native:cognitiveservices/v20240601preview:RaiPolicy" }, { type: "azure-native:cognitiveservices/v20241001:RaiPolicy" }, { type: "azure-native:cognitiveservices:RaiPolicy" }] };
opts = pulumi.mergeOptions(opts, aliasOpts);
super(RaiPolicy.__pulumiType, name, resourceInputs, opts);
}
}
/**
* The set of arguments for constructing a RaiPolicy resource.
*/
export interface RaiPolicyArgs {
/**
* The name of Cognitive Services account.
*/
accountName: pulumi.Input<string>;
/**
* Properties of Cognitive Services RaiPolicy.
*/
properties?: pulumi.Input<inputs.cognitiveservices.v20231001preview.RaiPolicyPropertiesArgs>;
/**
* The name of the RaiPolicy associated with the Cognitive Services Account
*/
raiPolicyName?: pulumi.Input<string>;
/**
* The name of the resource group. The name is case insensitive.
*/
resourceGroupName: pulumi.Input<string>;
/**
* Resource tags.
*/
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
}