// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package dokploy import ( "context" "reflect" "errors" "github.com/maxvojtkov/pulumi-dokploy/sdk/go/dokploy/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type SshKey struct { pulumi.CustomResourceState // RFC 3339 timestamp of when the key was created. CreatedAt pulumi.StringOutput `pulumi:"createdAt"` // Free-form description. Description pulumi.StringPtrOutput `pulumi:"description"` // RFC 3339 timestamp of when the key was last used, if ever. LastUsedAt pulumi.StringOutput `pulumi:"lastUsedAt"` // Display name of the key pair. Name pulumi.StringOutput `pulumi:"name"` // PEM-encoded private key. PrivateKey pulumi.StringOutput `pulumi:"privateKey"` // OpenSSH-formatted public key. PublicKey pulumi.StringOutput `pulumi:"publicKey"` } // NewSshKey registers a new resource with the given unique name, arguments, and options. func NewSshKey(ctx *pulumi.Context, name string, args *SshKeyArgs, opts ...pulumi.ResourceOption) (*SshKey, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PrivateKey == nil { return nil, errors.New("invalid value for required argument 'PrivateKey'") } if args.PublicKey == nil { return nil, errors.New("invalid value for required argument 'PublicKey'") } if args.PrivateKey != nil { args.PrivateKey = pulumi.ToSecret(args.PrivateKey).(pulumi.StringInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "privateKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource SshKey err := ctx.RegisterResource("dokploy:index/sshKey:SshKey", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSshKey gets an existing SshKey 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 GetSshKey(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SshKeyState, opts ...pulumi.ResourceOption) (*SshKey, error) { var resource SshKey err := ctx.ReadResource("dokploy:index/sshKey:SshKey", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SshKey resources. type sshKeyState struct { // RFC 3339 timestamp of when the key was created. CreatedAt *string `pulumi:"createdAt"` // Free-form description. Description *string `pulumi:"description"` // RFC 3339 timestamp of when the key was last used, if ever. LastUsedAt *string `pulumi:"lastUsedAt"` // Display name of the key pair. Name *string `pulumi:"name"` // PEM-encoded private key. PrivateKey *string `pulumi:"privateKey"` // OpenSSH-formatted public key. PublicKey *string `pulumi:"publicKey"` } type SshKeyState struct { // RFC 3339 timestamp of when the key was created. CreatedAt pulumi.StringPtrInput // Free-form description. Description pulumi.StringPtrInput // RFC 3339 timestamp of when the key was last used, if ever. LastUsedAt pulumi.StringPtrInput // Display name of the key pair. Name pulumi.StringPtrInput // PEM-encoded private key. PrivateKey pulumi.StringPtrInput // OpenSSH-formatted public key. PublicKey pulumi.StringPtrInput } func (SshKeyState) ElementType() reflect.Type { return reflect.TypeOf((*sshKeyState)(nil)).Elem() } type sshKeyArgs struct { // Free-form description. Description *string `pulumi:"description"` // Display name of the key pair. Name *string `pulumi:"name"` // PEM-encoded private key. PrivateKey string `pulumi:"privateKey"` // OpenSSH-formatted public key. PublicKey string `pulumi:"publicKey"` } // The set of arguments for constructing a SshKey resource. type SshKeyArgs struct { // Free-form description. Description pulumi.StringPtrInput // Display name of the key pair. Name pulumi.StringPtrInput // PEM-encoded private key. PrivateKey pulumi.StringInput // OpenSSH-formatted public key. PublicKey pulumi.StringInput } func (SshKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*sshKeyArgs)(nil)).Elem() } type SshKeyInput interface { pulumi.Input ToSshKeyOutput() SshKeyOutput ToSshKeyOutputWithContext(ctx context.Context) SshKeyOutput } func (*SshKey) ElementType() reflect.Type { return reflect.TypeOf((**SshKey)(nil)).Elem() } func (i *SshKey) ToSshKeyOutput() SshKeyOutput { return i.ToSshKeyOutputWithContext(context.Background()) } func (i *SshKey) ToSshKeyOutputWithContext(ctx context.Context) SshKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(SshKeyOutput) } // SshKeyArrayInput is an input type that accepts SshKeyArray and SshKeyArrayOutput values. // You can construct a concrete instance of `SshKeyArrayInput` via: // // SshKeyArray{ SshKeyArgs{...} } type SshKeyArrayInput interface { pulumi.Input ToSshKeyArrayOutput() SshKeyArrayOutput ToSshKeyArrayOutputWithContext(context.Context) SshKeyArrayOutput } type SshKeyArray []SshKeyInput func (SshKeyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SshKey)(nil)).Elem() } func (i SshKeyArray) ToSshKeyArrayOutput() SshKeyArrayOutput { return i.ToSshKeyArrayOutputWithContext(context.Background()) } func (i SshKeyArray) ToSshKeyArrayOutputWithContext(ctx context.Context) SshKeyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SshKeyArrayOutput) } // SshKeyMapInput is an input type that accepts SshKeyMap and SshKeyMapOutput values. // You can construct a concrete instance of `SshKeyMapInput` via: // // SshKeyMap{ "key": SshKeyArgs{...} } type SshKeyMapInput interface { pulumi.Input ToSshKeyMapOutput() SshKeyMapOutput ToSshKeyMapOutputWithContext(context.Context) SshKeyMapOutput } type SshKeyMap map[string]SshKeyInput func (SshKeyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SshKey)(nil)).Elem() } func (i SshKeyMap) ToSshKeyMapOutput() SshKeyMapOutput { return i.ToSshKeyMapOutputWithContext(context.Background()) } func (i SshKeyMap) ToSshKeyMapOutputWithContext(ctx context.Context) SshKeyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SshKeyMapOutput) } type SshKeyOutput struct{ *pulumi.OutputState } func (SshKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((**SshKey)(nil)).Elem() } func (o SshKeyOutput) ToSshKeyOutput() SshKeyOutput { return o } func (o SshKeyOutput) ToSshKeyOutputWithContext(ctx context.Context) SshKeyOutput { return o } // RFC 3339 timestamp of when the key was created. func (o SshKeyOutput) CreatedAt() pulumi.StringOutput { return o.ApplyT(func(v *SshKey) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput) } // Free-form description. func (o SshKeyOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *SshKey) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // RFC 3339 timestamp of when the key was last used, if ever. func (o SshKeyOutput) LastUsedAt() pulumi.StringOutput { return o.ApplyT(func(v *SshKey) pulumi.StringOutput { return v.LastUsedAt }).(pulumi.StringOutput) } // Display name of the key pair. func (o SshKeyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SshKey) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // PEM-encoded private key. func (o SshKeyOutput) PrivateKey() pulumi.StringOutput { return o.ApplyT(func(v *SshKey) pulumi.StringOutput { return v.PrivateKey }).(pulumi.StringOutput) } // OpenSSH-formatted public key. func (o SshKeyOutput) PublicKey() pulumi.StringOutput { return o.ApplyT(func(v *SshKey) pulumi.StringOutput { return v.PublicKey }).(pulumi.StringOutput) } type SshKeyArrayOutput struct{ *pulumi.OutputState } func (SshKeyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SshKey)(nil)).Elem() } func (o SshKeyArrayOutput) ToSshKeyArrayOutput() SshKeyArrayOutput { return o } func (o SshKeyArrayOutput) ToSshKeyArrayOutputWithContext(ctx context.Context) SshKeyArrayOutput { return o } func (o SshKeyArrayOutput) Index(i pulumi.IntInput) SshKeyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SshKey { return vs[0].([]*SshKey)[vs[1].(int)] }).(SshKeyOutput) } type SshKeyMapOutput struct{ *pulumi.OutputState } func (SshKeyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SshKey)(nil)).Elem() } func (o SshKeyMapOutput) ToSshKeyMapOutput() SshKeyMapOutput { return o } func (o SshKeyMapOutput) ToSshKeyMapOutputWithContext(ctx context.Context) SshKeyMapOutput { return o } func (o SshKeyMapOutput) MapIndex(k pulumi.StringInput) SshKeyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SshKey { return vs[0].(map[string]*SshKey)[vs[1].(string)] }).(SshKeyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SshKeyInput)(nil)).Elem(), &SshKey{}) pulumi.RegisterInputType(reflect.TypeOf((*SshKeyArrayInput)(nil)).Elem(), SshKeyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SshKeyMapInput)(nil)).Elem(), SshKeyMap{}) pulumi.RegisterOutputType(SshKeyOutput{}) pulumi.RegisterOutputType(SshKeyArrayOutput{}) pulumi.RegisterOutputType(SshKeyMapOutput{}) }