1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. alb
  5. SecurityPolicy
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.alb.SecurityPolicy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    Provides a ALB Security Policy resource.

    For information about ALB Security Policy and how to use it, see What is Security Policy.

    NOTE: Available since v1.130.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _default = new alicloud.alb.SecurityPolicy("default", {
        ciphers: [
            "ECDHE-ECDSA-AES128-SHA",
            "AES256-SHA",
        ],
        securityPolicyName: "tf_example",
        tlsVersions: ["TLSv1.0"],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.alb.SecurityPolicy("default",
        ciphers=[
            "ECDHE-ECDSA-AES128-SHA",
            "AES256-SHA",
        ],
        security_policy_name="tf_example",
        tls_versions=["TLSv1.0"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := alb.NewSecurityPolicy(ctx, "default", &alb.SecurityPolicyArgs{
    			Ciphers: pulumi.StringArray{
    				pulumi.String("ECDHE-ECDSA-AES128-SHA"),
    				pulumi.String("AES256-SHA"),
    			},
    			SecurityPolicyName: pulumi.String("tf_example"),
    			TlsVersions: pulumi.StringArray{
    				pulumi.String("TLSv1.0"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new AliCloud.Alb.SecurityPolicy("default", new()
        {
            Ciphers = new[]
            {
                "ECDHE-ECDSA-AES128-SHA",
                "AES256-SHA",
            },
            SecurityPolicyName = "tf_example",
            TlsVersions = new[]
            {
                "TLSv1.0",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.alb.SecurityPolicy;
    import com.pulumi.alicloud.alb.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) {
            var default_ = new SecurityPolicy("default", SecurityPolicyArgs.builder()        
                .ciphers(            
                    "ECDHE-ECDSA-AES128-SHA",
                    "AES256-SHA")
                .securityPolicyName("tf_example")
                .tlsVersions("TLSv1.0")
                .build());
    
        }
    }
    
    resources:
      default:
        type: alicloud:alb:SecurityPolicy
        properties:
          ciphers:
            - ECDHE-ECDSA-AES128-SHA
            - AES256-SHA
          securityPolicyName: tf_example
          tlsVersions:
            - TLSv1.0
    

    Create SecurityPolicy Resource

    new SecurityPolicy(name: string, args: SecurityPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityPolicy(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       ciphers: Optional[Sequence[str]] = None,
                       dry_run: Optional[bool] = None,
                       resource_group_id: Optional[str] = None,
                       security_policy_name: Optional[str] = None,
                       tags: Optional[Mapping[str, Any]] = None,
                       tls_versions: Optional[Sequence[str]] = None)
    @overload
    def SecurityPolicy(resource_name: str,
                       args: SecurityPolicyArgs,
                       opts: Optional[ResourceOptions] = None)
    func NewSecurityPolicy(ctx *Context, name string, args SecurityPolicyArgs, opts ...ResourceOption) (*SecurityPolicy, error)
    public SecurityPolicy(string name, SecurityPolicyArgs args, CustomResourceOptions? opts = null)
    public SecurityPolicy(String name, SecurityPolicyArgs args)
    public SecurityPolicy(String name, SecurityPolicyArgs args, CustomResourceOptions options)
    
    type: alicloud:alb:SecurityPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SecurityPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SecurityPolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SecurityPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SecurityPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SecurityPolicy resource accepts the following input properties:

    Ciphers List<string>
    The supported cipher suites, which are determined by the TLS protocol version.The specified cipher suites must be supported by at least one TLS protocol version that you select.
    SecurityPolicyName string
    The name of the resource. The name must be 2 to 128 characters in length and must start with a letter. It can contain digits, periods (.), underscores (_), and hyphens (-).
    TlsVersions List<string>
    The TLS protocol versions that are supported. Valid values: TLSv1.0, TLSv1.1, TLSv1.2 and TLSv1.3.
    DryRun bool
    The dry run.
    ResourceGroupId string
    The ID of the resource group.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    Ciphers []string
    The supported cipher suites, which are determined by the TLS protocol version.The specified cipher suites must be supported by at least one TLS protocol version that you select.
    SecurityPolicyName string
    The name of the resource. The name must be 2 to 128 characters in length and must start with a letter. It can contain digits, periods (.), underscores (_), and hyphens (-).
    TlsVersions []string
    The TLS protocol versions that are supported. Valid values: TLSv1.0, TLSv1.1, TLSv1.2 and TLSv1.3.
    DryRun bool
    The dry run.
    ResourceGroupId string
    The ID of the resource group.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    ciphers List<String>
    The supported cipher suites, which are determined by the TLS protocol version.The specified cipher suites must be supported by at least one TLS protocol version that you select.
    securityPolicyName String
    The name of the resource. The name must be 2 to 128 characters in length and must start with a letter. It can contain digits, periods (.), underscores (_), and hyphens (-).
    tlsVersions List<String>
    The TLS protocol versions that are supported. Valid values: TLSv1.0, TLSv1.1, TLSv1.2 and TLSv1.3.
    dryRun Boolean
    The dry run.
    resourceGroupId String
    The ID of the resource group.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    ciphers string[]
    The supported cipher suites, which are determined by the TLS protocol version.The specified cipher suites must be supported by at least one TLS protocol version that you select.
    securityPolicyName string
    The name of the resource. The name must be 2 to 128 characters in length and must start with a letter. It can contain digits, periods (.), underscores (_), and hyphens (-).
    tlsVersions string[]
    The TLS protocol versions that are supported. Valid values: TLSv1.0, TLSv1.1, TLSv1.2 and TLSv1.3.
    dryRun boolean
    The dry run.
    resourceGroupId string
    The ID of the resource group.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    ciphers Sequence[str]
    The supported cipher suites, which are determined by the TLS protocol version.The specified cipher suites must be supported by at least one TLS protocol version that you select.
    security_policy_name str
    The name of the resource. The name must be 2 to 128 characters in length and must start with a letter. It can contain digits, periods (.), underscores (_), and hyphens (-).
    tls_versions Sequence[str]
    The TLS protocol versions that are supported. Valid values: TLSv1.0, TLSv1.1, TLSv1.2 and TLSv1.3.
    dry_run bool
    The dry run.
    resource_group_id str
    The ID of the resource group.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    ciphers List<String>
    The supported cipher suites, which are determined by the TLS protocol version.The specified cipher suites must be supported by at least one TLS protocol version that you select.
    securityPolicyName String
    The name of the resource. The name must be 2 to 128 characters in length and must start with a letter. It can contain digits, periods (.), underscores (_), and hyphens (-).
    tlsVersions List<String>
    The TLS protocol versions that are supported. Valid values: TLSv1.0, TLSv1.1, TLSv1.2 and TLSv1.3.
    dryRun Boolean
    The dry run.
    resourceGroupId String
    The ID of the resource group.
    tags Map<Any>
    A mapping of tags to assign to the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecurityPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.

    Look up Existing SecurityPolicy Resource

    Get an existing SecurityPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SecurityPolicyState, opts?: CustomResourceOptions): SecurityPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ciphers: Optional[Sequence[str]] = None,
            dry_run: Optional[bool] = None,
            resource_group_id: Optional[str] = None,
            security_policy_name: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None,
            tls_versions: Optional[Sequence[str]] = None) -> SecurityPolicy
    func GetSecurityPolicy(ctx *Context, name string, id IDInput, state *SecurityPolicyState, opts ...ResourceOption) (*SecurityPolicy, error)
    public static SecurityPolicy Get(string name, Input<string> id, SecurityPolicyState? state, CustomResourceOptions? opts = null)
    public static SecurityPolicy get(String name, Output<String> id, SecurityPolicyState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Ciphers List<string>
    The supported cipher suites, which are determined by the TLS protocol version.The specified cipher suites must be supported by at least one TLS protocol version that you select.
    DryRun bool
    The dry run.
    ResourceGroupId string
    The ID of the resource group.
    SecurityPolicyName string
    The name of the resource. The name must be 2 to 128 characters in length and must start with a letter. It can contain digits, periods (.), underscores (_), and hyphens (-).
    Status string
    The status of the resource.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    TlsVersions List<string>
    The TLS protocol versions that are supported. Valid values: TLSv1.0, TLSv1.1, TLSv1.2 and TLSv1.3.
    Ciphers []string
    The supported cipher suites, which are determined by the TLS protocol version.The specified cipher suites must be supported by at least one TLS protocol version that you select.
    DryRun bool
    The dry run.
    ResourceGroupId string
    The ID of the resource group.
    SecurityPolicyName string
    The name of the resource. The name must be 2 to 128 characters in length and must start with a letter. It can contain digits, periods (.), underscores (_), and hyphens (-).
    Status string
    The status of the resource.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    TlsVersions []string
    The TLS protocol versions that are supported. Valid values: TLSv1.0, TLSv1.1, TLSv1.2 and TLSv1.3.
    ciphers List<String>
    The supported cipher suites, which are determined by the TLS protocol version.The specified cipher suites must be supported by at least one TLS protocol version that you select.
    dryRun Boolean
    The dry run.
    resourceGroupId String
    The ID of the resource group.
    securityPolicyName String
    The name of the resource. The name must be 2 to 128 characters in length and must start with a letter. It can contain digits, periods (.), underscores (_), and hyphens (-).
    status String
    The status of the resource.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    tlsVersions List<String>
    The TLS protocol versions that are supported. Valid values: TLSv1.0, TLSv1.1, TLSv1.2 and TLSv1.3.
    ciphers string[]
    The supported cipher suites, which are determined by the TLS protocol version.The specified cipher suites must be supported by at least one TLS protocol version that you select.
    dryRun boolean
    The dry run.
    resourceGroupId string
    The ID of the resource group.
    securityPolicyName string
    The name of the resource. The name must be 2 to 128 characters in length and must start with a letter. It can contain digits, periods (.), underscores (_), and hyphens (-).
    status string
    The status of the resource.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    tlsVersions string[]
    The TLS protocol versions that are supported. Valid values: TLSv1.0, TLSv1.1, TLSv1.2 and TLSv1.3.
    ciphers Sequence[str]
    The supported cipher suites, which are determined by the TLS protocol version.The specified cipher suites must be supported by at least one TLS protocol version that you select.
    dry_run bool
    The dry run.
    resource_group_id str
    The ID of the resource group.
    security_policy_name str
    The name of the resource. The name must be 2 to 128 characters in length and must start with a letter. It can contain digits, periods (.), underscores (_), and hyphens (-).
    status str
    The status of the resource.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    tls_versions Sequence[str]
    The TLS protocol versions that are supported. Valid values: TLSv1.0, TLSv1.1, TLSv1.2 and TLSv1.3.
    ciphers List<String>
    The supported cipher suites, which are determined by the TLS protocol version.The specified cipher suites must be supported by at least one TLS protocol version that you select.
    dryRun Boolean
    The dry run.
    resourceGroupId String
    The ID of the resource group.
    securityPolicyName String
    The name of the resource. The name must be 2 to 128 characters in length and must start with a letter. It can contain digits, periods (.), underscores (_), and hyphens (-).
    status String
    The status of the resource.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    tlsVersions List<String>
    The TLS protocol versions that are supported. Valid values: TLSv1.0, TLSv1.1, TLSv1.2 and TLSv1.3.

    Import

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

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

    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.51.0 published on Saturday, Mar 23, 2024 by Pulumi