github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/connect/getHoursOfOperation.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 connect
     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 a specific Amazon Connect Hours of Operation.
    15  //
    16  // ## Example Usage
    17  //
    18  // By `name`
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect"
    27  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    28  //
    29  // )
    30  //
    31  //	func main() {
    32  //		pulumi.Run(func(ctx *pulumi.Context) error {
    33  //			_, err := connect.LookupHoursOfOperation(ctx, &connect.LookupHoursOfOperationArgs{
    34  //				InstanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
    35  //				Name:       pulumi.StringRef("Test"),
    36  //			}, nil)
    37  //			if err != nil {
    38  //				return err
    39  //			}
    40  //			return nil
    41  //		})
    42  //	}
    43  //
    44  // ```
    45  // <!--End PulumiCodeChooser -->
    46  //
    47  // By `hoursOfOperationId`
    48  //
    49  // <!--Start PulumiCodeChooser -->
    50  // ```go
    51  // package main
    52  //
    53  // import (
    54  //
    55  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect"
    56  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    57  //
    58  // )
    59  //
    60  //	func main() {
    61  //		pulumi.Run(func(ctx *pulumi.Context) error {
    62  //			_, err := connect.LookupHoursOfOperation(ctx, &connect.LookupHoursOfOperationArgs{
    63  //				InstanceId:         "aaaaaaaa-bbbb-cccc-dddd-111111111111",
    64  //				HoursOfOperationId: pulumi.StringRef("cccccccc-bbbb-cccc-dddd-111111111111"),
    65  //			}, nil)
    66  //			if err != nil {
    67  //				return err
    68  //			}
    69  //			return nil
    70  //		})
    71  //	}
    72  //
    73  // ```
    74  // <!--End PulumiCodeChooser -->
    75  func LookupHoursOfOperation(ctx *pulumi.Context, args *LookupHoursOfOperationArgs, opts ...pulumi.InvokeOption) (*LookupHoursOfOperationResult, error) {
    76  	opts = internal.PkgInvokeDefaultOpts(opts)
    77  	var rv LookupHoursOfOperationResult
    78  	err := ctx.Invoke("aws:connect/getHoursOfOperation:getHoursOfOperation", args, &rv, opts...)
    79  	if err != nil {
    80  		return nil, err
    81  	}
    82  	return &rv, nil
    83  }
    84  
    85  // A collection of arguments for invoking getHoursOfOperation.
    86  type LookupHoursOfOperationArgs struct {
    87  	// Returns information on a specific Hours of Operation by hours of operation id
    88  	HoursOfOperationId *string `pulumi:"hoursOfOperationId"`
    89  	// Reference to the hosting Amazon Connect Instance
    90  	InstanceId string `pulumi:"instanceId"`
    91  	// Returns information on a specific Hours of Operation by name
    92  	Name *string `pulumi:"name"`
    93  	// Map of tags to assign to the Hours of Operation.
    94  	Tags map[string]string `pulumi:"tags"`
    95  }
    96  
    97  // A collection of values returned by getHoursOfOperation.
    98  type LookupHoursOfOperationResult struct {
    99  	// ARN of the Hours of Operation.
   100  	Arn string `pulumi:"arn"`
   101  	// Configuration information for the hours of operation: day, start time, and end time . Config blocks are documented below. Config blocks are documented below.
   102  	Configs []GetHoursOfOperationConfig `pulumi:"configs"`
   103  	// Description of the Hours of Operation.
   104  	Description string `pulumi:"description"`
   105  	// The identifier for the hours of operation.
   106  	HoursOfOperationId string `pulumi:"hoursOfOperationId"`
   107  	// The provider-assigned unique ID for this managed resource.
   108  	Id string `pulumi:"id"`
   109  	// Identifier of the hosting Amazon Connect Instance.
   110  	InstanceId string `pulumi:"instanceId"`
   111  	// Name of the Hours of Operation.
   112  	Name string `pulumi:"name"`
   113  	// Map of tags to assign to the Hours of Operation.
   114  	Tags map[string]string `pulumi:"tags"`
   115  	// Time zone of the Hours of Operation.
   116  	TimeZone string `pulumi:"timeZone"`
   117  }
   118  
   119  func LookupHoursOfOperationOutput(ctx *pulumi.Context, args LookupHoursOfOperationOutputArgs, opts ...pulumi.InvokeOption) LookupHoursOfOperationResultOutput {
   120  	return pulumi.ToOutputWithContext(context.Background(), args).
   121  		ApplyT(func(v interface{}) (LookupHoursOfOperationResult, error) {
   122  			args := v.(LookupHoursOfOperationArgs)
   123  			r, err := LookupHoursOfOperation(ctx, &args, opts...)
   124  			var s LookupHoursOfOperationResult
   125  			if r != nil {
   126  				s = *r
   127  			}
   128  			return s, err
   129  		}).(LookupHoursOfOperationResultOutput)
   130  }
   131  
   132  // A collection of arguments for invoking getHoursOfOperation.
   133  type LookupHoursOfOperationOutputArgs struct {
   134  	// Returns information on a specific Hours of Operation by hours of operation id
   135  	HoursOfOperationId pulumi.StringPtrInput `pulumi:"hoursOfOperationId"`
   136  	// Reference to the hosting Amazon Connect Instance
   137  	InstanceId pulumi.StringInput `pulumi:"instanceId"`
   138  	// Returns information on a specific Hours of Operation by name
   139  	Name pulumi.StringPtrInput `pulumi:"name"`
   140  	// Map of tags to assign to the Hours of Operation.
   141  	Tags pulumi.StringMapInput `pulumi:"tags"`
   142  }
   143  
   144  func (LookupHoursOfOperationOutputArgs) ElementType() reflect.Type {
   145  	return reflect.TypeOf((*LookupHoursOfOperationArgs)(nil)).Elem()
   146  }
   147  
   148  // A collection of values returned by getHoursOfOperation.
   149  type LookupHoursOfOperationResultOutput struct{ *pulumi.OutputState }
   150  
   151  func (LookupHoursOfOperationResultOutput) ElementType() reflect.Type {
   152  	return reflect.TypeOf((*LookupHoursOfOperationResult)(nil)).Elem()
   153  }
   154  
   155  func (o LookupHoursOfOperationResultOutput) ToLookupHoursOfOperationResultOutput() LookupHoursOfOperationResultOutput {
   156  	return o
   157  }
   158  
   159  func (o LookupHoursOfOperationResultOutput) ToLookupHoursOfOperationResultOutputWithContext(ctx context.Context) LookupHoursOfOperationResultOutput {
   160  	return o
   161  }
   162  
   163  // ARN of the Hours of Operation.
   164  func (o LookupHoursOfOperationResultOutput) Arn() pulumi.StringOutput {
   165  	return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.Arn }).(pulumi.StringOutput)
   166  }
   167  
   168  // Configuration information for the hours of operation: day, start time, and end time . Config blocks are documented below. Config blocks are documented below.
   169  func (o LookupHoursOfOperationResultOutput) Configs() GetHoursOfOperationConfigArrayOutput {
   170  	return o.ApplyT(func(v LookupHoursOfOperationResult) []GetHoursOfOperationConfig { return v.Configs }).(GetHoursOfOperationConfigArrayOutput)
   171  }
   172  
   173  // Description of the Hours of Operation.
   174  func (o LookupHoursOfOperationResultOutput) Description() pulumi.StringOutput {
   175  	return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.Description }).(pulumi.StringOutput)
   176  }
   177  
   178  // The identifier for the hours of operation.
   179  func (o LookupHoursOfOperationResultOutput) HoursOfOperationId() pulumi.StringOutput {
   180  	return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.HoursOfOperationId }).(pulumi.StringOutput)
   181  }
   182  
   183  // The provider-assigned unique ID for this managed resource.
   184  func (o LookupHoursOfOperationResultOutput) Id() pulumi.StringOutput {
   185  	return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.Id }).(pulumi.StringOutput)
   186  }
   187  
   188  // Identifier of the hosting Amazon Connect Instance.
   189  func (o LookupHoursOfOperationResultOutput) InstanceId() pulumi.StringOutput {
   190  	return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.InstanceId }).(pulumi.StringOutput)
   191  }
   192  
   193  // Name of the Hours of Operation.
   194  func (o LookupHoursOfOperationResultOutput) Name() pulumi.StringOutput {
   195  	return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.Name }).(pulumi.StringOutput)
   196  }
   197  
   198  // Map of tags to assign to the Hours of Operation.
   199  func (o LookupHoursOfOperationResultOutput) Tags() pulumi.StringMapOutput {
   200  	return o.ApplyT(func(v LookupHoursOfOperationResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   201  }
   202  
   203  // Time zone of the Hours of Operation.
   204  func (o LookupHoursOfOperationResultOutput) TimeZone() pulumi.StringOutput {
   205  	return o.ApplyT(func(v LookupHoursOfOperationResult) string { return v.TimeZone }).(pulumi.StringOutput)
   206  }
   207  
   208  func init() {
   209  	pulumi.RegisterOutputType(LookupHoursOfOperationResultOutput{})
   210  }