1. Packages
  2. Volcengine
  3. API Docs
  4. cr
  5. EndpointAclPolicy
Volcengine v0.0.31 published on Monday, May 12, 2025 by Volcengine

volcengine.cr.EndpointAclPolicy

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.31 published on Monday, May 12, 2025 by Volcengine

    Provides a resource to manage cr endpoint acl policy

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooRegistry = new volcengine.cr.Registry("fooRegistry", {project: "default"});
    const fooEndpoint = new volcengine.cr.Endpoint("fooEndpoint", {
        registry: fooRegistry.id,
        enabled: true,
    });
    const fooEndpointAclPolicy: volcengine.cr.EndpointAclPolicy[] = [];
    for (const range = {value: 0}; range.value < 3; range.value++) {
        fooEndpointAclPolicy.push(new volcengine.cr.EndpointAclPolicy(`fooEndpointAclPolicy-${range.value}`, {
            registry: fooEndpoint.registry,
            type: "Public",
            entry: `192.168.0.${range.value}`,
            description: `test-${range.value}`,
        }));
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_registry = volcengine.cr.Registry("fooRegistry", project="default")
    foo_endpoint = volcengine.cr.Endpoint("fooEndpoint",
        registry=foo_registry.id,
        enabled=True)
    foo_endpoint_acl_policy = []
    for range in [{"value": i} for i in range(0, 3)]:
        foo_endpoint_acl_policy.append(volcengine.cr.EndpointAclPolicy(f"fooEndpointAclPolicy-{range['value']}",
            registry=foo_endpoint.registry,
            type="Public",
            entry=f"192.168.0.{range['value']}",
            description=f"test-{range['value']}"))
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cr"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooRegistry, err := cr.NewRegistry(ctx, "fooRegistry", &cr.RegistryArgs{
    			Project: pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		fooEndpoint, err := cr.NewEndpoint(ctx, "fooEndpoint", &cr.EndpointArgs{
    			Registry: fooRegistry.ID(),
    			Enabled:  pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		var fooEndpointAclPolicy []*cr.EndpointAclPolicy
    		for index := 0; index < 3; index++ {
    			key0 := index
    			val0 := index
    			__res, err := cr.NewEndpointAclPolicy(ctx, fmt.Sprintf("fooEndpointAclPolicy-%v", key0), &cr.EndpointAclPolicyArgs{
    				Registry:    fooEndpoint.Registry,
    				Type:        pulumi.String("Public"),
    				Entry:       pulumi.String(fmt.Sprintf("192.168.0.%v", val0)),
    				Description: pulumi.String(fmt.Sprintf("test-%v", val0)),
    			})
    			if err != nil {
    				return err
    			}
    			fooEndpointAclPolicy = append(fooEndpointAclPolicy, __res)
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooRegistry = new Volcengine.Cr.Registry("fooRegistry", new()
        {
            Project = "default",
        });
    
        var fooEndpoint = new Volcengine.Cr.Endpoint("fooEndpoint", new()
        {
            Registry = fooRegistry.Id,
            Enabled = true,
        });
    
        var fooEndpointAclPolicy = new List<Volcengine.Cr.EndpointAclPolicy>();
        for (var rangeIndex = 0; rangeIndex < 3; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            fooEndpointAclPolicy.Add(new Volcengine.Cr.EndpointAclPolicy($"fooEndpointAclPolicy-{range.Value}", new()
            {
                Registry = fooEndpoint.Registry,
                Type = "Public",
                Entry = $"192.168.0.{range.Value}",
                Description = $"test-{range.Value}",
            }));
        }
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.cr.Registry;
    import com.pulumi.volcengine.cr.RegistryArgs;
    import com.pulumi.volcengine.cr.Endpoint;
    import com.pulumi.volcengine.cr.EndpointArgs;
    import com.pulumi.volcengine.cr.EndpointAclPolicy;
    import com.pulumi.volcengine.cr.EndpointAclPolicyArgs;
    import com.pulumi.codegen.internal.KeyedValue;
    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 fooRegistry = new Registry("fooRegistry", RegistryArgs.builder()        
                .project("default")
                .build());
    
            var fooEndpoint = new Endpoint("fooEndpoint", EndpointArgs.builder()        
                .registry(fooRegistry.id())
                .enabled(true)
                .build());
    
            for (var i = 0; i < 3; i++) {
                new EndpointAclPolicy("fooEndpointAclPolicy-" + i, EndpointAclPolicyArgs.builder()            
                    .registry(fooEndpoint.registry())
                    .type("Public")
                    .entry(String.format("192.168.0.%s", range.value()))
                    .description(String.format("test-%s", range.value()))
                    .build());
    
            
    }
        }
    }
    
    resources:
      fooRegistry:
        type: volcengine:cr:Registry
        properties:
          project: default
      fooEndpoint:
        type: volcengine:cr:Endpoint
        properties:
          registry: ${fooRegistry.id}
          enabled: true
      fooEndpointAclPolicy:
        type: volcengine:cr:EndpointAclPolicy
        properties:
          registry: ${fooEndpoint.registry}
          type: Public
          entry: 192.168.0.${range.value}
          description: test-${range.value}
        options: {}
    

    Create EndpointAclPolicy Resource

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

    Constructor syntax

    new EndpointAclPolicy(name: string, args: EndpointAclPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def EndpointAclPolicy(resource_name: str,
                          args: EndpointAclPolicyInitArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def EndpointAclPolicy(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          description: Optional[str] = None,
                          entry: Optional[str] = None,
                          registry: Optional[str] = None,
                          type: Optional[str] = None)
    func NewEndpointAclPolicy(ctx *Context, name string, args EndpointAclPolicyArgs, opts ...ResourceOption) (*EndpointAclPolicy, error)
    public EndpointAclPolicy(string name, EndpointAclPolicyArgs args, CustomResourceOptions? opts = null)
    public EndpointAclPolicy(String name, EndpointAclPolicyArgs args)
    public EndpointAclPolicy(String name, EndpointAclPolicyArgs args, CustomResourceOptions options)
    
    type: volcengine:cr:EndpointAclPolicy
    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 EndpointAclPolicyArgs
    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 EndpointAclPolicyInitArgs
    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 EndpointAclPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EndpointAclPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EndpointAclPolicyArgs
    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 endpointAclPolicyResource = new Volcengine.Cr.EndpointAclPolicy("endpointAclPolicyResource", new()
    {
        Description = "string",
        Entry = "string",
        Registry = "string",
        Type = "string",
    });
    
    example, err := cr.NewEndpointAclPolicy(ctx, "endpointAclPolicyResource", &cr.EndpointAclPolicyArgs{
    	Description: pulumi.String("string"),
    	Entry:       pulumi.String("string"),
    	Registry:    pulumi.String("string"),
    	Type:        pulumi.String("string"),
    })
    
    var endpointAclPolicyResource = new EndpointAclPolicy("endpointAclPolicyResource", EndpointAclPolicyArgs.builder()
        .description("string")
        .entry("string")
        .registry("string")
        .type("string")
        .build());
    
    endpoint_acl_policy_resource = volcengine.cr.EndpointAclPolicy("endpointAclPolicyResource",
        description="string",
        entry="string",
        registry="string",
        type="string")
    
    const endpointAclPolicyResource = new volcengine.cr.EndpointAclPolicy("endpointAclPolicyResource", {
        description: "string",
        entry: "string",
        registry: "string",
        type: "string",
    });
    
    type: volcengine:cr:EndpointAclPolicy
    properties:
        description: string
        entry: string
        registry: string
        type: string
    

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

    Description string
    The description of the acl policy.
    Entry string
    The ip list of the acl policy.
    Registry string
    The registry name.
    Type string
    The type of the acl policy. Valid values: Public.
    Description string
    The description of the acl policy.
    Entry string
    The ip list of the acl policy.
    Registry string
    The registry name.
    Type string
    The type of the acl policy. Valid values: Public.
    description String
    The description of the acl policy.
    entry String
    The ip list of the acl policy.
    registry String
    The registry name.
    type String
    The type of the acl policy. Valid values: Public.
    description string
    The description of the acl policy.
    entry string
    The ip list of the acl policy.
    registry string
    The registry name.
    type string
    The type of the acl policy. Valid values: Public.
    description str
    The description of the acl policy.
    entry str
    The ip list of the acl policy.
    registry str
    The registry name.
    type str
    The type of the acl policy. Valid values: Public.
    description String
    The description of the acl policy.
    entry String
    The ip list of the acl policy.
    registry String
    The registry name.
    type String
    The type of the acl policy. Valid values: Public.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EndpointAclPolicy 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 EndpointAclPolicy Resource

    Get an existing EndpointAclPolicy 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?: EndpointAclPolicyState, opts?: CustomResourceOptions): EndpointAclPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            entry: Optional[str] = None,
            registry: Optional[str] = None,
            type: Optional[str] = None) -> EndpointAclPolicy
    func GetEndpointAclPolicy(ctx *Context, name string, id IDInput, state *EndpointAclPolicyState, opts ...ResourceOption) (*EndpointAclPolicy, error)
    public static EndpointAclPolicy Get(string name, Input<string> id, EndpointAclPolicyState? state, CustomResourceOptions? opts = null)
    public static EndpointAclPolicy get(String name, Output<String> id, EndpointAclPolicyState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:cr:EndpointAclPolicy    get:      id: ${id}
    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:
    Description string
    The description of the acl policy.
    Entry string
    The ip list of the acl policy.
    Registry string
    The registry name.
    Type string
    The type of the acl policy. Valid values: Public.
    Description string
    The description of the acl policy.
    Entry string
    The ip list of the acl policy.
    Registry string
    The registry name.
    Type string
    The type of the acl policy. Valid values: Public.
    description String
    The description of the acl policy.
    entry String
    The ip list of the acl policy.
    registry String
    The registry name.
    type String
    The type of the acl policy. Valid values: Public.
    description string
    The description of the acl policy.
    entry string
    The ip list of the acl policy.
    registry string
    The registry name.
    type string
    The type of the acl policy. Valid values: Public.
    description str
    The description of the acl policy.
    entry str
    The ip list of the acl policy.
    registry str
    The registry name.
    type str
    The type of the acl policy. Valid values: Public.
    description String
    The description of the acl policy.
    entry String
    The ip list of the acl policy.
    registry String
    The registry name.
    type String
    The type of the acl policy. Valid values: Public.

    Import

    CrEndpointAclPolicy can be imported using the registry:entry, e.g.

    $ pulumi import volcengine:cr/endpointAclPolicy:EndpointAclPolicy default resource_id
    

    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.
    volcengine logo
    Volcengine v0.0.31 published on Monday, May 12, 2025 by Volcengine