github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/outposts/getOutposts.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package outposts
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // Provides details about multiple Outposts.
    15  //
    16  // ## Example Usage
    17  //
    18  // <!--Start PulumiCodeChooser -->
    19  // ```go
    20  // package main
    21  //
    22  // import (
    23  //
    24  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/outposts"
    25  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    26  //
    27  // )
    28  //
    29  //	func main() {
    30  //		pulumi.Run(func(ctx *pulumi.Context) error {
    31  //			_, err := outposts.GetOutposts(ctx, &outposts.GetOutpostsArgs{
    32  //				SiteId: pulumi.StringRef(id),
    33  //			}, nil)
    34  //			if err != nil {
    35  //				return err
    36  //			}
    37  //			return nil
    38  //		})
    39  //	}
    40  //
    41  // ```
    42  // <!--End PulumiCodeChooser -->
    43  func GetOutposts(ctx *pulumi.Context, args *GetOutpostsArgs, opts ...pulumi.InvokeOption) (*GetOutpostsResult, error) {
    44  	opts = internal.PkgInvokeDefaultOpts(opts)
    45  	var rv GetOutpostsResult
    46  	err := ctx.Invoke("aws:outposts/getOutposts:getOutposts", args, &rv, opts...)
    47  	if err != nil {
    48  		return nil, err
    49  	}
    50  	return &rv, nil
    51  }
    52  
    53  // A collection of arguments for invoking getOutposts.
    54  type GetOutpostsArgs struct {
    55  	// Availability Zone name.
    56  	AvailabilityZone *string `pulumi:"availabilityZone"`
    57  	// Availability Zone identifier.
    58  	AvailabilityZoneId *string `pulumi:"availabilityZoneId"`
    59  	// AWS Account identifier of the Outpost owner.
    60  	OwnerId *string `pulumi:"ownerId"`
    61  	// Site identifier.
    62  	SiteId *string `pulumi:"siteId"`
    63  }
    64  
    65  // A collection of values returned by getOutposts.
    66  type GetOutpostsResult struct {
    67  	// Set of Amazon Resource Names (ARNs).
    68  	Arns               []string `pulumi:"arns"`
    69  	AvailabilityZone   string   `pulumi:"availabilityZone"`
    70  	AvailabilityZoneId string   `pulumi:"availabilityZoneId"`
    71  	// The provider-assigned unique ID for this managed resource.
    72  	Id string `pulumi:"id"`
    73  	// Set of identifiers.
    74  	Ids     []string `pulumi:"ids"`
    75  	OwnerId string   `pulumi:"ownerId"`
    76  	SiteId  string   `pulumi:"siteId"`
    77  }
    78  
    79  func GetOutpostsOutput(ctx *pulumi.Context, args GetOutpostsOutputArgs, opts ...pulumi.InvokeOption) GetOutpostsResultOutput {
    80  	return pulumi.ToOutputWithContext(context.Background(), args).
    81  		ApplyT(func(v interface{}) (GetOutpostsResult, error) {
    82  			args := v.(GetOutpostsArgs)
    83  			r, err := GetOutposts(ctx, &args, opts...)
    84  			var s GetOutpostsResult
    85  			if r != nil {
    86  				s = *r
    87  			}
    88  			return s, err
    89  		}).(GetOutpostsResultOutput)
    90  }
    91  
    92  // A collection of arguments for invoking getOutposts.
    93  type GetOutpostsOutputArgs struct {
    94  	// Availability Zone name.
    95  	AvailabilityZone pulumi.StringPtrInput `pulumi:"availabilityZone"`
    96  	// Availability Zone identifier.
    97  	AvailabilityZoneId pulumi.StringPtrInput `pulumi:"availabilityZoneId"`
    98  	// AWS Account identifier of the Outpost owner.
    99  	OwnerId pulumi.StringPtrInput `pulumi:"ownerId"`
   100  	// Site identifier.
   101  	SiteId pulumi.StringPtrInput `pulumi:"siteId"`
   102  }
   103  
   104  func (GetOutpostsOutputArgs) ElementType() reflect.Type {
   105  	return reflect.TypeOf((*GetOutpostsArgs)(nil)).Elem()
   106  }
   107  
   108  // A collection of values returned by getOutposts.
   109  type GetOutpostsResultOutput struct{ *pulumi.OutputState }
   110  
   111  func (GetOutpostsResultOutput) ElementType() reflect.Type {
   112  	return reflect.TypeOf((*GetOutpostsResult)(nil)).Elem()
   113  }
   114  
   115  func (o GetOutpostsResultOutput) ToGetOutpostsResultOutput() GetOutpostsResultOutput {
   116  	return o
   117  }
   118  
   119  func (o GetOutpostsResultOutput) ToGetOutpostsResultOutputWithContext(ctx context.Context) GetOutpostsResultOutput {
   120  	return o
   121  }
   122  
   123  // Set of Amazon Resource Names (ARNs).
   124  func (o GetOutpostsResultOutput) Arns() pulumi.StringArrayOutput {
   125  	return o.ApplyT(func(v GetOutpostsResult) []string { return v.Arns }).(pulumi.StringArrayOutput)
   126  }
   127  
   128  func (o GetOutpostsResultOutput) AvailabilityZone() pulumi.StringOutput {
   129  	return o.ApplyT(func(v GetOutpostsResult) string { return v.AvailabilityZone }).(pulumi.StringOutput)
   130  }
   131  
   132  func (o GetOutpostsResultOutput) AvailabilityZoneId() pulumi.StringOutput {
   133  	return o.ApplyT(func(v GetOutpostsResult) string { return v.AvailabilityZoneId }).(pulumi.StringOutput)
   134  }
   135  
   136  // The provider-assigned unique ID for this managed resource.
   137  func (o GetOutpostsResultOutput) Id() pulumi.StringOutput {
   138  	return o.ApplyT(func(v GetOutpostsResult) string { return v.Id }).(pulumi.StringOutput)
   139  }
   140  
   141  // Set of identifiers.
   142  func (o GetOutpostsResultOutput) Ids() pulumi.StringArrayOutput {
   143  	return o.ApplyT(func(v GetOutpostsResult) []string { return v.Ids }).(pulumi.StringArrayOutput)
   144  }
   145  
   146  func (o GetOutpostsResultOutput) OwnerId() pulumi.StringOutput {
   147  	return o.ApplyT(func(v GetOutpostsResult) string { return v.OwnerId }).(pulumi.StringOutput)
   148  }
   149  
   150  func (o GetOutpostsResultOutput) SiteId() pulumi.StringOutput {
   151  	return o.ApplyT(func(v GetOutpostsResult) string { return v.SiteId }).(pulumi.StringOutput)
   152  }
   153  
   154  func init() {
   155  	pulumi.RegisterOutputType(GetOutpostsResultOutput{})
   156  }