1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. edas
  5. K8sSlbAttachment
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.edas.K8sSlbAttachment

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    Binds SLBs to an EDAS k8s application.

    For information about EDAS k8s slb attachment and how to use it, see What is k8s slb attachment.

    NOTE: Available since v1.194.0.

    Create K8sSlbAttachment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new K8sSlbAttachment(name: string, args: K8sSlbAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def K8sSlbAttachment(resource_name: str,
                         args: K8sSlbAttachmentArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def K8sSlbAttachment(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         app_id: Optional[str] = None,
                         slb_configs: Optional[Sequence[K8sSlbAttachmentSlbConfigArgs]] = None)
    func NewK8sSlbAttachment(ctx *Context, name string, args K8sSlbAttachmentArgs, opts ...ResourceOption) (*K8sSlbAttachment, error)
    public K8sSlbAttachment(string name, K8sSlbAttachmentArgs args, CustomResourceOptions? opts = null)
    public K8sSlbAttachment(String name, K8sSlbAttachmentArgs args)
    public K8sSlbAttachment(String name, K8sSlbAttachmentArgs args, CustomResourceOptions options)
    
    type: alicloud:edas:K8sSlbAttachment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args K8sSlbAttachmentArgs
    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 K8sSlbAttachmentArgs
    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 K8sSlbAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args K8sSlbAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args K8sSlbAttachmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var k8sSlbAttachmentResource = new AliCloud.Edas.K8sSlbAttachment("k8sSlbAttachmentResource", new()
    {
        AppId = "string",
        SlbConfigs = new[]
        {
            new AliCloud.Edas.Inputs.K8sSlbAttachmentSlbConfigArgs
            {
                PortMappings = new[]
                {
                    new AliCloud.Edas.Inputs.K8sSlbAttachmentSlbConfigPortMappingArgs
                    {
                        LoadbalancerProtocol = "string",
                        ServicePort = new AliCloud.Edas.Inputs.K8sSlbAttachmentSlbConfigPortMappingServicePortArgs
                        {
                            Port = 0,
                            Protocol = "string",
                            TargetPort = 0,
                        },
                        CertId = "string",
                    },
                },
                Scheduler = "string",
                Type = "string",
                Name = "string",
                SlbId = "string",
                Specification = "string",
            },
        },
    });
    
    example, err := edas.NewK8sSlbAttachment(ctx, "k8sSlbAttachmentResource", &edas.K8sSlbAttachmentArgs{
    	AppId: pulumi.String("string"),
    	SlbConfigs: edas.K8sSlbAttachmentSlbConfigArray{
    		&edas.K8sSlbAttachmentSlbConfigArgs{
    			PortMappings: edas.K8sSlbAttachmentSlbConfigPortMappingArray{
    				&edas.K8sSlbAttachmentSlbConfigPortMappingArgs{
    					LoadbalancerProtocol: pulumi.String("string"),
    					ServicePort: &edas.K8sSlbAttachmentSlbConfigPortMappingServicePortArgs{
    						Port:       pulumi.Int(0),
    						Protocol:   pulumi.String("string"),
    						TargetPort: pulumi.Int(0),
    					},
    					CertId: pulumi.String("string"),
    				},
    			},
    			Scheduler:     pulumi.String("string"),
    			Type:          pulumi.String("string"),
    			Name:          pulumi.String("string"),
    			SlbId:         pulumi.String("string"),
    			Specification: pulumi.String("string"),
    		},
    	},
    })
    
    var k8sSlbAttachmentResource = new K8sSlbAttachment("k8sSlbAttachmentResource", K8sSlbAttachmentArgs.builder()        
        .appId("string")
        .slbConfigs(K8sSlbAttachmentSlbConfigArgs.builder()
            .portMappings(K8sSlbAttachmentSlbConfigPortMappingArgs.builder()
                .loadbalancerProtocol("string")
                .servicePort(K8sSlbAttachmentSlbConfigPortMappingServicePortArgs.builder()
                    .port(0)
                    .protocol("string")
                    .targetPort(0)
                    .build())
                .certId("string")
                .build())
            .scheduler("string")
            .type("string")
            .name("string")
            .slbId("string")
            .specification("string")
            .build())
        .build());
    
    k8s_slb_attachment_resource = alicloud.edas.K8sSlbAttachment("k8sSlbAttachmentResource",
        app_id="string",
        slb_configs=[alicloud.edas.K8sSlbAttachmentSlbConfigArgs(
            port_mappings=[alicloud.edas.K8sSlbAttachmentSlbConfigPortMappingArgs(
                loadbalancer_protocol="string",
                service_port=alicloud.edas.K8sSlbAttachmentSlbConfigPortMappingServicePortArgs(
                    port=0,
                    protocol="string",
                    target_port=0,
                ),
                cert_id="string",
            )],
            scheduler="string",
            type="string",
            name="string",
            slb_id="string",
            specification="string",
        )])
    
    const k8sSlbAttachmentResource = new alicloud.edas.K8sSlbAttachment("k8sSlbAttachmentResource", {
        appId: "string",
        slbConfigs: [{
            portMappings: [{
                loadbalancerProtocol: "string",
                servicePort: {
                    port: 0,
                    protocol: "string",
                    targetPort: 0,
                },
                certId: "string",
            }],
            scheduler: "string",
            type: "string",
            name: "string",
            slbId: "string",
            specification: "string",
        }],
    });
    
    type: alicloud:edas:K8sSlbAttachment
    properties:
        appId: string
        slbConfigs:
            - name: string
              portMappings:
                - certId: string
                  loadbalancerProtocol: string
                  servicePort:
                    port: 0
                    protocol: string
                    targetPort: 0
              scheduler: string
              slbId: string
              specification: string
              type: string
    

    K8sSlbAttachment 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 K8sSlbAttachment resource accepts the following input properties:

    AppId string
    The ID of the EDAS k8s application to which you want to bind SLB instances.
    SlbConfigs List<Pulumi.AliCloud.Edas.Inputs.K8sSlbAttachmentSlbConfig>
    The configurations of SLB attachment, which is supported for multiple configurations. See slb_configs below.
    AppId string
    The ID of the EDAS k8s application to which you want to bind SLB instances.
    SlbConfigs []K8sSlbAttachmentSlbConfigArgs
    The configurations of SLB attachment, which is supported for multiple configurations. See slb_configs below.
    appId String
    The ID of the EDAS k8s application to which you want to bind SLB instances.
    slbConfigs List<K8sSlbAttachmentSlbConfig>
    The configurations of SLB attachment, which is supported for multiple configurations. See slb_configs below.
    appId string
    The ID of the EDAS k8s application to which you want to bind SLB instances.
    slbConfigs K8sSlbAttachmentSlbConfig[]
    The configurations of SLB attachment, which is supported for multiple configurations. See slb_configs below.
    app_id str
    The ID of the EDAS k8s application to which you want to bind SLB instances.
    slb_configs Sequence[K8sSlbAttachmentSlbConfigArgs]
    The configurations of SLB attachment, which is supported for multiple configurations. See slb_configs below.
    appId String
    The ID of the EDAS k8s application to which you want to bind SLB instances.
    slbConfigs List<Property Map>
    The configurations of SLB attachment, which is supported for multiple configurations. See slb_configs below.

    Outputs

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

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

    Look up Existing K8sSlbAttachment Resource

    Get an existing K8sSlbAttachment 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?: K8sSlbAttachmentState, opts?: CustomResourceOptions): K8sSlbAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_id: Optional[str] = None,
            slb_configs: Optional[Sequence[K8sSlbAttachmentSlbConfigArgs]] = None) -> K8sSlbAttachment
    func GetK8sSlbAttachment(ctx *Context, name string, id IDInput, state *K8sSlbAttachmentState, opts ...ResourceOption) (*K8sSlbAttachment, error)
    public static K8sSlbAttachment Get(string name, Input<string> id, K8sSlbAttachmentState? state, CustomResourceOptions? opts = null)
    public static K8sSlbAttachment get(String name, Output<String> id, K8sSlbAttachmentState 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:
    AppId string
    The ID of the EDAS k8s application to which you want to bind SLB instances.
    SlbConfigs List<Pulumi.AliCloud.Edas.Inputs.K8sSlbAttachmentSlbConfig>
    The configurations of SLB attachment, which is supported for multiple configurations. See slb_configs below.
    AppId string
    The ID of the EDAS k8s application to which you want to bind SLB instances.
    SlbConfigs []K8sSlbAttachmentSlbConfigArgs
    The configurations of SLB attachment, which is supported for multiple configurations. See slb_configs below.
    appId String
    The ID of the EDAS k8s application to which you want to bind SLB instances.
    slbConfigs List<K8sSlbAttachmentSlbConfig>
    The configurations of SLB attachment, which is supported for multiple configurations. See slb_configs below.
    appId string
    The ID of the EDAS k8s application to which you want to bind SLB instances.
    slbConfigs K8sSlbAttachmentSlbConfig[]
    The configurations of SLB attachment, which is supported for multiple configurations. See slb_configs below.
    app_id str
    The ID of the EDAS k8s application to which you want to bind SLB instances.
    slb_configs Sequence[K8sSlbAttachmentSlbConfigArgs]
    The configurations of SLB attachment, which is supported for multiple configurations. See slb_configs below.
    appId String
    The ID of the EDAS k8s application to which you want to bind SLB instances.
    slbConfigs List<Property Map>
    The configurations of SLB attachment, which is supported for multiple configurations. See slb_configs below.

    Supporting Types

    K8sSlbAttachmentSlbConfig, K8sSlbAttachmentSlbConfigArgs

    PortMappings List<Pulumi.AliCloud.Edas.Inputs.K8sSlbAttachmentSlbConfigPortMapping>
    The port configuration for SLB instance, which is supported for multiple configurations. See port_mappings below.
    Scheduler string
    The scheduler policy of SLB configuration, values can be 'rr'(round-robin) or 'wrr'(weighted round-robin).
    Type string
    The type of SLB instance, values can be 'internet' or 'intranet'.
    Name string
    The name of this SLB configuration, empty for auto-generated by EDAS server.
    SlbId string
    The ID of your SLB instance, if value is empty which means EDAS will purchase an SLB instance with 'specification' field.
    Specification string
    The instance specification of SLB, values can be found here, empty for 'slb.s1.small'.
    PortMappings []K8sSlbAttachmentSlbConfigPortMapping
    The port configuration for SLB instance, which is supported for multiple configurations. See port_mappings below.
    Scheduler string
    The scheduler policy of SLB configuration, values can be 'rr'(round-robin) or 'wrr'(weighted round-robin).
    Type string
    The type of SLB instance, values can be 'internet' or 'intranet'.
    Name string
    The name of this SLB configuration, empty for auto-generated by EDAS server.
    SlbId string
    The ID of your SLB instance, if value is empty which means EDAS will purchase an SLB instance with 'specification' field.
    Specification string
    The instance specification of SLB, values can be found here, empty for 'slb.s1.small'.
    portMappings List<K8sSlbAttachmentSlbConfigPortMapping>
    The port configuration for SLB instance, which is supported for multiple configurations. See port_mappings below.
    scheduler String
    The scheduler policy of SLB configuration, values can be 'rr'(round-robin) or 'wrr'(weighted round-robin).
    type String
    The type of SLB instance, values can be 'internet' or 'intranet'.
    name String
    The name of this SLB configuration, empty for auto-generated by EDAS server.
    slbId String
    The ID of your SLB instance, if value is empty which means EDAS will purchase an SLB instance with 'specification' field.
    specification String
    The instance specification of SLB, values can be found here, empty for 'slb.s1.small'.
    portMappings K8sSlbAttachmentSlbConfigPortMapping[]
    The port configuration for SLB instance, which is supported for multiple configurations. See port_mappings below.
    scheduler string
    The scheduler policy of SLB configuration, values can be 'rr'(round-robin) or 'wrr'(weighted round-robin).
    type string
    The type of SLB instance, values can be 'internet' or 'intranet'.
    name string
    The name of this SLB configuration, empty for auto-generated by EDAS server.
    slbId string
    The ID of your SLB instance, if value is empty which means EDAS will purchase an SLB instance with 'specification' field.
    specification string
    The instance specification of SLB, values can be found here, empty for 'slb.s1.small'.
    port_mappings Sequence[K8sSlbAttachmentSlbConfigPortMapping]
    The port configuration for SLB instance, which is supported for multiple configurations. See port_mappings below.
    scheduler str
    The scheduler policy of SLB configuration, values can be 'rr'(round-robin) or 'wrr'(weighted round-robin).
    type str
    The type of SLB instance, values can be 'internet' or 'intranet'.
    name str
    The name of this SLB configuration, empty for auto-generated by EDAS server.
    slb_id str
    The ID of your SLB instance, if value is empty which means EDAS will purchase an SLB instance with 'specification' field.
    specification str
    The instance specification of SLB, values can be found here, empty for 'slb.s1.small'.
    portMappings List<Property Map>
    The port configuration for SLB instance, which is supported for multiple configurations. See port_mappings below.
    scheduler String
    The scheduler policy of SLB configuration, values can be 'rr'(round-robin) or 'wrr'(weighted round-robin).
    type String
    The type of SLB instance, values can be 'internet' or 'intranet'.
    name String
    The name of this SLB configuration, empty for auto-generated by EDAS server.
    slbId String
    The ID of your SLB instance, if value is empty which means EDAS will purchase an SLB instance with 'specification' field.
    specification String
    The instance specification of SLB, values can be found here, empty for 'slb.s1.small'.

    K8sSlbAttachmentSlbConfigPortMapping, K8sSlbAttachmentSlbConfigPortMappingArgs

    K8sSlbAttachmentSlbConfigPortMappingServicePort, K8sSlbAttachmentSlbConfigPortMappingServicePortArgs

    Port int
    Protocol string
    TargetPort int
    Port int
    Protocol string
    TargetPort int
    port Integer
    protocol String
    targetPort Integer
    port number
    protocol string
    targetPort number
    port Number
    protocol String
    targetPort Number

    Import

    Slb information of EDAS k8s application can be imported using the ID of an EDAS k8s application. e.g.

    $ pulumi import alicloud:edas/k8sSlbAttachment:K8sSlbAttachment example <EDAS k8s app id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.54.0 published on Wednesday, Apr 24, 2024 by Pulumi