github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/servicediscovery/getHttpNamespace.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 servicediscovery
     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  // ## Example Usage
    15  //
    16  // <!--Start PulumiCodeChooser -->
    17  // ```go
    18  // package main
    19  //
    20  // import (
    21  //
    22  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/servicediscovery"
    23  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    24  //
    25  // )
    26  //
    27  //	func main() {
    28  //		pulumi.Run(func(ctx *pulumi.Context) error {
    29  //			_, err := servicediscovery.LookupHttpNamespace(ctx, &servicediscovery.LookupHttpNamespaceArgs{
    30  //				Name: "development",
    31  //			}, nil)
    32  //			if err != nil {
    33  //				return err
    34  //			}
    35  //			return nil
    36  //		})
    37  //	}
    38  //
    39  // ```
    40  // <!--End PulumiCodeChooser -->
    41  func LookupHttpNamespace(ctx *pulumi.Context, args *LookupHttpNamespaceArgs, opts ...pulumi.InvokeOption) (*LookupHttpNamespaceResult, error) {
    42  	opts = internal.PkgInvokeDefaultOpts(opts)
    43  	var rv LookupHttpNamespaceResult
    44  	err := ctx.Invoke("aws:servicediscovery/getHttpNamespace:getHttpNamespace", args, &rv, opts...)
    45  	if err != nil {
    46  		return nil, err
    47  	}
    48  	return &rv, nil
    49  }
    50  
    51  // A collection of arguments for invoking getHttpNamespace.
    52  type LookupHttpNamespaceArgs struct {
    53  	// Name of the http namespace.
    54  	Name string `pulumi:"name"`
    55  	// Map of tags for the resource.
    56  	Tags map[string]string `pulumi:"tags"`
    57  }
    58  
    59  // A collection of values returned by getHttpNamespace.
    60  type LookupHttpNamespaceResult struct {
    61  	// ARN that Amazon Route 53 assigns to the namespace when you create it.
    62  	Arn string `pulumi:"arn"`
    63  	// Description that you specify for the namespace when you create it.
    64  	Description string `pulumi:"description"`
    65  	// Name of an HTTP namespace.
    66  	HttpName string `pulumi:"httpName"`
    67  	// The provider-assigned unique ID for this managed resource.
    68  	Id   string `pulumi:"id"`
    69  	Name string `pulumi:"name"`
    70  	// Map of tags for the resource.
    71  	Tags map[string]string `pulumi:"tags"`
    72  }
    73  
    74  func LookupHttpNamespaceOutput(ctx *pulumi.Context, args LookupHttpNamespaceOutputArgs, opts ...pulumi.InvokeOption) LookupHttpNamespaceResultOutput {
    75  	return pulumi.ToOutputWithContext(context.Background(), args).
    76  		ApplyT(func(v interface{}) (LookupHttpNamespaceResult, error) {
    77  			args := v.(LookupHttpNamespaceArgs)
    78  			r, err := LookupHttpNamespace(ctx, &args, opts...)
    79  			var s LookupHttpNamespaceResult
    80  			if r != nil {
    81  				s = *r
    82  			}
    83  			return s, err
    84  		}).(LookupHttpNamespaceResultOutput)
    85  }
    86  
    87  // A collection of arguments for invoking getHttpNamespace.
    88  type LookupHttpNamespaceOutputArgs struct {
    89  	// Name of the http namespace.
    90  	Name pulumi.StringInput `pulumi:"name"`
    91  	// Map of tags for the resource.
    92  	Tags pulumi.StringMapInput `pulumi:"tags"`
    93  }
    94  
    95  func (LookupHttpNamespaceOutputArgs) ElementType() reflect.Type {
    96  	return reflect.TypeOf((*LookupHttpNamespaceArgs)(nil)).Elem()
    97  }
    98  
    99  // A collection of values returned by getHttpNamespace.
   100  type LookupHttpNamespaceResultOutput struct{ *pulumi.OutputState }
   101  
   102  func (LookupHttpNamespaceResultOutput) ElementType() reflect.Type {
   103  	return reflect.TypeOf((*LookupHttpNamespaceResult)(nil)).Elem()
   104  }
   105  
   106  func (o LookupHttpNamespaceResultOutput) ToLookupHttpNamespaceResultOutput() LookupHttpNamespaceResultOutput {
   107  	return o
   108  }
   109  
   110  func (o LookupHttpNamespaceResultOutput) ToLookupHttpNamespaceResultOutputWithContext(ctx context.Context) LookupHttpNamespaceResultOutput {
   111  	return o
   112  }
   113  
   114  // ARN that Amazon Route 53 assigns to the namespace when you create it.
   115  func (o LookupHttpNamespaceResultOutput) Arn() pulumi.StringOutput {
   116  	return o.ApplyT(func(v LookupHttpNamespaceResult) string { return v.Arn }).(pulumi.StringOutput)
   117  }
   118  
   119  // Description that you specify for the namespace when you create it.
   120  func (o LookupHttpNamespaceResultOutput) Description() pulumi.StringOutput {
   121  	return o.ApplyT(func(v LookupHttpNamespaceResult) string { return v.Description }).(pulumi.StringOutput)
   122  }
   123  
   124  // Name of an HTTP namespace.
   125  func (o LookupHttpNamespaceResultOutput) HttpName() pulumi.StringOutput {
   126  	return o.ApplyT(func(v LookupHttpNamespaceResult) string { return v.HttpName }).(pulumi.StringOutput)
   127  }
   128  
   129  // The provider-assigned unique ID for this managed resource.
   130  func (o LookupHttpNamespaceResultOutput) Id() pulumi.StringOutput {
   131  	return o.ApplyT(func(v LookupHttpNamespaceResult) string { return v.Id }).(pulumi.StringOutput)
   132  }
   133  
   134  func (o LookupHttpNamespaceResultOutput) Name() pulumi.StringOutput {
   135  	return o.ApplyT(func(v LookupHttpNamespaceResult) string { return v.Name }).(pulumi.StringOutput)
   136  }
   137  
   138  // Map of tags for the resource.
   139  func (o LookupHttpNamespaceResultOutput) Tags() pulumi.StringMapOutput {
   140  	return o.ApplyT(func(v LookupHttpNamespaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   141  }
   142  
   143  func init() {
   144  	pulumi.RegisterOutputType(LookupHttpNamespaceResultOutput{})
   145  }