1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. servicemesh
  5. getExtensionProviders
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.servicemesh.getExtensionProviders

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides the Service Mesh Extension Providers of the current Alibaba Cloud user.

    NOTE: Available in v1.191.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.servicemesh.getExtensionProviders({
        ids: ["example_id"],
        serviceMeshId: "example_service_mesh_id",
        type: "httpextauth",
    });
    export const serviceMeshExtensionProvidersId1 = ids.then(ids => ids.providers?.[0]?.id);
    const nameRegex = alicloud.servicemesh.getExtensionProviders({
        nameRegex: "^my-ServiceMeshExtensionProvider",
        serviceMeshId: "example_service_mesh_id",
        type: "httpextauth",
    });
    export const serviceMeshExtensionProvidersId2 = nameRegex.then(nameRegex => nameRegex.providers?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.servicemesh.get_extension_providers(ids=["example_id"],
        service_mesh_id="example_service_mesh_id",
        type="httpextauth")
    pulumi.export("serviceMeshExtensionProvidersId1", ids.providers[0].id)
    name_regex = alicloud.servicemesh.get_extension_providers(name_regex="^my-ServiceMeshExtensionProvider",
        service_mesh_id="example_service_mesh_id",
        type="httpextauth")
    pulumi.export("serviceMeshExtensionProvidersId2", name_regex.providers[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/servicemesh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := servicemesh.GetExtensionProviders(ctx, &servicemesh.GetExtensionProvidersArgs{
    			Ids: []string{
    				"example_id",
    			},
    			ServiceMeshId: "example_service_mesh_id",
    			Type:          "httpextauth",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("serviceMeshExtensionProvidersId1", ids.Providers[0].Id)
    		nameRegex, err := servicemesh.GetExtensionProviders(ctx, &servicemesh.GetExtensionProvidersArgs{
    			NameRegex:     pulumi.StringRef("^my-ServiceMeshExtensionProvider"),
    			ServiceMeshId: "example_service_mesh_id",
    			Type:          "httpextauth",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("serviceMeshExtensionProvidersId2", nameRegex.Providers[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.ServiceMesh.GetExtensionProviders.Invoke(new()
        {
            Ids = new[]
            {
                "example_id",
            },
            ServiceMeshId = "example_service_mesh_id",
            Type = "httpextauth",
        });
    
        var nameRegex = AliCloud.ServiceMesh.GetExtensionProviders.Invoke(new()
        {
            NameRegex = "^my-ServiceMeshExtensionProvider",
            ServiceMeshId = "example_service_mesh_id",
            Type = "httpextauth",
        });
    
        return new Dictionary<string, object?>
        {
            ["serviceMeshExtensionProvidersId1"] = ids.Apply(getExtensionProvidersResult => getExtensionProvidersResult.Providers[0]?.Id),
            ["serviceMeshExtensionProvidersId2"] = nameRegex.Apply(getExtensionProvidersResult => getExtensionProvidersResult.Providers[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.servicemesh.ServicemeshFunctions;
    import com.pulumi.alicloud.servicemesh.inputs.GetExtensionProvidersArgs;
    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 ids = ServicemeshFunctions.getExtensionProviders(GetExtensionProvidersArgs.builder()
                .ids("example_id")
                .serviceMeshId("example_service_mesh_id")
                .type("httpextauth")
                .build());
    
            ctx.export("serviceMeshExtensionProvidersId1", ids.applyValue(getExtensionProvidersResult -> getExtensionProvidersResult.providers()[0].id()));
            final var nameRegex = ServicemeshFunctions.getExtensionProviders(GetExtensionProvidersArgs.builder()
                .nameRegex("^my-ServiceMeshExtensionProvider")
                .serviceMeshId("example_service_mesh_id")
                .type("httpextauth")
                .build());
    
            ctx.export("serviceMeshExtensionProvidersId2", nameRegex.applyValue(getExtensionProvidersResult -> getExtensionProvidersResult.providers()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:servicemesh:getExtensionProviders
          Arguments:
            ids:
              - example_id
            serviceMeshId: example_service_mesh_id
            type: httpextauth
      nameRegex:
        fn::invoke:
          Function: alicloud:servicemesh:getExtensionProviders
          Arguments:
            nameRegex: ^my-ServiceMeshExtensionProvider
            serviceMeshId: example_service_mesh_id
            type: httpextauth
    outputs:
      serviceMeshExtensionProvidersId1: ${ids.providers[0].id}
      serviceMeshExtensionProvidersId2: ${nameRegex.providers[0].id}
    

    Using getExtensionProviders

    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 getExtensionProviders(args: GetExtensionProvidersArgs, opts?: InvokeOptions): Promise<GetExtensionProvidersResult>
    function getExtensionProvidersOutput(args: GetExtensionProvidersOutputArgs, opts?: InvokeOptions): Output<GetExtensionProvidersResult>
    def get_extension_providers(ids: Optional[Sequence[str]] = None,
                                name_regex: Optional[str] = None,
                                output_file: Optional[str] = None,
                                service_mesh_id: Optional[str] = None,
                                type: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetExtensionProvidersResult
    def get_extension_providers_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                name_regex: Optional[pulumi.Input[str]] = None,
                                output_file: Optional[pulumi.Input[str]] = None,
                                service_mesh_id: Optional[pulumi.Input[str]] = None,
                                type: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetExtensionProvidersResult]
    func GetExtensionProviders(ctx *Context, args *GetExtensionProvidersArgs, opts ...InvokeOption) (*GetExtensionProvidersResult, error)
    func GetExtensionProvidersOutput(ctx *Context, args *GetExtensionProvidersOutputArgs, opts ...InvokeOption) GetExtensionProvidersResultOutput

    > Note: This function is named GetExtensionProviders in the Go SDK.

    public static class GetExtensionProviders 
    {
        public static Task<GetExtensionProvidersResult> InvokeAsync(GetExtensionProvidersArgs args, InvokeOptions? opts = null)
        public static Output<GetExtensionProvidersResult> Invoke(GetExtensionProvidersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetExtensionProvidersResult> getExtensionProviders(GetExtensionProvidersArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:servicemesh/getExtensionProviders:getExtensionProviders
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ServiceMeshId string
    The ID of the Service Mesh.
    Type string
    The type of the Service Mesh Extension Provider. Valid values: httpextauth, grpcextauth.
    Ids List<string>
    A list of Service Mesh Extension Provider IDs.
    NameRegex string
    A regex string to filter results by Service Mesh Extension Provider name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ServiceMeshId string
    The ID of the Service Mesh.
    Type string
    The type of the Service Mesh Extension Provider. Valid values: httpextauth, grpcextauth.
    Ids []string
    A list of Service Mesh Extension Provider IDs.
    NameRegex string
    A regex string to filter results by Service Mesh Extension Provider name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    serviceMeshId String
    The ID of the Service Mesh.
    type String
    The type of the Service Mesh Extension Provider. Valid values: httpextauth, grpcextauth.
    ids List<String>
    A list of Service Mesh Extension Provider IDs.
    nameRegex String
    A regex string to filter results by Service Mesh Extension Provider name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    serviceMeshId string
    The ID of the Service Mesh.
    type string
    The type of the Service Mesh Extension Provider. Valid values: httpextauth, grpcextauth.
    ids string[]
    A list of Service Mesh Extension Provider IDs.
    nameRegex string
    A regex string to filter results by Service Mesh Extension Provider name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    service_mesh_id str
    The ID of the Service Mesh.
    type str
    The type of the Service Mesh Extension Provider. Valid values: httpextauth, grpcextauth.
    ids Sequence[str]
    A list of Service Mesh Extension Provider IDs.
    name_regex str
    A regex string to filter results by Service Mesh Extension Provider name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    serviceMeshId String
    The ID of the Service Mesh.
    type String
    The type of the Service Mesh Extension Provider. Valid values: httpextauth, grpcextauth.
    ids List<String>
    A list of Service Mesh Extension Provider IDs.
    nameRegex String
    A regex string to filter results by Service Mesh Extension Provider name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getExtensionProviders Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    A list of Extension Provider names.
    Providers List<Pulumi.AliCloud.ServiceMesh.Outputs.GetExtensionProvidersProvider>
    A list of Service Mesh Extension Providers. Each element contains the following attributes:
    ServiceMeshId string
    The ID of the Service Mesh.
    Type string
    The type of the Service Mesh Extension Provider.
    NameRegex string
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    A list of Extension Provider names.
    Providers []GetExtensionProvidersProvider
    A list of Service Mesh Extension Providers. Each element contains the following attributes:
    ServiceMeshId string
    The ID of the Service Mesh.
    Type string
    The type of the Service Mesh Extension Provider.
    NameRegex string
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Extension Provider names.
    providers List<GetExtensionProvidersProvider>
    A list of Service Mesh Extension Providers. Each element contains the following attributes:
    serviceMeshId String
    The ID of the Service Mesh.
    type String
    The type of the Service Mesh Extension Provider.
    nameRegex String
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    A list of Extension Provider names.
    providers GetExtensionProvidersProvider[]
    A list of Service Mesh Extension Providers. Each element contains the following attributes:
    serviceMeshId string
    The ID of the Service Mesh.
    type string
    The type of the Service Mesh Extension Provider.
    nameRegex string
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    A list of Extension Provider names.
    providers Sequence[GetExtensionProvidersProvider]
    A list of Service Mesh Extension Providers. Each element contains the following attributes:
    service_mesh_id str
    The ID of the Service Mesh.
    type str
    The type of the Service Mesh Extension Provider.
    name_regex str
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Extension Provider names.
    providers List<Property Map>
    A list of Service Mesh Extension Providers. Each element contains the following attributes:
    serviceMeshId String
    The ID of the Service Mesh.
    type String
    The type of the Service Mesh Extension Provider.
    nameRegex String
    outputFile String

    Supporting Types

    GetExtensionProvidersProvider

    Config string
    The config of the Service Mesh Extension Provider.
    ExtensionProviderName string
    The name of the Service Mesh Extension Provider.
    Id string
    The ID of the Service Mesh Extension Provider. It formats as <service_mesh_id>:<type>:<extension_provider_name>.
    ServiceMeshId string
    The ID of the Service Mesh.
    Type string
    The type of the Service Mesh Extension Provider. Valid values: httpextauth, grpcextauth.
    Config string
    The config of the Service Mesh Extension Provider.
    ExtensionProviderName string
    The name of the Service Mesh Extension Provider.
    Id string
    The ID of the Service Mesh Extension Provider. It formats as <service_mesh_id>:<type>:<extension_provider_name>.
    ServiceMeshId string
    The ID of the Service Mesh.
    Type string
    The type of the Service Mesh Extension Provider. Valid values: httpextauth, grpcextauth.
    config String
    The config of the Service Mesh Extension Provider.
    extensionProviderName String
    The name of the Service Mesh Extension Provider.
    id String
    The ID of the Service Mesh Extension Provider. It formats as <service_mesh_id>:<type>:<extension_provider_name>.
    serviceMeshId String
    The ID of the Service Mesh.
    type String
    The type of the Service Mesh Extension Provider. Valid values: httpextauth, grpcextauth.
    config string
    The config of the Service Mesh Extension Provider.
    extensionProviderName string
    The name of the Service Mesh Extension Provider.
    id string
    The ID of the Service Mesh Extension Provider. It formats as <service_mesh_id>:<type>:<extension_provider_name>.
    serviceMeshId string
    The ID of the Service Mesh.
    type string
    The type of the Service Mesh Extension Provider. Valid values: httpextauth, grpcextauth.
    config str
    The config of the Service Mesh Extension Provider.
    extension_provider_name str
    The name of the Service Mesh Extension Provider.
    id str
    The ID of the Service Mesh Extension Provider. It formats as <service_mesh_id>:<type>:<extension_provider_name>.
    service_mesh_id str
    The ID of the Service Mesh.
    type str
    The type of the Service Mesh Extension Provider. Valid values: httpextauth, grpcextauth.
    config String
    The config of the Service Mesh Extension Provider.
    extensionProviderName String
    The name of the Service Mesh Extension Provider.
    id String
    The ID of the Service Mesh Extension Provider. It formats as <service_mesh_id>:<type>:<extension_provider_name>.
    serviceMeshId String
    The ID of the Service Mesh.
    type String
    The type of the Service Mesh Extension Provider. Valid values: httpextauth, grpcextauth.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi