github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/servicecatalog/getPortfolioConstraints.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 servicecatalog 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 information on Service Catalog Portfolio Constraints. 15 // 16 // ## Example Usage 17 // 18 // ### Basic Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/servicecatalog" 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 := servicecatalog.GetPortfolioConstraints(ctx, &servicecatalog.GetPortfolioConstraintsArgs{ 34 // PortfolioId: "port-3lli3b3an", 35 // }, nil) 36 // if err != nil { 37 // return err 38 // } 39 // return nil 40 // }) 41 // } 42 // 43 // ``` 44 // <!--End PulumiCodeChooser --> 45 func GetPortfolioConstraints(ctx *pulumi.Context, args *GetPortfolioConstraintsArgs, opts ...pulumi.InvokeOption) (*GetPortfolioConstraintsResult, error) { 46 opts = internal.PkgInvokeDefaultOpts(opts) 47 var rv GetPortfolioConstraintsResult 48 err := ctx.Invoke("aws:servicecatalog/getPortfolioConstraints:getPortfolioConstraints", args, &rv, opts...) 49 if err != nil { 50 return nil, err 51 } 52 return &rv, nil 53 } 54 55 // A collection of arguments for invoking getPortfolioConstraints. 56 type GetPortfolioConstraintsArgs struct { 57 // Language code. Valid values: `en` (English), `jp` (Japanese), `zh` (Chinese). Default value is `en`. 58 AcceptLanguage *string `pulumi:"acceptLanguage"` 59 // Portfolio identifier. 60 // 61 // The following arguments are optional: 62 PortfolioId string `pulumi:"portfolioId"` 63 // Product identifier. 64 ProductId *string `pulumi:"productId"` 65 } 66 67 // A collection of values returned by getPortfolioConstraints. 68 type GetPortfolioConstraintsResult struct { 69 AcceptLanguage *string `pulumi:"acceptLanguage"` 70 // List of information about the constraints. See details below. 71 Details []GetPortfolioConstraintsDetail `pulumi:"details"` 72 // The provider-assigned unique ID for this managed resource. 73 Id string `pulumi:"id"` 74 // Identifier of the portfolio the product resides in. The constraint applies only to the instance of the product that lives within this portfolio. 75 PortfolioId string `pulumi:"portfolioId"` 76 // Identifier of the product the constraint applies to. A constraint applies to a specific instance of a product within a certain portfolio. 77 ProductId *string `pulumi:"productId"` 78 } 79 80 func GetPortfolioConstraintsOutput(ctx *pulumi.Context, args GetPortfolioConstraintsOutputArgs, opts ...pulumi.InvokeOption) GetPortfolioConstraintsResultOutput { 81 return pulumi.ToOutputWithContext(context.Background(), args). 82 ApplyT(func(v interface{}) (GetPortfolioConstraintsResult, error) { 83 args := v.(GetPortfolioConstraintsArgs) 84 r, err := GetPortfolioConstraints(ctx, &args, opts...) 85 var s GetPortfolioConstraintsResult 86 if r != nil { 87 s = *r 88 } 89 return s, err 90 }).(GetPortfolioConstraintsResultOutput) 91 } 92 93 // A collection of arguments for invoking getPortfolioConstraints. 94 type GetPortfolioConstraintsOutputArgs struct { 95 // Language code. Valid values: `en` (English), `jp` (Japanese), `zh` (Chinese). Default value is `en`. 96 AcceptLanguage pulumi.StringPtrInput `pulumi:"acceptLanguage"` 97 // Portfolio identifier. 98 // 99 // The following arguments are optional: 100 PortfolioId pulumi.StringInput `pulumi:"portfolioId"` 101 // Product identifier. 102 ProductId pulumi.StringPtrInput `pulumi:"productId"` 103 } 104 105 func (GetPortfolioConstraintsOutputArgs) ElementType() reflect.Type { 106 return reflect.TypeOf((*GetPortfolioConstraintsArgs)(nil)).Elem() 107 } 108 109 // A collection of values returned by getPortfolioConstraints. 110 type GetPortfolioConstraintsResultOutput struct{ *pulumi.OutputState } 111 112 func (GetPortfolioConstraintsResultOutput) ElementType() reflect.Type { 113 return reflect.TypeOf((*GetPortfolioConstraintsResult)(nil)).Elem() 114 } 115 116 func (o GetPortfolioConstraintsResultOutput) ToGetPortfolioConstraintsResultOutput() GetPortfolioConstraintsResultOutput { 117 return o 118 } 119 120 func (o GetPortfolioConstraintsResultOutput) ToGetPortfolioConstraintsResultOutputWithContext(ctx context.Context) GetPortfolioConstraintsResultOutput { 121 return o 122 } 123 124 func (o GetPortfolioConstraintsResultOutput) AcceptLanguage() pulumi.StringPtrOutput { 125 return o.ApplyT(func(v GetPortfolioConstraintsResult) *string { return v.AcceptLanguage }).(pulumi.StringPtrOutput) 126 } 127 128 // List of information about the constraints. See details below. 129 func (o GetPortfolioConstraintsResultOutput) Details() GetPortfolioConstraintsDetailArrayOutput { 130 return o.ApplyT(func(v GetPortfolioConstraintsResult) []GetPortfolioConstraintsDetail { return v.Details }).(GetPortfolioConstraintsDetailArrayOutput) 131 } 132 133 // The provider-assigned unique ID for this managed resource. 134 func (o GetPortfolioConstraintsResultOutput) Id() pulumi.StringOutput { 135 return o.ApplyT(func(v GetPortfolioConstraintsResult) string { return v.Id }).(pulumi.StringOutput) 136 } 137 138 // Identifier of the portfolio the product resides in. The constraint applies only to the instance of the product that lives within this portfolio. 139 func (o GetPortfolioConstraintsResultOutput) PortfolioId() pulumi.StringOutput { 140 return o.ApplyT(func(v GetPortfolioConstraintsResult) string { return v.PortfolioId }).(pulumi.StringOutput) 141 } 142 143 // Identifier of the product the constraint applies to. A constraint applies to a specific instance of a product within a certain portfolio. 144 func (o GetPortfolioConstraintsResultOutput) ProductId() pulumi.StringPtrOutput { 145 return o.ApplyT(func(v GetPortfolioConstraintsResult) *string { return v.ProductId }).(pulumi.StringPtrOutput) 146 } 147 148 func init() { 149 pulumi.RegisterOutputType(GetPortfolioConstraintsResultOutput{}) 150 }