-
Notifications
You must be signed in to change notification settings - Fork 17
/
signingProfile.go
171 lines (140 loc) · 6.7 KB
/
signingProfile.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
// 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 signer
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// A signing profile is a signing template that can be used to carry out a pre-defined signing job.
type SigningProfile struct {
pulumi.CustomResourceState
// The Amazon Resource Name (ARN) of the specified signing profile.
Arn pulumi.StringOutput `pulumi:"arn"`
// The ID of the target signing platform.
PlatformId SigningProfilePlatformIdOutput `pulumi:"platformId"`
// A name for the signing profile. AWS CloudFormation generates a unique physical ID and uses that ID for the signing profile name.
ProfileName pulumi.StringOutput `pulumi:"profileName"`
// A version for the signing profile. AWS Signer generates a unique version for each profile of the same profile name.
ProfileVersion pulumi.StringOutput `pulumi:"profileVersion"`
// The Amazon Resource Name (ARN) of the specified signing profile version.
ProfileVersionArn pulumi.StringOutput `pulumi:"profileVersionArn"`
// Signature validity period of the profile.
SignatureValidityPeriod SigningProfileSignatureValidityPeriodPtrOutput `pulumi:"signatureValidityPeriod"`
// A list of tags associated with the signing profile.
Tags SigningProfileTagArrayOutput `pulumi:"tags"`
}
// NewSigningProfile registers a new resource with the given unique name, arguments, and options.
func NewSigningProfile(ctx *pulumi.Context,
name string, args *SigningProfileArgs, opts ...pulumi.ResourceOption) (*SigningProfile, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PlatformId == nil {
return nil, errors.New("invalid value for required argument 'PlatformId'")
}
var resource SigningProfile
err := ctx.RegisterResource("aws-native:signer:SigningProfile", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSigningProfile gets an existing SigningProfile 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 GetSigningProfile(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SigningProfileState, opts ...pulumi.ResourceOption) (*SigningProfile, error) {
var resource SigningProfile
err := ctx.ReadResource("aws-native:signer:SigningProfile", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SigningProfile resources.
type signingProfileState struct {
}
type SigningProfileState struct {
}
func (SigningProfileState) ElementType() reflect.Type {
return reflect.TypeOf((*signingProfileState)(nil)).Elem()
}
type signingProfileArgs struct {
// The ID of the target signing platform.
PlatformId SigningProfilePlatformId `pulumi:"platformId"`
// Signature validity period of the profile.
SignatureValidityPeriod *SigningProfileSignatureValidityPeriod `pulumi:"signatureValidityPeriod"`
// A list of tags associated with the signing profile.
Tags []SigningProfileTag `pulumi:"tags"`
}
// The set of arguments for constructing a SigningProfile resource.
type SigningProfileArgs struct {
// The ID of the target signing platform.
PlatformId SigningProfilePlatformIdInput
// Signature validity period of the profile.
SignatureValidityPeriod SigningProfileSignatureValidityPeriodPtrInput
// A list of tags associated with the signing profile.
Tags SigningProfileTagArrayInput
}
func (SigningProfileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*signingProfileArgs)(nil)).Elem()
}
type SigningProfileInput interface {
pulumi.Input
ToSigningProfileOutput() SigningProfileOutput
ToSigningProfileOutputWithContext(ctx context.Context) SigningProfileOutput
}
func (*SigningProfile) ElementType() reflect.Type {
return reflect.TypeOf((**SigningProfile)(nil)).Elem()
}
func (i *SigningProfile) ToSigningProfileOutput() SigningProfileOutput {
return i.ToSigningProfileOutputWithContext(context.Background())
}
func (i *SigningProfile) ToSigningProfileOutputWithContext(ctx context.Context) SigningProfileOutput {
return pulumi.ToOutputWithContext(ctx, i).(SigningProfileOutput)
}
type SigningProfileOutput struct{ *pulumi.OutputState }
func (SigningProfileOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SigningProfile)(nil)).Elem()
}
func (o SigningProfileOutput) ToSigningProfileOutput() SigningProfileOutput {
return o
}
func (o SigningProfileOutput) ToSigningProfileOutputWithContext(ctx context.Context) SigningProfileOutput {
return o
}
// The Amazon Resource Name (ARN) of the specified signing profile.
func (o SigningProfileOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *SigningProfile) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
// The ID of the target signing platform.
func (o SigningProfileOutput) PlatformId() SigningProfilePlatformIdOutput {
return o.ApplyT(func(v *SigningProfile) SigningProfilePlatformIdOutput { return v.PlatformId }).(SigningProfilePlatformIdOutput)
}
// A name for the signing profile. AWS CloudFormation generates a unique physical ID and uses that ID for the signing profile name.
func (o SigningProfileOutput) ProfileName() pulumi.StringOutput {
return o.ApplyT(func(v *SigningProfile) pulumi.StringOutput { return v.ProfileName }).(pulumi.StringOutput)
}
// A version for the signing profile. AWS Signer generates a unique version for each profile of the same profile name.
func (o SigningProfileOutput) ProfileVersion() pulumi.StringOutput {
return o.ApplyT(func(v *SigningProfile) pulumi.StringOutput { return v.ProfileVersion }).(pulumi.StringOutput)
}
// The Amazon Resource Name (ARN) of the specified signing profile version.
func (o SigningProfileOutput) ProfileVersionArn() pulumi.StringOutput {
return o.ApplyT(func(v *SigningProfile) pulumi.StringOutput { return v.ProfileVersionArn }).(pulumi.StringOutput)
}
// Signature validity period of the profile.
func (o SigningProfileOutput) SignatureValidityPeriod() SigningProfileSignatureValidityPeriodPtrOutput {
return o.ApplyT(func(v *SigningProfile) SigningProfileSignatureValidityPeriodPtrOutput {
return v.SignatureValidityPeriod
}).(SigningProfileSignatureValidityPeriodPtrOutput)
}
// A list of tags associated with the signing profile.
func (o SigningProfileOutput) Tags() SigningProfileTagArrayOutput {
return o.ApplyT(func(v *SigningProfile) SigningProfileTagArrayOutput { return v.Tags }).(SigningProfileTagArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SigningProfileInput)(nil)).Elem(), &SigningProfile{})
pulumi.RegisterOutputType(SigningProfileOutput{})
}