Alibaba Cloud v3.63.0 published on Monday, Sep 30, 2024 by Pulumi
alicloud.vpc.getNetworkAcls
Explore with Pulumi AI
This data source provides the Network Acls of the current Alibaba Cloud user.
NOTE: Available in v1.122.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.vpc.getNetworkAcls({
ids: ["example_value"],
nameRegex: "the_resource_name",
});
export const firstNetworkAclId = example.then(example => example.acls?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.vpc.get_network_acls(ids=["example_value"],
name_regex="the_resource_name")
pulumi.export("firstNetworkAclId", example.acls[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := vpc.GetNetworkAcls(ctx, &vpc.GetNetworkAclsArgs{
Ids: []string{
"example_value",
},
NameRegex: pulumi.StringRef("the_resource_name"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstNetworkAclId", example.Acls[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.Vpc.GetNetworkAcls.Invoke(new()
{
Ids = new[]
{
"example_value",
},
NameRegex = "the_resource_name",
});
return new Dictionary<string, object?>
{
["firstNetworkAclId"] = example.Apply(getNetworkAclsResult => getNetworkAclsResult.Acls[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetNetworkAclsArgs;
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 example = VpcFunctions.getNetworkAcls(GetNetworkAclsArgs.builder()
.ids("example_value")
.nameRegex("the_resource_name")
.build());
ctx.export("firstNetworkAclId", example.applyValue(getNetworkAclsResult -> getNetworkAclsResult.acls()[0].id()));
}
}
variables:
example:
fn::invoke:
Function: alicloud:vpc:getNetworkAcls
Arguments:
ids:
- example_value
nameRegex: the_resource_name
outputs:
firstNetworkAclId: ${example.acls[0].id}
Using getNetworkAcls
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 getNetworkAcls(args: GetNetworkAclsArgs, opts?: InvokeOptions): Promise<GetNetworkAclsResult>
function getNetworkAclsOutput(args: GetNetworkAclsOutputArgs, opts?: InvokeOptions): Output<GetNetworkAclsResult>
def get_network_acls(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
network_acl_name: Optional[str] = None,
output_file: Optional[str] = None,
resource_id: Optional[str] = None,
resource_type: Optional[str] = None,
status: Optional[str] = None,
vpc_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNetworkAclsResult
def get_network_acls_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
network_acl_name: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
resource_id: Optional[pulumi.Input[str]] = None,
resource_type: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
vpc_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNetworkAclsResult]
func GetNetworkAcls(ctx *Context, args *GetNetworkAclsArgs, opts ...InvokeOption) (*GetNetworkAclsResult, error)
func GetNetworkAclsOutput(ctx *Context, args *GetNetworkAclsOutputArgs, opts ...InvokeOption) GetNetworkAclsResultOutput
> Note: This function is named GetNetworkAcls
in the Go SDK.
public static class GetNetworkAcls
{
public static Task<GetNetworkAclsResult> InvokeAsync(GetNetworkAclsArgs args, InvokeOptions? opts = null)
public static Output<GetNetworkAclsResult> Invoke(GetNetworkAclsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkAclsResult> getNetworkAcls(GetNetworkAclsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:vpc/getNetworkAcls:getNetworkAcls
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Network Acl ID.
- Name
Regex string - A regex string to filter results by Network Acl name.
- Network
Acl stringName - The name of the network ACL.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Resource
Id string - The ID of the associated resource.
- Resource
Type string - The type of the associated resource. Valid values
VSwitch
.resource_type
andresource_id
need to be specified at the same time to take effect. - Status string
- The state of the network ACL. Valid values:
Available
andModifying
. - Vpc
Id string - The ID of the associated VPC.
- Ids []string
- A list of Network Acl ID.
- Name
Regex string - A regex string to filter results by Network Acl name.
- Network
Acl stringName - The name of the network ACL.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Resource
Id string - The ID of the associated resource.
- Resource
Type string - The type of the associated resource. Valid values
VSwitch
.resource_type
andresource_id
need to be specified at the same time to take effect. - Status string
- The state of the network ACL. Valid values:
Available
andModifying
. - Vpc
Id string - The ID of the associated VPC.
- ids List<String>
- A list of Network Acl ID.
- name
Regex String - A regex string to filter results by Network Acl name.
- network
Acl StringName - The name of the network ACL.
- output
File String - File name where to save data source results (after running
pulumi preview
). - resource
Id String - The ID of the associated resource.
- resource
Type String - The type of the associated resource. Valid values
VSwitch
.resource_type
andresource_id
need to be specified at the same time to take effect. - status String
- The state of the network ACL. Valid values:
Available
andModifying
. - vpc
Id String - The ID of the associated VPC.
- ids string[]
- A list of Network Acl ID.
- name
Regex string - A regex string to filter results by Network Acl name.
- network
Acl stringName - The name of the network ACL.
- output
File string - File name where to save data source results (after running
pulumi preview
). - resource
Id string - The ID of the associated resource.
- resource
Type string - The type of the associated resource. Valid values
VSwitch
.resource_type
andresource_id
need to be specified at the same time to take effect. - status string
- The state of the network ACL. Valid values:
Available
andModifying
. - vpc
Id string - The ID of the associated VPC.
- ids Sequence[str]
- A list of Network Acl ID.
- name_
regex str - A regex string to filter results by Network Acl name.
- network_
acl_ strname - The name of the network ACL.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - resource_
id str - The ID of the associated resource.
- resource_
type str - The type of the associated resource. Valid values
VSwitch
.resource_type
andresource_id
need to be specified at the same time to take effect. - status str
- The state of the network ACL. Valid values:
Available
andModifying
. - vpc_
id str - The ID of the associated VPC.
- ids List<String>
- A list of Network Acl ID.
- name
Regex String - A regex string to filter results by Network Acl name.
- network
Acl StringName - The name of the network ACL.
- output
File String - File name where to save data source results (after running
pulumi preview
). - resource
Id String - The ID of the associated resource.
- resource
Type String - The type of the associated resource. Valid values
VSwitch
.resource_type
andresource_id
need to be specified at the same time to take effect. - status String
- The state of the network ACL. Valid values:
Available
andModifying
. - vpc
Id String - The ID of the associated VPC.
getNetworkAcls Result
The following output properties are available:
- Acls
List<Pulumi.
Ali Cloud. Vpc. Outputs. Get Network Acls Acl> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Name
Regex string - Network
Acl stringName - Output
File string - Resource
Id string - Resource
Type string - Status string
- Vpc
Id string
- Acls
[]Get
Network Acls Acl - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Name
Regex string - Network
Acl stringName - Output
File string - Resource
Id string - Resource
Type string - Status string
- Vpc
Id string
- acls
List<Get
Network Acls Acl> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- name
Regex String - network
Acl StringName - output
File String - resource
Id String - resource
Type String - status String
- vpc
Id String
- acls
Get
Network Acls Acl[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- name
Regex string - network
Acl stringName - output
File string - resource
Id string - resource
Type string - status string
- vpc
Id string
- acls
Sequence[Get
Network Acls Acl] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- name_
regex str - network_
acl_ strname - output_
file str - resource_
id str - resource_
type str - status str
- vpc_
id str
- acls List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- name
Regex String - network
Acl StringName - output
File String - resource
Id String - resource
Type String - status String
- vpc
Id String
Supporting Types
GetNetworkAclsAcl
- Description string
- Description of network ACL information.
- Egress
Acl List<Pulumi.Entries Ali Cloud. Vpc. Inputs. Get Network Acls Acl Egress Acl Entry> - Output direction rule information.
- Id string
- The ID of the Network Acl.
- Ingress
Acl List<Pulumi.Entries Ali Cloud. Vpc. Inputs. Get Network Acls Acl Ingress Acl Entry> - Entry direction rule information.
- Network
Acl stringId - The first ID of the resource.
- Network
Acl stringName - The name of the network ACL.
- Resources
List<Pulumi.
Ali Cloud. Vpc. Inputs. Get Network Acls Acl Resource> - The associated resource.
- Status string
- The state of the network ACL.
- Vpc
Id string - The ID of the associated VPC.
- Description string
- Description of network ACL information.
- Egress
Acl []GetEntries Network Acls Acl Egress Acl Entry - Output direction rule information.
- Id string
- The ID of the Network Acl.
- Ingress
Acl []GetEntries Network Acls Acl Ingress Acl Entry - Entry direction rule information.
- Network
Acl stringId - The first ID of the resource.
- Network
Acl stringName - The name of the network ACL.
- Resources
[]Get
Network Acls Acl Resource - The associated resource.
- Status string
- The state of the network ACL.
- Vpc
Id string - The ID of the associated VPC.
- description String
- Description of network ACL information.
- egress
Acl List<GetEntries Network Acls Acl Egress Acl Entry> - Output direction rule information.
- id String
- The ID of the Network Acl.
- ingress
Acl List<GetEntries Network Acls Acl Ingress Acl Entry> - Entry direction rule information.
- network
Acl StringId - The first ID of the resource.
- network
Acl StringName - The name of the network ACL.
- resources
List<Get
Network Acls Acl Resource> - The associated resource.
- status String
- The state of the network ACL.
- vpc
Id String - The ID of the associated VPC.
- description string
- Description of network ACL information.
- egress
Acl GetEntries Network Acls Acl Egress Acl Entry[] - Output direction rule information.
- id string
- The ID of the Network Acl.
- ingress
Acl GetEntries Network Acls Acl Ingress Acl Entry[] - Entry direction rule information.
- network
Acl stringId - The first ID of the resource.
- network
Acl stringName - The name of the network ACL.
- resources
Get
Network Acls Acl Resource[] - The associated resource.
- status string
- The state of the network ACL.
- vpc
Id string - The ID of the associated VPC.
- description str
- Description of network ACL information.
- egress_
acl_ Sequence[Getentries Network Acls Acl Egress Acl Entry] - Output direction rule information.
- id str
- The ID of the Network Acl.
- ingress_
acl_ Sequence[Getentries Network Acls Acl Ingress Acl Entry] - Entry direction rule information.
- network_
acl_ strid - The first ID of the resource.
- network_
acl_ strname - The name of the network ACL.
- resources
Sequence[Get
Network Acls Acl Resource] - The associated resource.
- status str
- The state of the network ACL.
- vpc_
id str - The ID of the associated VPC.
- description String
- Description of network ACL information.
- egress
Acl List<Property Map>Entries - Output direction rule information.
- id String
- The ID of the Network Acl.
- ingress
Acl List<Property Map>Entries - Entry direction rule information.
- network
Acl StringId - The first ID of the resource.
- network
Acl StringName - The name of the network ACL.
- resources List<Property Map>
- The associated resource.
- status String
- The state of the network ACL.
- vpc
Id String - The ID of the associated VPC.
GetNetworkAclsAclEgressAclEntry
- Description string
- Give the description information of the direction rule.
- Destination
Cidr stringIp - The destination address segment.
- Network
Acl stringEntry Name - The name of the entry for the direction rule.
- Policy string
- The authorization policy.
- Port string
- Destination port range.
- Protocol string
- Transport layer protocol.
- Description string
- Give the description information of the direction rule.
- Destination
Cidr stringIp - The destination address segment.
- Network
Acl stringEntry Name - The name of the entry for the direction rule.
- Policy string
- The authorization policy.
- Port string
- Destination port range.
- Protocol string
- Transport layer protocol.
- description String
- Give the description information of the direction rule.
- destination
Cidr StringIp - The destination address segment.
- network
Acl StringEntry Name - The name of the entry for the direction rule.
- policy String
- The authorization policy.
- port String
- Destination port range.
- protocol String
- Transport layer protocol.
- description string
- Give the description information of the direction rule.
- destination
Cidr stringIp - The destination address segment.
- network
Acl stringEntry Name - The name of the entry for the direction rule.
- policy string
- The authorization policy.
- port string
- Destination port range.
- protocol string
- Transport layer protocol.
- description str
- Give the description information of the direction rule.
- destination_
cidr_ strip - The destination address segment.
- network_
acl_ strentry_ name - The name of the entry for the direction rule.
- policy str
- The authorization policy.
- port str
- Destination port range.
- protocol str
- Transport layer protocol.
- description String
- Give the description information of the direction rule.
- destination
Cidr StringIp - The destination address segment.
- network
Acl StringEntry Name - The name of the entry for the direction rule.
- policy String
- The authorization policy.
- port String
- Destination port range.
- protocol String
- Transport layer protocol.
GetNetworkAclsAclIngressAclEntry
- Description string
- Description of the entry direction rule.
- Network
Acl stringEntry Name - The name of the entry direction rule entry.
- Policy string
- The authorization policy.
- Port string
- Source port range.
- Protocol string
- Transport layer protocol.
- Source
Cidr stringIp - The source address field.
- Description string
- Description of the entry direction rule.
- Network
Acl stringEntry Name - The name of the entry direction rule entry.
- Policy string
- The authorization policy.
- Port string
- Source port range.
- Protocol string
- Transport layer protocol.
- Source
Cidr stringIp - The source address field.
- description String
- Description of the entry direction rule.
- network
Acl StringEntry Name - The name of the entry direction rule entry.
- policy String
- The authorization policy.
- port String
- Source port range.
- protocol String
- Transport layer protocol.
- source
Cidr StringIp - The source address field.
- description string
- Description of the entry direction rule.
- network
Acl stringEntry Name - The name of the entry direction rule entry.
- policy string
- The authorization policy.
- port string
- Source port range.
- protocol string
- Transport layer protocol.
- source
Cidr stringIp - The source address field.
- description str
- Description of the entry direction rule.
- network_
acl_ strentry_ name - The name of the entry direction rule entry.
- policy str
- The authorization policy.
- port str
- Source port range.
- protocol str
- Transport layer protocol.
- source_
cidr_ strip - The source address field.
- description String
- Description of the entry direction rule.
- network
Acl StringEntry Name - The name of the entry direction rule entry.
- policy String
- The authorization policy.
- port String
- Source port range.
- protocol String
- Transport layer protocol.
- source
Cidr StringIp - The source address field.
GetNetworkAclsAclResource
- Resource
Id string - The ID of the associated resource.
- Resource
Type string - The type of the associated resource.
- Status string
- The state of the associated resource.
- Resource
Id string - The ID of the associated resource.
- Resource
Type string - The type of the associated resource.
- Status string
- The state of the associated resource.
- resource
Id String - The ID of the associated resource.
- resource
Type String - The type of the associated resource.
- status String
- The state of the associated resource.
- resource
Id string - The ID of the associated resource.
- resource
Type string - The type of the associated resource.
- status string
- The state of the associated resource.
- resource_
id str - The ID of the associated resource.
- resource_
type str - The type of the associated resource.
- status str
- The state of the associated resource.
- resource
Id String - The ID of the associated resource.
- resource
Type String - The type of the associated resource.
- status String
- The state of the associated resource.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.