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

alicloud.ecs.getEcsNetworkInterfacePermissions

Explore with Pulumi AI

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

    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);
    
    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)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:ecs:getEcsNetworkInterfacePermissions
          Arguments:
            ids:
              - example_value
            networkInterfaceId: example_value
    outputs:
      ecsNetworkInterfacePermissionId1: ${ids.permissions[0].id}
    

    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>
    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]
    func GetEcsNetworkInterfacePermissions(ctx *Context, args *GetEcsNetworkInterfacePermissionsArgs, opts ...InvokeOption) (*GetEcsNetworkInterfacePermissionsResult, error)
    func GetEcsNetworkInterfacePermissionsOutput(ctx *Context, args *GetEcsNetworkInterfacePermissionsOutputArgs, opts ...InvokeOption) GetEcsNetworkInterfacePermissionsResultOutput

    > 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)
    }
    public static CompletableFuture<GetEcsNetworkInterfacePermissionsResult> getEcsNetworkInterfacePermissions(GetEcsNetworkInterfacePermissionsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:ecs/getEcsNetworkInterfacePermissions:getEcsNetworkInterfacePermissions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NetworkInterfaceId string
    The ID of the network interface.
    Ids 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 string
    The Status of the Network Interface Permissions. Valid values: Granted, Pending, Revoked, Revoking.
    NetworkInterfaceId string
    The ID of the network interface.
    Ids []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 string
    The Status of the Network Interface Permissions. Valid values: Granted, Pending, Revoked, Revoking.
    networkInterfaceId String
    The ID of the network interface.
    ids 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 String
    The Status of the Network Interface Permissions. Valid values: Granted, Pending, Revoked, Revoking.
    networkInterfaceId string
    The ID of the network interface.
    ids 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 string
    The Status of the Network Interface Permissions. Valid values: Granted, Pending, Revoked, Revoking.
    network_interface_id str
    The ID of the network interface.
    ids 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 str
    The Status of the Network Interface Permissions. Valid values: Granted, Pending, Revoked, Revoking.
    networkInterfaceId String
    The ID of the network interface.
    ids 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 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 string
    Alibaba Cloud Partner (Certified ISV) account ID or individual user ID.
    Id string
    The ID of the Network Interface Permission.
    NetworkInterfaceId string
    The ID of the network interface.
    NetworkInterfacePermissionId string
    The ID of the Network Interface Permissions.
    Permission string
    The permissions of the Network Interface.
    ServiceName string
    Alibaba Cloud service name.
    Status string
    The Status of the Network Interface Permissions.
    AccountId string
    Alibaba Cloud Partner (Certified ISV) account ID or individual user ID.
    Id string
    The ID of the Network Interface Permission.
    NetworkInterfaceId string
    The ID of the network interface.
    NetworkInterfacePermissionId string
    The ID of the Network Interface Permissions.
    Permission string
    The permissions of the Network Interface.
    ServiceName string
    Alibaba Cloud service name.
    Status string
    The Status of the Network Interface Permissions.
    accountId String
    Alibaba Cloud Partner (Certified ISV) account ID or individual user ID.
    id String
    The ID of the Network Interface Permission.
    networkInterfaceId String
    The ID of the network interface.
    networkInterfacePermissionId String
    The ID of the Network Interface Permissions.
    permission String
    The permissions of the Network Interface.
    serviceName String
    Alibaba Cloud service name.
    status String
    The Status of the Network Interface Permissions.
    accountId string
    Alibaba Cloud Partner (Certified ISV) account ID or individual user ID.
    id string
    The ID of the Network Interface Permission.
    networkInterfaceId string
    The ID of the network interface.
    networkInterfacePermissionId string
    The ID of the Network Interface Permissions.
    permission string
    The permissions of the Network Interface.
    serviceName string
    Alibaba Cloud service name.
    status string
    The Status of the Network Interface Permissions.
    account_id str
    Alibaba Cloud Partner (Certified ISV) account ID or individual user ID.
    id str
    The ID of the Network Interface Permission.
    network_interface_id str
    The ID of the network interface.
    network_interface_permission_id str
    The ID of the Network Interface Permissions.
    permission str
    The permissions of the Network Interface.
    service_name str
    Alibaba Cloud service name.
    status str
    The Status of the Network Interface Permissions.
    accountId String
    Alibaba Cloud Partner (Certified ISV) account ID or individual user ID.
    id String
    The ID of the Network Interface Permission.
    networkInterfaceId String
    The ID of the network interface.
    networkInterfacePermissionId String
    The ID of the Network Interface Permissions.
    permission String
    The permissions of the Network Interface.
    serviceName String
    Alibaba Cloud service name.
    status 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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi