Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.servicecatalog.getPortfolios
Explore with Pulumi AI
This data source provides Service Catalog Portfolio available to the user.What is Portfolio
NOTE: Available in 1.204.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const default = alicloud.servicecatalog.getPortfolios({
ids: [defaultAlicloudServiceCatalogPortfolio.id],
nameRegex: defaultAlicloudServiceCatalogPortfolio.name,
});
export const alicloudServiceCatalogPortfolioExampleId = _default.then(_default => _default.portfolios?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.servicecatalog.get_portfolios(ids=[default_alicloud_service_catalog_portfolio["id"]],
name_regex=default_alicloud_service_catalog_portfolio["name"])
pulumi.export("alicloudServiceCatalogPortfolioExampleId", default.portfolios[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/servicecatalog"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := servicecatalog.GetPortfolios(ctx, &servicecatalog.GetPortfoliosArgs{
Ids: interface{}{
defaultAlicloudServiceCatalogPortfolio.Id,
},
NameRegex: pulumi.StringRef(defaultAlicloudServiceCatalogPortfolio.Name),
}, nil);
if err != nil {
return err
}
ctx.Export("alicloudServiceCatalogPortfolioExampleId", _default.Portfolios[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.ServiceCatalog.GetPortfolios.Invoke(new()
{
Ids = new[]
{
defaultAlicloudServiceCatalogPortfolio.Id,
},
NameRegex = defaultAlicloudServiceCatalogPortfolio.Name,
});
return new Dictionary<string, object?>
{
["alicloudServiceCatalogPortfolioExampleId"] = @default.Apply(@default => @default.Apply(getPortfoliosResult => getPortfoliosResult.Portfolios[0]?.Id)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.servicecatalog.ServicecatalogFunctions;
import com.pulumi.alicloud.servicecatalog.inputs.GetPortfoliosArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var default = ServicecatalogFunctions.getPortfolios(GetPortfoliosArgs.builder()
.ids(defaultAlicloudServiceCatalogPortfolio.id())
.nameRegex(defaultAlicloudServiceCatalogPortfolio.name())
.build());
ctx.export("alicloudServiceCatalogPortfolioExampleId", default_.portfolios()[0].id());
}
}
variables:
default:
fn::invoke:
Function: alicloud:servicecatalog:getPortfolios
Arguments:
ids:
- ${defaultAlicloudServiceCatalogPortfolio.id}
nameRegex: ${defaultAlicloudServiceCatalogPortfolio.name}
outputs:
alicloudServiceCatalogPortfolioExampleId: ${default.portfolios[0].id}
Using getPortfolios
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getPortfolios(args: GetPortfoliosArgs, opts?: InvokeOptions): Promise<GetPortfoliosResult>
function getPortfoliosOutput(args: GetPortfoliosOutputArgs, opts?: InvokeOptions): Output<GetPortfoliosResult>
def get_portfolios(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
page_number: Optional[int] = None,
page_size: Optional[int] = None,
product_id: Optional[str] = None,
scope: Optional[str] = None,
sort_by: Optional[str] = None,
sort_order: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPortfoliosResult
def get_portfolios_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
page_number: Optional[pulumi.Input[int]] = None,
page_size: Optional[pulumi.Input[int]] = None,
product_id: Optional[pulumi.Input[str]] = None,
scope: Optional[pulumi.Input[str]] = None,
sort_by: Optional[pulumi.Input[str]] = None,
sort_order: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPortfoliosResult]
func GetPortfolios(ctx *Context, args *GetPortfoliosArgs, opts ...InvokeOption) (*GetPortfoliosResult, error)
func GetPortfoliosOutput(ctx *Context, args *GetPortfoliosOutputArgs, opts ...InvokeOption) GetPortfoliosResultOutput
> Note: This function is named GetPortfolios
in the Go SDK.
public static class GetPortfolios
{
public static Task<GetPortfoliosResult> InvokeAsync(GetPortfoliosArgs args, InvokeOptions? opts = null)
public static Output<GetPortfoliosResult> Invoke(GetPortfoliosInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPortfoliosResult> getPortfolios(GetPortfoliosArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:servicecatalog/getPortfolios:getPortfolios
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Portfolio IDs.
- Name
Regex string - A regex string to filter results by Group Metric Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int - Product
Id string - The ID of the product.
- Scope string
- The query scope. Valid values:
Local
(default),Import
,All
. - Sort
By string - The field that is used to sort the queried data. The value is fixed as CreateTime, which specifies the creation time of product portfolios.
- Sort
Order string - The order in which you want to sort the queried data. Valid values:
Asc
,Desc
.
- Ids []string
- A list of Portfolio IDs.
- Name
Regex string - A regex string to filter results by Group Metric Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int - Product
Id string - The ID of the product.
- Scope string
- The query scope. Valid values:
Local
(default),Import
,All
. - Sort
By string - The field that is used to sort the queried data. The value is fixed as CreateTime, which specifies the creation time of product portfolios.
- Sort
Order string - The order in which you want to sort the queried data. Valid values:
Asc
,Desc
.
- ids List<String>
- A list of Portfolio IDs.
- name
Regex String - A regex string to filter results by Group Metric Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Integer - page
Size Integer - product
Id String - The ID of the product.
- scope String
- The query scope. Valid values:
Local
(default),Import
,All
. - sort
By String - The field that is used to sort the queried data. The value is fixed as CreateTime, which specifies the creation time of product portfolios.
- sort
Order String - The order in which you want to sort the queried data. Valid values:
Asc
,Desc
.
- ids string[]
- A list of Portfolio IDs.
- name
Regex string - A regex string to filter results by Group Metric Rule name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - page
Number number - page
Size number - product
Id string - The ID of the product.
- scope string
- The query scope. Valid values:
Local
(default),Import
,All
. - sort
By string - The field that is used to sort the queried data. The value is fixed as CreateTime, which specifies the creation time of product portfolios.
- sort
Order string - The order in which you want to sort the queried data. Valid values:
Asc
,Desc
.
- ids Sequence[str]
- A list of Portfolio IDs.
- name_
regex str - A regex string to filter results by Group Metric Rule name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - page_
number int - page_
size int - product_
id str - The ID of the product.
- scope str
- The query scope. Valid values:
Local
(default),Import
,All
. - sort_
by str - The field that is used to sort the queried data. The value is fixed as CreateTime, which specifies the creation time of product portfolios.
- sort_
order str - The order in which you want to sort the queried data. Valid values:
Asc
,Desc
.
- ids List<String>
- A list of Portfolio IDs.
- name
Regex String - A regex string to filter results by Group Metric Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Number - page
Size Number - product
Id String - The ID of the product.
- scope String
- The query scope. Valid values:
Local
(default),Import
,All
. - sort
By String - The field that is used to sort the queried data. The value is fixed as CreateTime, which specifies the creation time of product portfolios.
- sort
Order String - The order in which you want to sort the queried data. Valid values:
Asc
,Desc
.
getPortfolios Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of Portfolio IDs.
- Names List<string>
- A list of name of Portfolios.
- Portfolios
List<Pulumi.
Ali Cloud. Service Catalog. Outputs. Get Portfolios Portfolio> - A list of Portfolio Entries. Each element contains the following attributes:
- Name
Regex string - Output
File string - Page
Number int - Page
Size int - Product
Id string - Scope string
- Sort
By string - Sort
Order string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of Portfolio IDs.
- Names []string
- A list of name of Portfolios.
- Portfolios
[]Get
Portfolios Portfolio - A list of Portfolio Entries. Each element contains the following attributes:
- Name
Regex string - Output
File string - Page
Number int - Page
Size int - Product
Id string - Scope string
- Sort
By string - Sort
Order string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Portfolio IDs.
- names List<String>
- A list of name of Portfolios.
- portfolios
List<Get
Portfolios Portfolio> - A list of Portfolio Entries. Each element contains the following attributes:
- name
Regex String - output
File String - page
Number Integer - page
Size Integer - product
Id String - scope String
- sort
By String - sort
Order String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of Portfolio IDs.
- names string[]
- A list of name of Portfolios.
- portfolios
Get
Portfolios Portfolio[] - A list of Portfolio Entries. Each element contains the following attributes:
- name
Regex string - output
File string - page
Number number - page
Size number - product
Id string - scope string
- sort
By string - sort
Order string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of Portfolio IDs.
- names Sequence[str]
- A list of name of Portfolios.
- portfolios
Sequence[Get
Portfolios Portfolio] - A list of Portfolio Entries. Each element contains the following attributes:
- name_
regex str - output_
file str - page_
number int - page_
size int - product_
id str - scope str
- sort_
by str - sort_
order str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Portfolio IDs.
- names List<String>
- A list of name of Portfolios.
- portfolios List<Property Map>
- A list of Portfolio Entries. Each element contains the following attributes:
- name
Regex String - output
File String - page
Number Number - page
Size Number - product
Id String - scope String
- sort
By String - sort
Order String
Supporting Types
GetPortfoliosPortfolio
- Create
Time string - The creation time of the portfolio
- Description string
- The description of the portfolio
- Id string
- The ID of the portfolio
- Portfolio
Arn string - The ARN of the portfolio
- Portfolio
Id string - The ID of the portfolio
- Portfolio
Name string - The name of the portfolio
- Provider
Name string - The provider name of the portfolio
- Create
Time string - The creation time of the portfolio
- Description string
- The description of the portfolio
- Id string
- The ID of the portfolio
- Portfolio
Arn string - The ARN of the portfolio
- Portfolio
Id string - The ID of the portfolio
- Portfolio
Name string - The name of the portfolio
- Provider
Name string - The provider name of the portfolio
- create
Time String - The creation time of the portfolio
- description String
- The description of the portfolio
- id String
- The ID of the portfolio
- portfolio
Arn String - The ARN of the portfolio
- portfolio
Id String - The ID of the portfolio
- portfolio
Name String - The name of the portfolio
- provider
Name String - The provider name of the portfolio
- create
Time string - The creation time of the portfolio
- description string
- The description of the portfolio
- id string
- The ID of the portfolio
- portfolio
Arn string - The ARN of the portfolio
- portfolio
Id string - The ID of the portfolio
- portfolio
Name string - The name of the portfolio
- provider
Name string - The provider name of the portfolio
- create_
time str - The creation time of the portfolio
- description str
- The description of the portfolio
- id str
- The ID of the portfolio
- portfolio_
arn str - The ARN of the portfolio
- portfolio_
id str - The ID of the portfolio
- portfolio_
name str - The name of the portfolio
- provider_
name str - The provider name of the portfolio
- create
Time String - The creation time of the portfolio
- description String
- The description of the portfolio
- id String
- The ID of the portfolio
- portfolio
Arn String - The ARN of the portfolio
- portfolio
Id String - The ID of the portfolio
- portfolio
Name String - The name of the portfolio
- provider
Name String - The provider name of the portfolio
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.