1. Packages
  2. Volcengine
  3. API Docs
  4. clb
  5. Acl
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

volcengine.clb.Acl

Explore with Pulumi AI

Provides a resource to manage acl

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";

const foo = new volcengine.clb.Acl("foo", {
    aclEntries: [
        {
            description: "e1",
            entry: "172.20.1.0/24",
        },
        {
            description: "e3",
            entry: "172.20.3.0/24",
        },
    ],
    aclName: "tf-test-2",
    projectName: "default",
});
Copy
import pulumi
import pulumi_volcengine as volcengine

foo = volcengine.clb.Acl("foo",
    acl_entries=[
        volcengine.clb.AclAclEntryArgs(
            description="e1",
            entry="172.20.1.0/24",
        ),
        volcengine.clb.AclAclEntryArgs(
            description="e3",
            entry="172.20.3.0/24",
        ),
    ],
    acl_name="tf-test-2",
    project_name="default")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/clb"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := clb.NewAcl(ctx, "foo", &clb.AclArgs{
			AclEntries: clb.AclAclEntryArray{
				&clb.AclAclEntryArgs{
					Description: pulumi.String("e1"),
					Entry:       pulumi.String("172.20.1.0/24"),
				},
				&clb.AclAclEntryArgs{
					Description: pulumi.String("e3"),
					Entry:       pulumi.String("172.20.3.0/24"),
				},
			},
			AclName:     pulumi.String("tf-test-2"),
			ProjectName: pulumi.String("default"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;

return await Deployment.RunAsync(() => 
{
    var foo = new Volcengine.Clb.Acl("foo", new()
    {
        AclEntries = new[]
        {
            new Volcengine.Clb.Inputs.AclAclEntryArgs
            {
                Description = "e1",
                Entry = "172.20.1.0/24",
            },
            new Volcengine.Clb.Inputs.AclAclEntryArgs
            {
                Description = "e3",
                Entry = "172.20.3.0/24",
            },
        },
        AclName = "tf-test-2",
        ProjectName = "default",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.clb.Acl;
import com.pulumi.volcengine.clb.AclArgs;
import com.pulumi.volcengine.clb.inputs.AclAclEntryArgs;
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 foo = new Acl("foo", AclArgs.builder()        
            .aclEntries(            
                AclAclEntryArgs.builder()
                    .description("e1")
                    .entry("172.20.1.0/24")
                    .build(),
                AclAclEntryArgs.builder()
                    .description("e3")
                    .entry("172.20.3.0/24")
                    .build())
            .aclName("tf-test-2")
            .projectName("default")
            .build());

    }
}
Copy
resources:
  foo:
    type: volcengine:clb:Acl
    properties:
      aclEntries:
        - description: e1
          entry: 172.20.1.0/24
        - description: e3
          entry: 172.20.3.0/24
      aclName: tf-test-2
      projectName: default
Copy

Create Acl Resource

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

Constructor syntax

new Acl(name: string, args?: AclArgs, opts?: CustomResourceOptions);
@overload
def Acl(resource_name: str,
        args: Optional[AclArgs] = None,
        opts: Optional[ResourceOptions] = None)

@overload
def Acl(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        acl_entries: Optional[Sequence[AclAclEntryArgs]] = None,
        acl_name: Optional[str] = None,
        description: Optional[str] = None,
        project_name: Optional[str] = None)
func NewAcl(ctx *Context, name string, args *AclArgs, opts ...ResourceOption) (*Acl, error)
public Acl(string name, AclArgs? args = null, CustomResourceOptions? opts = null)
public Acl(String name, AclArgs args)
public Acl(String name, AclArgs args, CustomResourceOptions options)
type: volcengine:clb:Acl
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args AclArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args AclArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args AclArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args AclArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AclArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

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

var volcengineAclResource = new Volcengine.Clb.Acl("volcengineAclResource", new()
{
    AclEntries = new[]
    {
        new Volcengine.Clb.Inputs.AclAclEntryArgs
        {
            Entry = "string",
            Description = "string",
        },
    },
    AclName = "string",
    Description = "string",
    ProjectName = "string",
});
Copy
example, err := clb.NewAcl(ctx, "volcengineAclResource", &clb.AclArgs{
	AclEntries: clb.AclAclEntryArray{
		&clb.AclAclEntryArgs{
			Entry:       pulumi.String("string"),
			Description: pulumi.String("string"),
		},
	},
	AclName:     pulumi.String("string"),
	Description: pulumi.String("string"),
	ProjectName: pulumi.String("string"),
})
Copy
var volcengineAclResource = new Acl("volcengineAclResource", AclArgs.builder()
    .aclEntries(AclAclEntryArgs.builder()
        .entry("string")
        .description("string")
        .build())
    .aclName("string")
    .description("string")
    .projectName("string")
    .build());
Copy
volcengine_acl_resource = volcengine.clb.Acl("volcengineAclResource",
    acl_entries=[{
        "entry": "string",
        "description": "string",
    }],
    acl_name="string",
    description="string",
    project_name="string")
Copy
const volcengineAclResource = new volcengine.clb.Acl("volcengineAclResource", {
    aclEntries: [{
        entry: "string",
        description: "string",
    }],
    aclName: "string",
    description: "string",
    projectName: "string",
});
Copy
type: volcengine:clb:Acl
properties:
    aclEntries:
        - description: string
          entry: string
    aclName: string
    description: string
    projectName: string
Copy

Acl Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Acl resource accepts the following input properties:

AclEntries List<AclAclEntry>
The acl entry set of the Acl.
AclName string
The name of Acl.
Description string
The description of the Acl.
ProjectName string
The ProjectName of the Acl.
AclEntries []AclAclEntryArgs
The acl entry set of the Acl.
AclName string
The name of Acl.
Description string
The description of the Acl.
ProjectName string
The ProjectName of the Acl.
aclEntries List<AclAclEntry>
The acl entry set of the Acl.
aclName String
The name of Acl.
description String
The description of the Acl.
projectName String
The ProjectName of the Acl.
aclEntries AclAclEntry[]
The acl entry set of the Acl.
aclName string
The name of Acl.
description string
The description of the Acl.
projectName string
The ProjectName of the Acl.
acl_entries Sequence[AclAclEntryArgs]
The acl entry set of the Acl.
acl_name str
The name of Acl.
description str
The description of the Acl.
project_name str
The ProjectName of the Acl.
aclEntries List<Property Map>
The acl entry set of the Acl.
aclName String
The name of Acl.
description String
The description of the Acl.
projectName String
The ProjectName of the Acl.

Outputs

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

CreateTime string
Create time of Acl.
Id string
The provider-assigned unique ID for this managed resource.
CreateTime string
Create time of Acl.
Id string
The provider-assigned unique ID for this managed resource.
createTime String
Create time of Acl.
id String
The provider-assigned unique ID for this managed resource.
createTime string
Create time of Acl.
id string
The provider-assigned unique ID for this managed resource.
create_time str
Create time of Acl.
id str
The provider-assigned unique ID for this managed resource.
createTime String
Create time of Acl.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Acl Resource

Get an existing Acl 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?: AclState, opts?: CustomResourceOptions): Acl
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        acl_entries: Optional[Sequence[AclAclEntryArgs]] = None,
        acl_name: Optional[str] = None,
        create_time: Optional[str] = None,
        description: Optional[str] = None,
        project_name: Optional[str] = None) -> Acl
func GetAcl(ctx *Context, name string, id IDInput, state *AclState, opts ...ResourceOption) (*Acl, error)
public static Acl Get(string name, Input<string> id, AclState? state, CustomResourceOptions? opts = null)
public static Acl get(String name, Output<String> id, AclState state, CustomResourceOptions options)
resources:  _:    type: volcengine:clb:Acl    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AclEntries List<AclAclEntry>
The acl entry set of the Acl.
AclName string
The name of Acl.
CreateTime string
Create time of Acl.
Description string
The description of the Acl.
ProjectName string
The ProjectName of the Acl.
AclEntries []AclAclEntryArgs
The acl entry set of the Acl.
AclName string
The name of Acl.
CreateTime string
Create time of Acl.
Description string
The description of the Acl.
ProjectName string
The ProjectName of the Acl.
aclEntries List<AclAclEntry>
The acl entry set of the Acl.
aclName String
The name of Acl.
createTime String
Create time of Acl.
description String
The description of the Acl.
projectName String
The ProjectName of the Acl.
aclEntries AclAclEntry[]
The acl entry set of the Acl.
aclName string
The name of Acl.
createTime string
Create time of Acl.
description string
The description of the Acl.
projectName string
The ProjectName of the Acl.
acl_entries Sequence[AclAclEntryArgs]
The acl entry set of the Acl.
acl_name str
The name of Acl.
create_time str
Create time of Acl.
description str
The description of the Acl.
project_name str
The ProjectName of the Acl.
aclEntries List<Property Map>
The acl entry set of the Acl.
aclName String
The name of Acl.
createTime String
Create time of Acl.
description String
The description of the Acl.
projectName String
The ProjectName of the Acl.

Supporting Types

AclAclEntry
, AclAclEntryArgs

Entry This property is required. string
The content of the AclEntry.
Description string
The description of the AclEntry.
Entry This property is required. string
The content of the AclEntry.
Description string
The description of the AclEntry.
entry This property is required. String
The content of the AclEntry.
description String
The description of the AclEntry.
entry This property is required. string
The content of the AclEntry.
description string
The description of the AclEntry.
entry This property is required. str
The content of the AclEntry.
description str
The description of the AclEntry.
entry This property is required. String
The content of the AclEntry.
description String
The description of the AclEntry.

Import

Acl can be imported using the id, e.g.

$ pulumi import volcengine:clb/acl:Acl default acl-mizl7m1kqccg5smt1bdpijuj
Copy

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

Package Details

Repository
volcengine volcengine/pulumi-volcengine
License
Apache-2.0
Notes
This Pulumi package is based on the volcengine Terraform Provider.