Alibaba Cloud
getNamespaces
This data source provides the Sae Namespaces of the current Alibaba Cloud user.
NOTE: Available in v1.129.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var nameRegex = Output.Create(AliCloud.Sae.GetNamespaces.InvokeAsync(new AliCloud.Sae.GetNamespacesArgs
{
NameRegex = "^my-Namespace",
}));
this.SaeNamespaceId = nameRegex.Apply(nameRegex => nameRegex.Namespaces?[0]?.Id);
}
[Output("saeNamespaceId")]
public Output<string> SaeNamespaceId { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sae"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
nameRegex, err := sae.GetNamespaces(ctx, &sae.GetNamespacesArgs{
NameRegex: pulumi.StringRef("^my-Namespace"),
}, nil)
if err != nil {
return err
}
ctx.Export("saeNamespaceId", nameRegex.Namespaces[0].Id)
return nil
})
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
name_regex = alicloud.sae.get_namespaces(name_regex="^my-Namespace")
pulumi.export("saeNamespaceId", name_regex.namespaces[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const nameRegex = alicloud.sae.getNamespaces({
nameRegex: "^my-Namespace",
});
export const saeNamespaceId = nameRegex.then(nameRegex => nameRegex.namespaces?[0]?.id);
Coming soon!
Using getNamespaces
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 getNamespaces(args: GetNamespacesArgs, opts?: InvokeOptions): Promise<GetNamespacesResult>
function getNamespacesOutput(args: GetNamespacesOutputArgs, opts?: InvokeOptions): Output<GetNamespacesResult>
def get_namespaces(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNamespacesResult
def get_namespaces_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNamespacesResult]
func GetNamespaces(ctx *Context, args *GetNamespacesArgs, opts ...InvokeOption) (*GetNamespacesResult, error)
func GetNamespacesOutput(ctx *Context, args *GetNamespacesOutputArgs, opts ...InvokeOption) GetNamespacesResultOutput
> Note: This function is named GetNamespaces
in the Go SDK.
public static class GetNamespaces
{
public static Task<GetNamespacesResult> InvokeAsync(GetNamespacesArgs args, InvokeOptions? opts = null)
public static Output<GetNamespacesResult> Invoke(GetNamespacesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNamespacesResult> getNamespaces(GetNamespacesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: alicloud:sae/getNamespaces:getNamespaces
Arguments:
# Arguments dictionary
The following arguments are supported:
- Ids List<string>
A list of Namespace IDs.
- Name
Regex string A regex string to filter results by Namespace name.
- Output
File string
- Ids []string
A list of Namespace IDs.
- Name
Regex string A regex string to filter results by Namespace name.
- Output
File string
- ids List<String>
A list of Namespace IDs.
- name
Regex String A regex string to filter results by Namespace name.
- output
File String
- ids string[]
A list of Namespace IDs.
- name
Regex string A regex string to filter results by Namespace name.
- output
File string
- ids Sequence[str]
A list of Namespace IDs.
- name_
regex str A regex string to filter results by Namespace name.
- output_
file str
- ids List<String>
A list of Namespace IDs.
- name
Regex String A regex string to filter results by Namespace name.
- output
File String
getNamespaces Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Namespaces
List<Pulumi.
Ali Cloud. Sae. Outputs. Get Namespaces Namespace> - Name
Regex string - Output
File string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Namespaces
[]Get
Namespaces Namespace - Name
Regex string - Output
File string
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- namespaces
List<Get
Namespaces Namespace> - name
Regex String - output
File String
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- namespaces
Get
Namespaces Namespace[] - name
Regex string - output
File string
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- namespaces
Sequence[Get
Namespaces Namespace] - name_
regex str - output_
file str
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- namespaces List<Property Map>
- name
Regex String - output
File String
Supporting Types
GetNamespacesNamespace
- Id string
The ID of the Namespace.
- Namespace
Description string The Description of Namespace.
- Namespace
Id string The Id of Namespace.It can contain 2 to 32 characters.The value is in format {RegionId}:{namespace}.
- Namespace
Name string The Name of Namespace.
- Id string
The ID of the Namespace.
- Namespace
Description string The Description of Namespace.
- Namespace
Id string The Id of Namespace.It can contain 2 to 32 characters.The value is in format {RegionId}:{namespace}.
- Namespace
Name string The Name of Namespace.
- id String
The ID of the Namespace.
- namespace
Description String The Description of Namespace.
- namespace
Id String The Id of Namespace.It can contain 2 to 32 characters.The value is in format {RegionId}:{namespace}.
- namespace
Name String The Name of Namespace.
- id string
The ID of the Namespace.
- namespace
Description string The Description of Namespace.
- namespace
Id string The Id of Namespace.It can contain 2 to 32 characters.The value is in format {RegionId}:{namespace}.
- namespace
Name string The Name of Namespace.
- id str
The ID of the Namespace.
- namespace_
description str The Description of Namespace.
- namespace_
id str The Id of Namespace.It can contain 2 to 32 characters.The value is in format {RegionId}:{namespace}.
- namespace_
name str The Name of Namespace.
- id String
The ID of the Namespace.
- namespace
Description String The Description of Namespace.
- namespace
Id String The Id of Namespace.It can contain 2 to 32 characters.The value is in format {RegionId}:{namespace}.
- namespace
Name String The Name of Namespace.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.