Alibaba Cloud

v3.15.0 published on Thursday, Jan 13, 2022 by Pulumi

getEndpointAclPolicies

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

NOTE: Available in v1.139.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.CR.GetEndpointAclPolicies.InvokeAsync(new AliCloud.CR.GetEndpointAclPoliciesArgs
        {
            InstanceId = "example_value",
            EndpointType = "example_value",
            Ids = 
            {
                "example_value-1",
                "example_value-2",
            },
        }));
        this.CrEndpointAclPolicyId1 = ids.Apply(ids => ids.Policies?[0]?.Id);
    }

    [Output("crEndpointAclPolicyId1")]
    public Output<string> CrEndpointAclPolicyId1 { get; set; }
}
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
	})
}
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)
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);

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)
}

The following arguments are supported:

EndpointType string
The type of endpoint.
InstanceId string
The ID of the CR Instance.
Ids List<string>
A list of Endpoint Acl Policy IDs.
OutputFile string
EndpointType string
The type of endpoint.
InstanceId string
The ID of the CR Instance.
Ids []string
A list of Endpoint Acl Policy IDs.
OutputFile string
endpointType string
The type of endpoint.
instanceId string
The ID of the CR Instance.
ids string[]
A list of Endpoint Acl Policy IDs.
outputFile string
endpoint_type str
The type of endpoint.
instance_id str
The ID of the CR Instance.
ids Sequence[str]
A list of Endpoint Acl Policy IDs.
output_file str

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 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

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 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.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.