mirror of https://github.com/pulumi/pulumi.git
117 lines
3.5 KiB
Go
117 lines
3.5 KiB
Go
// 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 assetarchive
|
|
|
|
import (
|
|
"context"
|
|
"reflect"
|
|
|
|
"errors"
|
|
"example.com/pulumi-asset-archive/sdk/go/v5/assetarchive/internal"
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
|
)
|
|
|
|
type ArchiveResource struct {
|
|
pulumi.CustomResourceState
|
|
|
|
Value pulumi.ArchiveOutput `pulumi:"value"`
|
|
}
|
|
|
|
// NewArchiveResource registers a new resource with the given unique name, arguments, and options.
|
|
func NewArchiveResource(ctx *pulumi.Context,
|
|
name string, args *ArchiveResourceArgs, opts ...pulumi.ResourceOption) (*ArchiveResource, error) {
|
|
if args == nil {
|
|
return nil, errors.New("missing one or more required arguments")
|
|
}
|
|
|
|
if args.Value == nil {
|
|
return nil, errors.New("invalid value for required argument 'Value'")
|
|
}
|
|
opts = internal.PkgResourceDefaultOpts(opts)
|
|
var resource ArchiveResource
|
|
err := ctx.RegisterResource("asset-archive:index:ArchiveResource", name, args, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// GetArchiveResource gets an existing ArchiveResource 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 GetArchiveResource(ctx *pulumi.Context,
|
|
name string, id pulumi.IDInput, state *ArchiveResourceState, opts ...pulumi.ResourceOption) (*ArchiveResource, error) {
|
|
var resource ArchiveResource
|
|
err := ctx.ReadResource("asset-archive:index:ArchiveResource", name, id, state, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// Input properties used for looking up and filtering ArchiveResource resources.
|
|
type archiveResourceState struct {
|
|
}
|
|
|
|
type ArchiveResourceState struct {
|
|
}
|
|
|
|
func (ArchiveResourceState) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*archiveResourceState)(nil)).Elem()
|
|
}
|
|
|
|
type archiveResourceArgs struct {
|
|
Value pulumi.Archive `pulumi:"value"`
|
|
}
|
|
|
|
// The set of arguments for constructing a ArchiveResource resource.
|
|
type ArchiveResourceArgs struct {
|
|
Value pulumi.ArchiveInput
|
|
}
|
|
|
|
func (ArchiveResourceArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*archiveResourceArgs)(nil)).Elem()
|
|
}
|
|
|
|
type ArchiveResourceInput interface {
|
|
pulumi.Input
|
|
|
|
ToArchiveResourceOutput() ArchiveResourceOutput
|
|
ToArchiveResourceOutputWithContext(ctx context.Context) ArchiveResourceOutput
|
|
}
|
|
|
|
func (*ArchiveResource) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**ArchiveResource)(nil)).Elem()
|
|
}
|
|
|
|
func (i *ArchiveResource) ToArchiveResourceOutput() ArchiveResourceOutput {
|
|
return i.ToArchiveResourceOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i *ArchiveResource) ToArchiveResourceOutputWithContext(ctx context.Context) ArchiveResourceOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(ArchiveResourceOutput)
|
|
}
|
|
|
|
type ArchiveResourceOutput struct{ *pulumi.OutputState }
|
|
|
|
func (ArchiveResourceOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**ArchiveResource)(nil)).Elem()
|
|
}
|
|
|
|
func (o ArchiveResourceOutput) ToArchiveResourceOutput() ArchiveResourceOutput {
|
|
return o
|
|
}
|
|
|
|
func (o ArchiveResourceOutput) ToArchiveResourceOutputWithContext(ctx context.Context) ArchiveResourceOutput {
|
|
return o
|
|
}
|
|
|
|
func (o ArchiveResourceOutput) Value() pulumi.ArchiveOutput {
|
|
return o.ApplyT(func(v *ArchiveResource) pulumi.ArchiveOutput { return v.Value }).(pulumi.ArchiveOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterInputType(reflect.TypeOf((*ArchiveResourceInput)(nil)).Elem(), &ArchiveResource{})
|
|
pulumi.RegisterOutputType(ArchiveResourceOutput{})
|
|
}
|