SecurityPolicyArgs

data class SecurityPolicyArgs(val ciphers: Output<List<String>>? = null, val resourceGroupId: Output<String>? = null, val securityPolicyName: Output<String>? = null, val tags: Output<Map<String, Any>>? = null, val tlsVersions: Output<List<String>>? = null) : ConvertibleToJava<SecurityPolicyArgs>

Provides a NLB Security Policy resource. For information about NLB Security Policy and how to use it, see What is Security Policy.

NOTE: Available since v1.187.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.nlb.SecurityPolicy;
import com.pulumi.alicloud.nlb.SecurityPolicyArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("tf-example");
final var defaultResourceGroups = ResourcemanagerFunctions.getResourceGroups();
var defaultSecurityPolicy = new SecurityPolicy("defaultSecurityPolicy", SecurityPolicyArgs.builder()
.resourceGroupId(defaultResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.ids()[0]))
.securityPolicyName(name)
.ciphers(
"ECDHE-RSA-AES128-SHA",
"ECDHE-ECDSA-AES128-SHA")
.tlsVersions(
"TLSv1.0",
"TLSv1.1",
"TLSv1.2")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "example")
))
.build());
}
}

Import

NLB Security Policy can be imported using the id, e.g.

$ pulumi import alicloud:nlb/securityPolicy:SecurityPolicy example <id>

Constructors

Link copied to clipboard
fun SecurityPolicyArgs(ciphers: Output<List<String>>? = null, resourceGroupId: Output<String>? = null, securityPolicyName: Output<String>? = null, tags: Output<Map<String, Any>>? = null, tlsVersions: Output<List<String>>? = null)

Functions

Link copied to clipboard
open override fun toJava(): SecurityPolicyArgs

Properties

Link copied to clipboard
val ciphers: Output<List<String>>? = null

The supported cipher suites, which are determined by the TLS protocol version. You can specify at most 32 cipher suites.

Link copied to clipboard
val resourceGroupId: Output<String>? = null

The ID of the resource group.

Link copied to clipboard
val securityPolicyName: Output<String>? = null

The name of the security policy. The name must be 1 to 200 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-).

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val tlsVersions: Output<List<String>>? = null

The supported versions of the Transport Layer Security (TLS) protocol. Valid values: TLSv1.0, TLSv1.1, TLSv1.2, and TLSv1.3. You can specify at most four TLS versions.