/
authorizedCertificate.go
186 lines (153 loc) · 10.3 KB
/
authorizedCertificate.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1alpha
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Uploads the specified SSL certificate.
// Auto-naming is currently not supported for this resource.
type AuthorizedCertificate struct {
pulumi.CustomResourceState
AppId pulumi.StringOutput `pulumi:"appId"`
// The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority.
CertificateRawData CertificateRawDataResponseOutput `pulumi:"certificateRawData"`
// The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// Aggregate count of the domain mappings with this certificate mapped. This count includes domain mappings on applications for which the user does not have VIEWER permissions.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.
DomainMappingsCount pulumi.IntOutput `pulumi:"domainMappingsCount"`
// Topmost applicable domains of this certificate. This certificate applies to these domains and their subdomains. Example: example.com.
DomainNames pulumi.StringArrayOutput `pulumi:"domainNames"`
// The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time using AuthorizedCertificates.UpdateAuthorizedCertificate.
ExpireTime pulumi.StringOutput `pulumi:"expireTime"`
// Only applicable if this certificate is managed by App Engine. Managed certificates are tied to the lifecycle of a DomainMapping and cannot be updated or deleted via the AuthorizedCertificates API. If this certificate is manually administered by the user, this field will be empty.
ManagedCertificate ManagedCertificateResponseOutput `pulumi:"managedCertificate"`
// Full path to the AuthorizedCertificate resource in the API. Example: apps/myapp/authorizedCertificates/12345.
Name pulumi.StringOutput `pulumi:"name"`
// The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.
VisibleDomainMappings pulumi.StringArrayOutput `pulumi:"visibleDomainMappings"`
}
// NewAuthorizedCertificate registers a new resource with the given unique name, arguments, and options.
func NewAuthorizedCertificate(ctx *pulumi.Context,
name string, args *AuthorizedCertificateArgs, opts ...pulumi.ResourceOption) (*AuthorizedCertificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AppId == nil {
return nil, errors.New("invalid value for required argument 'AppId'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"appId",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource AuthorizedCertificate
err := ctx.RegisterResource("google-native:appengine/v1alpha:AuthorizedCertificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAuthorizedCertificate gets an existing AuthorizedCertificate 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 GetAuthorizedCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AuthorizedCertificateState, opts ...pulumi.ResourceOption) (*AuthorizedCertificate, error) {
var resource AuthorizedCertificate
err := ctx.ReadResource("google-native:appengine/v1alpha:AuthorizedCertificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AuthorizedCertificate resources.
type authorizedCertificateState struct {
}
type AuthorizedCertificateState struct {
}
func (AuthorizedCertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*authorizedCertificateState)(nil)).Elem()
}
type authorizedCertificateArgs struct {
AppId string `pulumi:"appId"`
// The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority.
CertificateRawData *CertificateRawData `pulumi:"certificateRawData"`
// The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate.
DisplayName *string `pulumi:"displayName"`
}
// The set of arguments for constructing a AuthorizedCertificate resource.
type AuthorizedCertificateArgs struct {
AppId pulumi.StringInput
// The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority.
CertificateRawData CertificateRawDataPtrInput
// The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate.
DisplayName pulumi.StringPtrInput
}
func (AuthorizedCertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*authorizedCertificateArgs)(nil)).Elem()
}
type AuthorizedCertificateInput interface {
pulumi.Input
ToAuthorizedCertificateOutput() AuthorizedCertificateOutput
ToAuthorizedCertificateOutputWithContext(ctx context.Context) AuthorizedCertificateOutput
}
func (*AuthorizedCertificate) ElementType() reflect.Type {
return reflect.TypeOf((**AuthorizedCertificate)(nil)).Elem()
}
func (i *AuthorizedCertificate) ToAuthorizedCertificateOutput() AuthorizedCertificateOutput {
return i.ToAuthorizedCertificateOutputWithContext(context.Background())
}
func (i *AuthorizedCertificate) ToAuthorizedCertificateOutputWithContext(ctx context.Context) AuthorizedCertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuthorizedCertificateOutput)
}
type AuthorizedCertificateOutput struct{ *pulumi.OutputState }
func (AuthorizedCertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AuthorizedCertificate)(nil)).Elem()
}
func (o AuthorizedCertificateOutput) ToAuthorizedCertificateOutput() AuthorizedCertificateOutput {
return o
}
func (o AuthorizedCertificateOutput) ToAuthorizedCertificateOutputWithContext(ctx context.Context) AuthorizedCertificateOutput {
return o
}
func (o AuthorizedCertificateOutput) AppId() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizedCertificate) pulumi.StringOutput { return v.AppId }).(pulumi.StringOutput)
}
// The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority.
func (o AuthorizedCertificateOutput) CertificateRawData() CertificateRawDataResponseOutput {
return o.ApplyT(func(v *AuthorizedCertificate) CertificateRawDataResponseOutput { return v.CertificateRawData }).(CertificateRawDataResponseOutput)
}
// The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate.
func (o AuthorizedCertificateOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizedCertificate) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// Aggregate count of the domain mappings with this certificate mapped. This count includes domain mappings on applications for which the user does not have VIEWER permissions.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.
func (o AuthorizedCertificateOutput) DomainMappingsCount() pulumi.IntOutput {
return o.ApplyT(func(v *AuthorizedCertificate) pulumi.IntOutput { return v.DomainMappingsCount }).(pulumi.IntOutput)
}
// Topmost applicable domains of this certificate. This certificate applies to these domains and their subdomains. Example: example.com.
func (o AuthorizedCertificateOutput) DomainNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AuthorizedCertificate) pulumi.StringArrayOutput { return v.DomainNames }).(pulumi.StringArrayOutput)
}
// The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time using AuthorizedCertificates.UpdateAuthorizedCertificate.
func (o AuthorizedCertificateOutput) ExpireTime() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizedCertificate) pulumi.StringOutput { return v.ExpireTime }).(pulumi.StringOutput)
}
// Only applicable if this certificate is managed by App Engine. Managed certificates are tied to the lifecycle of a DomainMapping and cannot be updated or deleted via the AuthorizedCertificates API. If this certificate is manually administered by the user, this field will be empty.
func (o AuthorizedCertificateOutput) ManagedCertificate() ManagedCertificateResponseOutput {
return o.ApplyT(func(v *AuthorizedCertificate) ManagedCertificateResponseOutput { return v.ManagedCertificate }).(ManagedCertificateResponseOutput)
}
// Full path to the AuthorizedCertificate resource in the API. Example: apps/myapp/authorizedCertificates/12345.
func (o AuthorizedCertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizedCertificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.
func (o AuthorizedCertificateOutput) VisibleDomainMappings() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AuthorizedCertificate) pulumi.StringArrayOutput { return v.VisibleDomainMappings }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AuthorizedCertificateInput)(nil)).Elem(), &AuthorizedCertificate{})
pulumi.RegisterOutputType(AuthorizedCertificateOutput{})
}