get Network Acls
This data source provides the Network Acls of the current Alibaba Cloud user.
NOTE: Available in v1.122.0+.
Example Usage
Basic Usage
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()));
}
}
Content copied to clipboard
Return
A collection of values returned by getNetworkAcls.
Parameters
argument
A collection of arguments for invoking getNetworkAcls.
suspend fun getNetworkAcls(ids: List<String>? = null, nameRegex: String? = null, networkAclName: String? = null, outputFile: String? = null, resourceId: String? = null, resourceType: String? = null, status: String? = null, vpcId: String? = null): GetNetworkAclsResult
Return
A collection of values returned by getNetworkAcls.
See also
Parameters
ids
A list of Network Acl ID.
name Regex
A regex string to filter results by Network Acl name.
network Acl Name
The name of the network ACL.
output File
File name where to save data source results (after running pulumi preview
).
resource Id
The ID of the associated resource.
resource Type
The type of the associated resource.
status
The state of the network ACL.
vpc Id
The ID of the associated VPC.
suspend fun getNetworkAcls(argument: suspend GetNetworkAclsPlainArgsBuilder.() -> Unit): GetNetworkAclsResult
Return
A collection of values returned by getNetworkAcls.
See also
Parameters
argument
Builder for com.pulumi.alicloud.vpc.kotlin.inputs.GetNetworkAclsPlainArgs.