This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
/
remediationAtSubscription.go
198 lines (174 loc) · 9.01 KB
/
remediationAtSubscription.go
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
// *** 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! ***
package v20190701
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// The remediation definition.
type RemediationAtSubscription struct {
pulumi.CustomResourceState
// The time at which the remediation was created.
CreatedOn pulumi.StringOutput `pulumi:"createdOn"`
// The deployment status summary for all deployments created by the remediation.
DeploymentStatus RemediationDeploymentSummaryResponseOutput `pulumi:"deploymentStatus"`
// The filters that will be applied to determine which resources to remediate.
Filters RemediationFiltersResponsePtrOutput `pulumi:"filters"`
// The time at which the remediation was last updated.
LastUpdatedOn pulumi.StringOutput `pulumi:"lastUpdatedOn"`
// The name of the remediation.
Name pulumi.StringOutput `pulumi:"name"`
// The resource ID of the policy assignment that should be remediated.
PolicyAssignmentId pulumi.StringPtrOutput `pulumi:"policyAssignmentId"`
// The policy definition reference ID of the individual definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
PolicyDefinitionReferenceId pulumi.StringPtrOutput `pulumi:"policyDefinitionReferenceId"`
// The status of the remediation.
ProvisioningState pulumi.StringOutput `pulumi:"provisioningState"`
// The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified.
ResourceDiscoveryMode pulumi.StringPtrOutput `pulumi:"resourceDiscoveryMode"`
// The type of the remediation.
Type pulumi.StringOutput `pulumi:"type"`
}
// NewRemediationAtSubscription registers a new resource with the given unique name, arguments, and options.
func NewRemediationAtSubscription(ctx *pulumi.Context,
name string, args *RemediationAtSubscriptionArgs, opts ...pulumi.ResourceOption) (*RemediationAtSubscription, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.RemediationName == nil {
return nil, errors.New("invalid value for required argument 'RemediationName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:policyinsights/latest:RemediationAtSubscription"),
},
{
Type: pulumi.String("azure-nextgen:policyinsights/v20180701preview:RemediationAtSubscription"),
},
})
opts = append(opts, aliases)
var resource RemediationAtSubscription
err := ctx.RegisterResource("azure-nextgen:policyinsights/v20190701:RemediationAtSubscription", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRemediationAtSubscription gets an existing RemediationAtSubscription resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetRemediationAtSubscription(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RemediationAtSubscriptionState, opts ...pulumi.ResourceOption) (*RemediationAtSubscription, error) {
var resource RemediationAtSubscription
err := ctx.ReadResource("azure-nextgen:policyinsights/v20190701:RemediationAtSubscription", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RemediationAtSubscription resources.
type remediationAtSubscriptionState struct {
// The time at which the remediation was created.
CreatedOn *string `pulumi:"createdOn"`
// The deployment status summary for all deployments created by the remediation.
DeploymentStatus *RemediationDeploymentSummaryResponse `pulumi:"deploymentStatus"`
// The filters that will be applied to determine which resources to remediate.
Filters *RemediationFiltersResponse `pulumi:"filters"`
// The time at which the remediation was last updated.
LastUpdatedOn *string `pulumi:"lastUpdatedOn"`
// The name of the remediation.
Name *string `pulumi:"name"`
// The resource ID of the policy assignment that should be remediated.
PolicyAssignmentId *string `pulumi:"policyAssignmentId"`
// The policy definition reference ID of the individual definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
PolicyDefinitionReferenceId *string `pulumi:"policyDefinitionReferenceId"`
// The status of the remediation.
ProvisioningState *string `pulumi:"provisioningState"`
// The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified.
ResourceDiscoveryMode *string `pulumi:"resourceDiscoveryMode"`
// The type of the remediation.
Type *string `pulumi:"type"`
}
type RemediationAtSubscriptionState struct {
// The time at which the remediation was created.
CreatedOn pulumi.StringPtrInput
// The deployment status summary for all deployments created by the remediation.
DeploymentStatus RemediationDeploymentSummaryResponsePtrInput
// The filters that will be applied to determine which resources to remediate.
Filters RemediationFiltersResponsePtrInput
// The time at which the remediation was last updated.
LastUpdatedOn pulumi.StringPtrInput
// The name of the remediation.
Name pulumi.StringPtrInput
// The resource ID of the policy assignment that should be remediated.
PolicyAssignmentId pulumi.StringPtrInput
// The policy definition reference ID of the individual definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
PolicyDefinitionReferenceId pulumi.StringPtrInput
// The status of the remediation.
ProvisioningState pulumi.StringPtrInput
// The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified.
ResourceDiscoveryMode pulumi.StringPtrInput
// The type of the remediation.
Type pulumi.StringPtrInput
}
func (RemediationAtSubscriptionState) ElementType() reflect.Type {
return reflect.TypeOf((*remediationAtSubscriptionState)(nil)).Elem()
}
type remediationAtSubscriptionArgs struct {
// The filters that will be applied to determine which resources to remediate.
Filters *RemediationFilters `pulumi:"filters"`
// The resource ID of the policy assignment that should be remediated.
PolicyAssignmentId *string `pulumi:"policyAssignmentId"`
// The policy definition reference ID of the individual definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
PolicyDefinitionReferenceId *string `pulumi:"policyDefinitionReferenceId"`
// The name of the remediation.
RemediationName string `pulumi:"remediationName"`
// The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified.
ResourceDiscoveryMode *string `pulumi:"resourceDiscoveryMode"`
}
// The set of arguments for constructing a RemediationAtSubscription resource.
type RemediationAtSubscriptionArgs struct {
// The filters that will be applied to determine which resources to remediate.
Filters RemediationFiltersPtrInput
// The resource ID of the policy assignment that should be remediated.
PolicyAssignmentId pulumi.StringPtrInput
// The policy definition reference ID of the individual definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
PolicyDefinitionReferenceId pulumi.StringPtrInput
// The name of the remediation.
RemediationName pulumi.StringInput
// The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified.
ResourceDiscoveryMode pulumi.StringPtrInput
}
func (RemediationAtSubscriptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*remediationAtSubscriptionArgs)(nil)).Elem()
}
type RemediationAtSubscriptionInput interface {
pulumi.Input
ToRemediationAtSubscriptionOutput() RemediationAtSubscriptionOutput
ToRemediationAtSubscriptionOutputWithContext(ctx context.Context) RemediationAtSubscriptionOutput
}
func (*RemediationAtSubscription) ElementType() reflect.Type {
return reflect.TypeOf((*RemediationAtSubscription)(nil))
}
func (i *RemediationAtSubscription) ToRemediationAtSubscriptionOutput() RemediationAtSubscriptionOutput {
return i.ToRemediationAtSubscriptionOutputWithContext(context.Background())
}
func (i *RemediationAtSubscription) ToRemediationAtSubscriptionOutputWithContext(ctx context.Context) RemediationAtSubscriptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(RemediationAtSubscriptionOutput)
}
type RemediationAtSubscriptionOutput struct {
*pulumi.OutputState
}
func (RemediationAtSubscriptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((*RemediationAtSubscription)(nil))
}
func (o RemediationAtSubscriptionOutput) ToRemediationAtSubscriptionOutput() RemediationAtSubscriptionOutput {
return o
}
func (o RemediationAtSubscriptionOutput) ToRemediationAtSubscriptionOutputWithContext(ctx context.Context) RemediationAtSubscriptionOutput {
return o
}
func init() {
pulumi.RegisterOutputType(RemediationAtSubscriptionOutput{})
}