1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ecs
  5. getEcsNetworkInterfacePermissions
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ecs.getEcsNetworkInterfacePermissions

Explore with Pulumi AI

This data source provides the Ecs Network Interface Permissions of the current Alibaba Cloud user.

NOTE: Available in v1.166.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.ecs.getEcsNetworkInterfacePermissions({
    ids: ["example_value"],
    networkInterfaceId: "example_value",
});
export const ecsNetworkInterfacePermissionId1 = ids.then(ids => ids.permissions?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.ecs.get_ecs_network_interface_permissions(ids=["example_value"],
    network_interface_id="example_value")
pulumi.export("ecsNetworkInterfacePermissionId1", ids.permissions[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := ecs.GetEcsNetworkInterfacePermissions(ctx, &ecs.GetEcsNetworkInterfacePermissionsArgs{
			Ids: []string{
				"example_value",
			},
			NetworkInterfaceId: "example_value",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("ecsNetworkInterfacePermissionId1", ids.Permissions[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Ecs.GetEcsNetworkInterfacePermissions.Invoke(new()
    {
        Ids = new[]
        {
            "example_value",
        },
        NetworkInterfaceId = "example_value",
    });

    return new Dictionary<string, object?>
    {
        ["ecsNetworkInterfacePermissionId1"] = ids.Apply(getEcsNetworkInterfacePermissionsResult => getEcsNetworkInterfacePermissionsResult.Permissions[0]?.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetEcsNetworkInterfacePermissionsArgs;
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 = EcsFunctions.getEcsNetworkInterfacePermissions(GetEcsNetworkInterfacePermissionsArgs.builder()
            .ids("example_value")
            .networkInterfaceId("example_value")
            .build());

        ctx.export("ecsNetworkInterfacePermissionId1", ids.applyValue(getEcsNetworkInterfacePermissionsResult -> getEcsNetworkInterfacePermissionsResult.permissions()[0].id()));
    }
}
Copy
variables:
  ids:
    fn::invoke:
      function: alicloud:ecs:getEcsNetworkInterfacePermissions
      arguments:
        ids:
          - example_value
        networkInterfaceId: example_value
outputs:
  ecsNetworkInterfacePermissionId1: ${ids.permissions[0].id}
Copy

Using getEcsNetworkInterfacePermissions

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 getEcsNetworkInterfacePermissions(args: GetEcsNetworkInterfacePermissionsArgs, opts?: InvokeOptions): Promise<GetEcsNetworkInterfacePermissionsResult>
function getEcsNetworkInterfacePermissionsOutput(args: GetEcsNetworkInterfacePermissionsOutputArgs, opts?: InvokeOptions): Output<GetEcsNetworkInterfacePermissionsResult>
Copy
def get_ecs_network_interface_permissions(ids: Optional[Sequence[str]] = None,
                                          network_interface_id: Optional[str] = None,
                                          output_file: Optional[str] = None,
                                          page_number: Optional[int] = None,
                                          page_size: Optional[int] = None,
                                          status: Optional[str] = None,
                                          opts: Optional[InvokeOptions] = None) -> GetEcsNetworkInterfacePermissionsResult
def get_ecs_network_interface_permissions_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                          network_interface_id: Optional[pulumi.Input[str]] = None,
                                          output_file: Optional[pulumi.Input[str]] = None,
                                          page_number: Optional[pulumi.Input[int]] = None,
                                          page_size: Optional[pulumi.Input[int]] = None,
                                          status: Optional[pulumi.Input[str]] = None,
                                          opts: Optional[InvokeOptions] = None) -> Output[GetEcsNetworkInterfacePermissionsResult]
Copy
func GetEcsNetworkInterfacePermissions(ctx *Context, args *GetEcsNetworkInterfacePermissionsArgs, opts ...InvokeOption) (*GetEcsNetworkInterfacePermissionsResult, error)
func GetEcsNetworkInterfacePermissionsOutput(ctx *Context, args *GetEcsNetworkInterfacePermissionsOutputArgs, opts ...InvokeOption) GetEcsNetworkInterfacePermissionsResultOutput
Copy

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

public static class GetEcsNetworkInterfacePermissions 
{
    public static Task<GetEcsNetworkInterfacePermissionsResult> InvokeAsync(GetEcsNetworkInterfacePermissionsArgs args, InvokeOptions? opts = null)
    public static Output<GetEcsNetworkInterfacePermissionsResult> Invoke(GetEcsNetworkInterfacePermissionsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetEcsNetworkInterfacePermissionsResult> getEcsNetworkInterfacePermissions(GetEcsNetworkInterfacePermissionsArgs args, InvokeOptions options)
public static Output<GetEcsNetworkInterfacePermissionsResult> getEcsNetworkInterfacePermissions(GetEcsNetworkInterfacePermissionsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:ecs/getEcsNetworkInterfacePermissions:getEcsNetworkInterfacePermissions
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

NetworkInterfaceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the network interface.
Ids Changes to this property will trigger replacement. List<string>
A list of Network Interface Permission IDs.
OutputFile string
File name where to save data source results (after running pulumi preview).
PageNumber int
PageSize int
Status Changes to this property will trigger replacement. string
The Status of the Network Interface Permissions. Valid values: Granted, Pending, Revoked, Revoking.
NetworkInterfaceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the network interface.
Ids Changes to this property will trigger replacement. []string
A list of Network Interface Permission IDs.
OutputFile string
File name where to save data source results (after running pulumi preview).
PageNumber int
PageSize int
Status Changes to this property will trigger replacement. string
The Status of the Network Interface Permissions. Valid values: Granted, Pending, Revoked, Revoking.
networkInterfaceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the network interface.
ids Changes to this property will trigger replacement. List<String>
A list of Network Interface Permission IDs.
outputFile String
File name where to save data source results (after running pulumi preview).
pageNumber Integer
pageSize Integer
status Changes to this property will trigger replacement. String
The Status of the Network Interface Permissions. Valid values: Granted, Pending, Revoked, Revoking.
networkInterfaceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the network interface.
ids Changes to this property will trigger replacement. string[]
A list of Network Interface Permission IDs.
outputFile string
File name where to save data source results (after running pulumi preview).
pageNumber number
pageSize number
status Changes to this property will trigger replacement. string
The Status of the Network Interface Permissions. Valid values: Granted, Pending, Revoked, Revoking.
network_interface_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the network interface.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Network Interface Permission IDs.
output_file str
File name where to save data source results (after running pulumi preview).
page_number int
page_size int
status Changes to this property will trigger replacement. str
The Status of the Network Interface Permissions. Valid values: Granted, Pending, Revoked, Revoking.
networkInterfaceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the network interface.
ids Changes to this property will trigger replacement. List<String>
A list of Network Interface Permission IDs.
outputFile String
File name where to save data source results (after running pulumi preview).
pageNumber Number
pageSize Number
status Changes to this property will trigger replacement. String
The Status of the Network Interface Permissions. Valid values: Granted, Pending, Revoked, Revoking.

getEcsNetworkInterfacePermissions Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
NetworkInterfaceId string
Permissions List<Pulumi.AliCloud.Ecs.Outputs.GetEcsNetworkInterfacePermissionsPermission>
TotalCount int
OutputFile string
PageNumber int
PageSize int
Status string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
NetworkInterfaceId string
Permissions []GetEcsNetworkInterfacePermissionsPermission
TotalCount int
OutputFile string
PageNumber int
PageSize int
Status string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
networkInterfaceId String
permissions List<GetEcsNetworkInterfacePermissionsPermission>
totalCount Integer
outputFile String
pageNumber Integer
pageSize Integer
status String
id string
The provider-assigned unique ID for this managed resource.
ids string[]
networkInterfaceId string
permissions GetEcsNetworkInterfacePermissionsPermission[]
totalCount number
outputFile string
pageNumber number
pageSize number
status string
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
network_interface_id str
permissions Sequence[GetEcsNetworkInterfacePermissionsPermission]
total_count int
output_file str
page_number int
page_size int
status str
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
networkInterfaceId String
permissions List<Property Map>
totalCount Number
outputFile String
pageNumber Number
pageSize Number
status String

Supporting Types

GetEcsNetworkInterfacePermissionsPermission

AccountId This property is required. string
Alibaba Cloud Partner (Certified ISV) account ID or individual user ID.
Id This property is required. string
The ID of the Network Interface Permission.
NetworkInterfaceId This property is required. string
The ID of the network interface.
NetworkInterfacePermissionId This property is required. string
The ID of the Network Interface Permissions.
Permission This property is required. string
The permissions of the Network Interface.
ServiceName This property is required. string
Alibaba Cloud service name.
Status This property is required. string
The Status of the Network Interface Permissions.
AccountId This property is required. string
Alibaba Cloud Partner (Certified ISV) account ID or individual user ID.
Id This property is required. string
The ID of the Network Interface Permission.
NetworkInterfaceId This property is required. string
The ID of the network interface.
NetworkInterfacePermissionId This property is required. string
The ID of the Network Interface Permissions.
Permission This property is required. string
The permissions of the Network Interface.
ServiceName This property is required. string
Alibaba Cloud service name.
Status This property is required. string
The Status of the Network Interface Permissions.
accountId This property is required. String
Alibaba Cloud Partner (Certified ISV) account ID or individual user ID.
id This property is required. String
The ID of the Network Interface Permission.
networkInterfaceId This property is required. String
The ID of the network interface.
networkInterfacePermissionId This property is required. String
The ID of the Network Interface Permissions.
permission This property is required. String
The permissions of the Network Interface.
serviceName This property is required. String
Alibaba Cloud service name.
status This property is required. String
The Status of the Network Interface Permissions.
accountId This property is required. string
Alibaba Cloud Partner (Certified ISV) account ID or individual user ID.
id This property is required. string
The ID of the Network Interface Permission.
networkInterfaceId This property is required. string
The ID of the network interface.
networkInterfacePermissionId This property is required. string
The ID of the Network Interface Permissions.
permission This property is required. string
The permissions of the Network Interface.
serviceName This property is required. string
Alibaba Cloud service name.
status This property is required. string
The Status of the Network Interface Permissions.
account_id This property is required. str
Alibaba Cloud Partner (Certified ISV) account ID or individual user ID.
id This property is required. str
The ID of the Network Interface Permission.
network_interface_id This property is required. str
The ID of the network interface.
network_interface_permission_id This property is required. str
The ID of the Network Interface Permissions.
permission This property is required. str
The permissions of the Network Interface.
service_name This property is required. str
Alibaba Cloud service name.
status This property is required. str
The Status of the Network Interface Permissions.
accountId This property is required. String
Alibaba Cloud Partner (Certified ISV) account ID or individual user ID.
id This property is required. String
The ID of the Network Interface Permission.
networkInterfaceId This property is required. String
The ID of the network interface.
networkInterfacePermissionId This property is required. String
The ID of the Network Interface Permissions.
permission This property is required. String
The permissions of the Network Interface.
serviceName This property is required. String
Alibaba Cloud service name.
status This property is required. String
The Status of the Network Interface Permissions.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.