1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. slb
  5. getTlsCipherPolicies
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.slb.getTlsCipherPolicies

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
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}
Copy

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>
Copy
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]
Copy
func GetTlsCipherPolicies(ctx *Context, args *GetTlsCipherPoliciesArgs, opts ...InvokeOption) (*GetTlsCipherPoliciesResult, error)
func GetTlsCipherPoliciesOutput(ctx *Context, args *GetTlsCipherPoliciesOutputArgs, opts ...InvokeOption) GetTlsCipherPoliciesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetTlsCipherPoliciesResult> getTlsCipherPolicies(GetTlsCipherPoliciesArgs args, InvokeOptions options)
public static Output<GetTlsCipherPoliciesResult> getTlsCipherPolicies(GetTlsCipherPoliciesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:slb/getTlsCipherPolicies:getTlsCipherPolicies
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
A list of Tls Cipher Policy IDs.
IncludeListener Changes to this property will trigger replacement. bool
The include listener.
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
TLS policy instance state. Valid values: configuring, normal.
TlsCipherPolicyName Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. []string
A list of Tls Cipher Policy IDs.
IncludeListener Changes to this property will trigger replacement. bool
The include listener.
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
TLS policy instance state. Valid values: configuring, normal.
TlsCipherPolicyName Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>
A list of Tls Cipher Policy IDs.
includeListener Changes to this property will trigger replacement. Boolean
The include listener.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
TLS policy instance state. Valid values: configuring, normal.
tlsCipherPolicyName Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string[]
A list of Tls Cipher Policy IDs.
includeListener Changes to this property will trigger replacement. boolean
The include listener.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
TLS policy instance state. Valid values: configuring, normal.
tlsCipherPolicyName Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. Sequence[str]
A list of Tls Cipher Policy IDs.
include_listener Changes to this property will trigger replacement. bool
The include listener.
name_regex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
TLS policy instance state. Valid values: configuring, normal.
tls_cipher_policy_name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>
A list of Tls Cipher Policy IDs.
includeListener Changes to this property will trigger replacement. Boolean
The include listener.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
TLS policy instance state. Valid values: configuring, normal.
tlsCipherPolicyName Changes to this property will trigger replacement. 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 This property is required. List<string>
The encryption algorithms supported. It depends on the value of tls_versions.
CreateTime This property is required. string
The creation time timestamp.
Id This property is required. string
The ID of the Tls Cipher Policy.
RelateListeners This property is required. List<Pulumi.AliCloud.Slb.Inputs.GetTlsCipherPoliciesPolicyRelateListener>
Array of Relate Listeners.
Status This property is required. string
TLS policy instance state.
TlsCipherPolicyId This property is required. string
The ID of TLS cipher policy.
TlsCipherPolicyName This property is required. 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 This property is required. List<string>
The version of TLS protocol.
Ciphers This property is required. []string
The encryption algorithms supported. It depends on the value of tls_versions.
CreateTime This property is required. string
The creation time timestamp.
Id This property is required. string
The ID of the Tls Cipher Policy.
RelateListeners This property is required. []GetTlsCipherPoliciesPolicyRelateListener
Array of Relate Listeners.
Status This property is required. string
TLS policy instance state.
TlsCipherPolicyId This property is required. string
The ID of TLS cipher policy.
TlsCipherPolicyName This property is required. 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 This property is required. []string
The version of TLS protocol.
ciphers This property is required. List<String>
The encryption algorithms supported. It depends on the value of tls_versions.
createTime This property is required. String
The creation time timestamp.
id This property is required. String
The ID of the Tls Cipher Policy.
relateListeners This property is required. List<GetTlsCipherPoliciesPolicyRelateListener>
Array of Relate Listeners.
status This property is required. String
TLS policy instance state.
tlsCipherPolicyId This property is required. String
The ID of TLS cipher policy.
tlsCipherPolicyName This property is required. 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 This property is required. List<String>
The version of TLS protocol.
ciphers This property is required. string[]
The encryption algorithms supported. It depends on the value of tls_versions.
createTime This property is required. string
The creation time timestamp.
id This property is required. string
The ID of the Tls Cipher Policy.
relateListeners This property is required. GetTlsCipherPoliciesPolicyRelateListener[]
Array of Relate Listeners.
status This property is required. string
TLS policy instance state.
tlsCipherPolicyId This property is required. string
The ID of TLS cipher policy.
tlsCipherPolicyName This property is required. 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 This property is required. string[]
The version of TLS protocol.
ciphers This property is required. Sequence[str]
The encryption algorithms supported. It depends on the value of tls_versions.
create_time This property is required. str
The creation time timestamp.
id This property is required. str
The ID of the Tls Cipher Policy.
relate_listeners This property is required. Sequence[GetTlsCipherPoliciesPolicyRelateListener]
Array of Relate Listeners.
status This property is required. str
TLS policy instance state.
tls_cipher_policy_id This property is required. str
The ID of TLS cipher policy.
tls_cipher_policy_name This property is required. 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 This property is required. Sequence[str]
The version of TLS protocol.
ciphers This property is required. List<String>
The encryption algorithms supported. It depends on the value of tls_versions.
createTime This property is required. String
The creation time timestamp.
id This property is required. String
The ID of the Tls Cipher Policy.
relateListeners This property is required. List<Property Map>
Array of Relate Listeners.
status This property is required. String
TLS policy instance state.
tlsCipherPolicyId This property is required. String
The ID of TLS cipher policy.
tlsCipherPolicyName This property is required. 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 This property is required. List<String>
The version of TLS protocol.

GetTlsCipherPoliciesPolicyRelateListener

LoadBalancerId This property is required. string
The ID of SLB instance.
Port This property is required. int
Listening port. Valid value: 1 to 65535.
Protocol This property is required. string
Snooping protocols. Valid values: TCP, UDP, HTTP, or HTTPS.
LoadBalancerId This property is required. string
The ID of SLB instance.
Port This property is required. int
Listening port. Valid value: 1 to 65535.
Protocol This property is required. string
Snooping protocols. Valid values: TCP, UDP, HTTP, or HTTPS.
loadBalancerId This property is required. String
The ID of SLB instance.
port This property is required. Integer
Listening port. Valid value: 1 to 65535.
protocol This property is required. String
Snooping protocols. Valid values: TCP, UDP, HTTP, or HTTPS.
loadBalancerId This property is required. string
The ID of SLB instance.
port This property is required. number
Listening port. Valid value: 1 to 65535.
protocol This property is required. string
Snooping protocols. Valid values: TCP, UDP, HTTP, or HTTPS.
load_balancer_id This property is required. str
The ID of SLB instance.
port This property is required. int
Listening port. Valid value: 1 to 65535.
protocol This property is required. str
Snooping protocols. Valid values: TCP, UDP, HTTP, or HTTPS.
loadBalancerId This property is required. String
The ID of SLB instance.
port This property is required. Number
Listening port. Valid value: 1 to 65535.
protocol This property is required. 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.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi