1. Packages
  2. Alicloud Provider
  3. API Docs
  4. slb
  5. getTlsCipherPolicies
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.slb.getTlsCipherPolicies

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    This data source provides the Slb Tls Cipher Policies of the current Alibaba Cloud user.

    NOTE: Available in v1.135.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.slb.getTlsCipherPolicies({
        ids: [
            "example_value-1",
            "example_value-2",
        ],
    });
    export const slbTlsCipherPolicyId1 = ids.then(ids => ids.policies?.[0]?.id);
    const nameRegex = alicloud.slb.getTlsCipherPolicies({
        nameRegex: "^My-TlsCipherPolicy",
    });
    export const slbTlsCipherPolicyId2 = nameRegex.then(nameRegex => nameRegex.policies?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.slb.get_tls_cipher_policies(ids=[
        "example_value-1",
        "example_value-2",
    ])
    pulumi.export("slbTlsCipherPolicyId1", ids.policies[0].id)
    name_regex = alicloud.slb.get_tls_cipher_policies(name_regex="^My-TlsCipherPolicy")
    pulumi.export("slbTlsCipherPolicyId2", name_regex.policies[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := slb.GetTlsCipherPolicies(ctx, &slb.GetTlsCipherPoliciesArgs{
    			Ids: []string{
    				"example_value-1",
    				"example_value-2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("slbTlsCipherPolicyId1", ids.Policies[0].Id)
    		nameRegex, err := slb.GetTlsCipherPolicies(ctx, &slb.GetTlsCipherPoliciesArgs{
    			NameRegex: pulumi.StringRef("^My-TlsCipherPolicy"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("slbTlsCipherPolicyId2", nameRegex.Policies[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Slb.GetTlsCipherPolicies.Invoke(new()
        {
            Ids = new[]
            {
                "example_value-1",
                "example_value-2",
            },
        });
    
        var nameRegex = AliCloud.Slb.GetTlsCipherPolicies.Invoke(new()
        {
            NameRegex = "^My-TlsCipherPolicy",
        });
    
        return new Dictionary<string, object?>
        {
            ["slbTlsCipherPolicyId1"] = ids.Apply(getTlsCipherPoliciesResult => getTlsCipherPoliciesResult.Policies[0]?.Id),
            ["slbTlsCipherPolicyId2"] = nameRegex.Apply(getTlsCipherPoliciesResult => getTlsCipherPoliciesResult.Policies[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.slb.SlbFunctions;
    import com.pulumi.alicloud.slb.inputs.GetTlsCipherPoliciesArgs;
    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 = SlbFunctions.getTlsCipherPolicies(GetTlsCipherPoliciesArgs.builder()
                .ids(            
                    "example_value-1",
                    "example_value-2")
                .build());
    
            ctx.export("slbTlsCipherPolicyId1", ids.applyValue(getTlsCipherPoliciesResult -> getTlsCipherPoliciesResult.policies()[0].id()));
            final var nameRegex = SlbFunctions.getTlsCipherPolicies(GetTlsCipherPoliciesArgs.builder()
                .nameRegex("^My-TlsCipherPolicy")
                .build());
    
            ctx.export("slbTlsCipherPolicyId2", nameRegex.applyValue(getTlsCipherPoliciesResult -> getTlsCipherPoliciesResult.policies()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:slb:getTlsCipherPolicies
          Arguments:
            ids:
              - example_value-1
              - example_value-2
      nameRegex:
        fn::invoke:
          Function: alicloud:slb:getTlsCipherPolicies
          Arguments:
            nameRegex: ^My-TlsCipherPolicy
    outputs:
      slbTlsCipherPolicyId1: ${ids.policies[0].id}
      slbTlsCipherPolicyId2: ${nameRegex.policies[0].id}
    

    Using getTlsCipherPolicies

    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 getTlsCipherPolicies(args: GetTlsCipherPoliciesArgs, opts?: InvokeOptions): Promise<GetTlsCipherPoliciesResult>
    function getTlsCipherPoliciesOutput(args: GetTlsCipherPoliciesOutputArgs, opts?: InvokeOptions): Output<GetTlsCipherPoliciesResult>
    def get_tls_cipher_policies(ids: Optional[Sequence[str]] = None,
                                include_listener: Optional[bool] = None,
                                name_regex: Optional[str] = None,
                                output_file: Optional[str] = None,
                                status: Optional[str] = None,
                                tls_cipher_policy_name: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetTlsCipherPoliciesResult
    def get_tls_cipher_policies_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                include_listener: Optional[pulumi.Input[bool]] = None,
                                name_regex: Optional[pulumi.Input[str]] = None,
                                output_file: Optional[pulumi.Input[str]] = None,
                                status: Optional[pulumi.Input[str]] = None,
                                tls_cipher_policy_name: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetTlsCipherPoliciesResult]
    func GetTlsCipherPolicies(ctx *Context, args *GetTlsCipherPoliciesArgs, opts ...InvokeOption) (*GetTlsCipherPoliciesResult, error)
    func GetTlsCipherPoliciesOutput(ctx *Context, args *GetTlsCipherPoliciesOutputArgs, opts ...InvokeOption) GetTlsCipherPoliciesResultOutput

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

    public static class GetTlsCipherPolicies 
    {
        public static Task<GetTlsCipherPoliciesResult> InvokeAsync(GetTlsCipherPoliciesArgs args, InvokeOptions? opts = null)
        public static Output<GetTlsCipherPoliciesResult> Invoke(GetTlsCipherPoliciesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTlsCipherPoliciesResult> getTlsCipherPolicies(GetTlsCipherPoliciesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:slb/getTlsCipherPolicies:getTlsCipherPolicies
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Tls Cipher Policy IDs.
    IncludeListener bool
    The include listener.
    NameRegex string
    A regex string to filter results by Tls Cipher Policy name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    TLS policy instance state. Valid values: configuring, normal.
    TlsCipherPolicyName string
    TLS policy name. Length is from 2 to 128, or in both the English and Chinese characters must be with an uppercase/lowercase letter or a Chinese character and the beginning, may contain numbers, in dot ., underscore _ or dash -.
    Ids []string
    A list of Tls Cipher Policy IDs.
    IncludeListener bool
    The include listener.
    NameRegex string
    A regex string to filter results by Tls Cipher Policy name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    TLS policy instance state. Valid values: configuring, normal.
    TlsCipherPolicyName string
    TLS policy name. Length is from 2 to 128, or in both the English and Chinese characters must be with an uppercase/lowercase letter or a Chinese character and the beginning, may contain numbers, in dot ., underscore _ or dash -.
    ids List<String>
    A list of Tls Cipher Policy IDs.
    includeListener Boolean
    The include listener.
    nameRegex String
    A regex string to filter results by Tls Cipher Policy name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    TLS policy instance state. Valid values: configuring, normal.
    tlsCipherPolicyName String
    TLS policy name. Length is from 2 to 128, or in both the English and Chinese characters must be with an uppercase/lowercase letter or a Chinese character and the beginning, may contain numbers, in dot ., underscore _ or dash -.
    ids string[]
    A list of Tls Cipher Policy IDs.
    includeListener boolean
    The include listener.
    nameRegex string
    A regex string to filter results by Tls Cipher Policy name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    TLS policy instance state. Valid values: configuring, normal.
    tlsCipherPolicyName string
    TLS policy name. Length is from 2 to 128, or in both the English and Chinese characters must be with an uppercase/lowercase letter or a Chinese character and the beginning, may contain numbers, in dot ., underscore _ or dash -.
    ids Sequence[str]
    A list of Tls Cipher Policy IDs.
    include_listener bool
    The include listener.
    name_regex str
    A regex string to filter results by Tls Cipher Policy name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    TLS policy instance state. Valid values: configuring, normal.
    tls_cipher_policy_name str
    TLS policy name. Length is from 2 to 128, or in both the English and Chinese characters must be with an uppercase/lowercase letter or a Chinese character and the beginning, may contain numbers, in dot ., underscore _ or dash -.
    ids List<String>
    A list of Tls Cipher Policy IDs.
    includeListener Boolean
    The include listener.
    nameRegex String
    A regex string to filter results by Tls Cipher Policy name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    TLS policy instance state. Valid values: configuring, normal.
    tlsCipherPolicyName String
    TLS policy name. Length is from 2 to 128, or in both the English and Chinese characters must be with an uppercase/lowercase letter or a Chinese character and the beginning, may contain numbers, in dot ., underscore _ or dash -.

    getTlsCipherPolicies Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    Policies List<Pulumi.AliCloud.Slb.Outputs.GetTlsCipherPoliciesPolicy>
    IncludeListener bool
    NameRegex string
    OutputFile string
    Status string
    TlsCipherPolicyName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    Policies []GetTlsCipherPoliciesPolicy
    IncludeListener bool
    NameRegex string
    OutputFile string
    Status string
    TlsCipherPolicyName string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    policies List<GetTlsCipherPoliciesPolicy>
    includeListener Boolean
    nameRegex String
    outputFile String
    status String
    tlsCipherPolicyName String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    policies GetTlsCipherPoliciesPolicy[]
    includeListener boolean
    nameRegex string
    outputFile string
    status string
    tlsCipherPolicyName string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    policies Sequence[GetTlsCipherPoliciesPolicy]
    include_listener bool
    name_regex str
    output_file str
    status str
    tls_cipher_policy_name str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    policies List<Property Map>
    includeListener Boolean
    nameRegex String
    outputFile String
    status String
    tlsCipherPolicyName String

    Supporting Types

    GetTlsCipherPoliciesPolicy

    Ciphers List<string>
    The encryption algorithms supported. It depends on the value of tls_versions.
    CreateTime string
    The creation time timestamp.
    Id string
    The ID of the Tls Cipher Policy.
    RelateListeners List<Pulumi.AliCloud.Slb.Inputs.GetTlsCipherPoliciesPolicyRelateListener>
    Array of Relate Listeners.
    Status string
    TLS policy instance state.
    TlsCipherPolicyId string
    The ID of TLS cipher policy.
    TlsCipherPolicyName string
    TLS policy name. Length is from 2 to 128, or in both the English and Chinese characters must be with an uppercase/lowercase letter or a Chinese character and the beginning, may contain numbers, in dot ., underscore _ or dash -.
    TlsVersions List<string>
    The version of TLS protocol.
    Ciphers []string
    The encryption algorithms supported. It depends on the value of tls_versions.
    CreateTime string
    The creation time timestamp.
    Id string
    The ID of the Tls Cipher Policy.
    RelateListeners []GetTlsCipherPoliciesPolicyRelateListener
    Array of Relate Listeners.
    Status string
    TLS policy instance state.
    TlsCipherPolicyId string
    The ID of TLS cipher policy.
    TlsCipherPolicyName string
    TLS policy name. Length is from 2 to 128, or in both the English and Chinese characters must be with an uppercase/lowercase letter or a Chinese character and the beginning, may contain numbers, in dot ., underscore _ or dash -.
    TlsVersions []string
    The version of TLS protocol.
    ciphers List<String>
    The encryption algorithms supported. It depends on the value of tls_versions.
    createTime String
    The creation time timestamp.
    id String
    The ID of the Tls Cipher Policy.
    relateListeners List<GetTlsCipherPoliciesPolicyRelateListener>
    Array of Relate Listeners.
    status String
    TLS policy instance state.
    tlsCipherPolicyId String
    The ID of TLS cipher policy.
    tlsCipherPolicyName String
    TLS policy name. Length is from 2 to 128, or in both the English and Chinese characters must be with an uppercase/lowercase letter or a Chinese character and the beginning, may contain numbers, in dot ., underscore _ or dash -.
    tlsVersions List<String>
    The version of TLS protocol.
    ciphers string[]
    The encryption algorithms supported. It depends on the value of tls_versions.
    createTime string
    The creation time timestamp.
    id string
    The ID of the Tls Cipher Policy.
    relateListeners GetTlsCipherPoliciesPolicyRelateListener[]
    Array of Relate Listeners.
    status string
    TLS policy instance state.
    tlsCipherPolicyId string
    The ID of TLS cipher policy.
    tlsCipherPolicyName string
    TLS policy name. Length is from 2 to 128, or in both the English and Chinese characters must be with an uppercase/lowercase letter or a Chinese character and the beginning, may contain numbers, in dot ., underscore _ or dash -.
    tlsVersions string[]
    The version of TLS protocol.
    ciphers Sequence[str]
    The encryption algorithms supported. It depends on the value of tls_versions.
    create_time str
    The creation time timestamp.
    id str
    The ID of the Tls Cipher Policy.
    relate_listeners Sequence[GetTlsCipherPoliciesPolicyRelateListener]
    Array of Relate Listeners.
    status str
    TLS policy instance state.
    tls_cipher_policy_id str
    The ID of TLS cipher policy.
    tls_cipher_policy_name str
    TLS policy name. Length is from 2 to 128, or in both the English and Chinese characters must be with an uppercase/lowercase letter or a Chinese character and the beginning, may contain numbers, in dot ., underscore _ or dash -.
    tls_versions Sequence[str]
    The version of TLS protocol.
    ciphers List<String>
    The encryption algorithms supported. It depends on the value of tls_versions.
    createTime String
    The creation time timestamp.
    id String
    The ID of the Tls Cipher Policy.
    relateListeners List<Property Map>
    Array of Relate Listeners.
    status String
    TLS policy instance state.
    tlsCipherPolicyId String
    The ID of TLS cipher policy.
    tlsCipherPolicyName String
    TLS policy name. Length is from 2 to 128, or in both the English and Chinese characters must be with an uppercase/lowercase letter or a Chinese character and the beginning, may contain numbers, in dot ., underscore _ or dash -.
    tlsVersions List<String>
    The version of TLS protocol.

    GetTlsCipherPoliciesPolicyRelateListener

    LoadBalancerId string
    The ID of SLB instance.
    Port int
    Listening port. Valid value: 1 to 65535.
    Protocol string
    Snooping protocols. Valid values: TCP, UDP, HTTP, or HTTPS.
    LoadBalancerId string
    The ID of SLB instance.
    Port int
    Listening port. Valid value: 1 to 65535.
    Protocol string
    Snooping protocols. Valid values: TCP, UDP, HTTP, or HTTPS.
    loadBalancerId String
    The ID of SLB instance.
    port Integer
    Listening port. Valid value: 1 to 65535.
    protocol String
    Snooping protocols. Valid values: TCP, UDP, HTTP, or HTTPS.
    loadBalancerId string
    The ID of SLB instance.
    port number
    Listening port. Valid value: 1 to 65535.
    protocol string
    Snooping protocols. Valid values: TCP, UDP, HTTP, or HTTPS.
    load_balancer_id str
    The ID of SLB instance.
    port int
    Listening port. Valid value: 1 to 65535.
    protocol str
    Snooping protocols. Valid values: TCP, UDP, HTTP, or HTTPS.
    loadBalancerId String
    The ID of SLB instance.
    port Number
    Listening port. Valid value: 1 to 65535.
    protocol String
    Snooping protocols. Valid values: TCP, UDP, HTTP, or HTTPS.

    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.62.1 published on Monday, Sep 16, 2024 by Pulumi