1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cr
  5. getEndpointAclPolicies
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.cr.getEndpointAclPolicies

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides the Cr Endpoint Acl Policies of the current Alibaba Cloud user.

    NOTE: Available in v1.139.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.cr.getEndpointAclPolicies({
        instanceId: "example_value",
        endpointType: "example_value",
        ids: [
            "example_value-1",
            "example_value-2",
        ],
    });
    export const crEndpointAclPolicyId1 = ids.then(ids => ids.policies?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.cr.get_endpoint_acl_policies(instance_id="example_value",
        endpoint_type="example_value",
        ids=[
            "example_value-1",
            "example_value-2",
        ])
    pulumi.export("crEndpointAclPolicyId1", ids.policies[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := cr.GetEndpointAclPolicies(ctx, &cr.GetEndpointAclPoliciesArgs{
    			InstanceId:   "example_value",
    			EndpointType: "example_value",
    			Ids: []string{
    				"example_value-1",
    				"example_value-2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("crEndpointAclPolicyId1", ids.Policies[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.CR.GetEndpointAclPolicies.Invoke(new()
        {
            InstanceId = "example_value",
            EndpointType = "example_value",
            Ids = new[]
            {
                "example_value-1",
                "example_value-2",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["crEndpointAclPolicyId1"] = ids.Apply(getEndpointAclPoliciesResult => getEndpointAclPoliciesResult.Policies[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cr.CrFunctions;
    import com.pulumi.alicloud.cr.inputs.GetEndpointAclPoliciesArgs;
    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 ids = CrFunctions.getEndpointAclPolicies(GetEndpointAclPoliciesArgs.builder()
                .instanceId("example_value")
                .endpointType("example_value")
                .ids(            
                    "example_value-1",
                    "example_value-2")
                .build());
    
            ctx.export("crEndpointAclPolicyId1", ids.applyValue(getEndpointAclPoliciesResult -> getEndpointAclPoliciesResult.policies()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:cr:getEndpointAclPolicies
          Arguments:
            instanceId: example_value
            endpointType: example_value
            ids:
              - example_value-1
              - example_value-2
    outputs:
      crEndpointAclPolicyId1: ${ids.policies[0].id}
    

    Using getEndpointAclPolicies

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getEndpointAclPolicies(args: GetEndpointAclPoliciesArgs, opts?: InvokeOptions): Promise<GetEndpointAclPoliciesResult>
    function getEndpointAclPoliciesOutput(args: GetEndpointAclPoliciesOutputArgs, opts?: InvokeOptions): Output<GetEndpointAclPoliciesResult>
    def get_endpoint_acl_policies(endpoint_type: Optional[str] = None,
                                  ids: Optional[Sequence[str]] = None,
                                  instance_id: Optional[str] = None,
                                  output_file: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetEndpointAclPoliciesResult
    def get_endpoint_acl_policies_output(endpoint_type: Optional[pulumi.Input[str]] = None,
                                  ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                  instance_id: Optional[pulumi.Input[str]] = None,
                                  output_file: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetEndpointAclPoliciesResult]
    func GetEndpointAclPolicies(ctx *Context, args *GetEndpointAclPoliciesArgs, opts ...InvokeOption) (*GetEndpointAclPoliciesResult, error)
    func GetEndpointAclPoliciesOutput(ctx *Context, args *GetEndpointAclPoliciesOutputArgs, opts ...InvokeOption) GetEndpointAclPoliciesResultOutput

    > Note: This function is named GetEndpointAclPolicies in the Go SDK.

    public static class GetEndpointAclPolicies 
    {
        public static Task<GetEndpointAclPoliciesResult> InvokeAsync(GetEndpointAclPoliciesArgs args, InvokeOptions? opts = null)
        public static Output<GetEndpointAclPoliciesResult> Invoke(GetEndpointAclPoliciesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEndpointAclPoliciesResult> getEndpointAclPolicies(GetEndpointAclPoliciesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cr/getEndpointAclPolicies:getEndpointAclPolicies
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EndpointType string
    The type of endpoint. Valid values: internet.
    InstanceId string
    The ID of the CR Instance.
    Ids List<string>
    A list of Endpoint Acl Policy IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    EndpointType string
    The type of endpoint. Valid values: internet.
    InstanceId string
    The ID of the CR Instance.
    Ids []string
    A list of Endpoint Acl Policy IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    endpointType String
    The type of endpoint. Valid values: internet.
    instanceId String
    The ID of the CR Instance.
    ids List<String>
    A list of Endpoint Acl Policy IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    endpointType string
    The type of endpoint. Valid values: internet.
    instanceId string
    The ID of the CR Instance.
    ids string[]
    A list of Endpoint Acl Policy IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    endpoint_type str
    The type of endpoint. Valid values: internet.
    instance_id str
    The ID of the CR Instance.
    ids Sequence[str]
    A list of Endpoint Acl Policy IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    endpointType String
    The type of endpoint. Valid values: internet.
    instanceId String
    The ID of the CR Instance.
    ids List<String>
    A list of Endpoint Acl Policy IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getEndpointAclPolicies Result

    The following output properties are available:

    EndpointType string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    InstanceId string
    Policies List<Pulumi.AliCloud.CR.Outputs.GetEndpointAclPoliciesPolicy>
    OutputFile string
    EndpointType string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    InstanceId string
    Policies []GetEndpointAclPoliciesPolicy
    OutputFile string
    endpointType String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instanceId String
    policies List<GetEndpointAclPoliciesPolicy>
    outputFile String
    endpointType string
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    instanceId string
    policies GetEndpointAclPoliciesPolicy[]
    outputFile string
    endpoint_type str
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    instance_id str
    policies Sequence[GetEndpointAclPoliciesPolicy]
    output_file str
    endpointType String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instanceId String
    policies List<Property Map>
    outputFile String

    Supporting Types

    GetEndpointAclPoliciesPolicy

    Description string
    The description of the entry.
    EndpointType string
    The type of endpoint.
    Entry string
    The IP segment that allowed to access.
    Id string
    The ID of the Endpoint Acl Policy.
    InstanceId string
    The ID of the CR Instance.
    Description string
    The description of the entry.
    EndpointType string
    The type of endpoint.
    Entry string
    The IP segment that allowed to access.
    Id string
    The ID of the Endpoint Acl Policy.
    InstanceId string
    The ID of the CR Instance.
    description String
    The description of the entry.
    endpointType String
    The type of endpoint.
    entry String
    The IP segment that allowed to access.
    id String
    The ID of the Endpoint Acl Policy.
    instanceId String
    The ID of the CR Instance.
    description string
    The description of the entry.
    endpointType string
    The type of endpoint.
    entry string
    The IP segment that allowed to access.
    id string
    The ID of the Endpoint Acl Policy.
    instanceId string
    The ID of the CR Instance.
    description str
    The description of the entry.
    endpoint_type str
    The type of endpoint.
    entry str
    The IP segment that allowed to access.
    id str
    The ID of the Endpoint Acl Policy.
    instance_id str
    The ID of the CR Instance.
    description String
    The description of the entry.
    endpointType String
    The type of endpoint.
    entry String
    The IP segment that allowed to access.
    id String
    The ID of the Endpoint Acl Policy.
    instanceId String
    The ID of the CR Instance.

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi