1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getCvmImageSharePermission
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getCvmImageSharePermission

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query detailed information of cvm image_share_permission

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const imageSharePermission = tencentcloud.getCvmImageSharePermission({
        imageId: "img-xxxxxx",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    image_share_permission = tencentcloud.get_cvm_image_share_permission(image_id="img-xxxxxx")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.LookupCvmImageSharePermission(ctx, &tencentcloud.LookupCvmImageSharePermissionArgs{
    			ImageId: "img-xxxxxx",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var imageSharePermission = Tencentcloud.GetCvmImageSharePermission.Invoke(new()
        {
            ImageId = "img-xxxxxx",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetCvmImageSharePermissionArgs;
    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 imageSharePermission = TencentcloudFunctions.getCvmImageSharePermission(GetCvmImageSharePermissionArgs.builder()
                .imageId("img-xxxxxx")
                .build());
    
        }
    }
    
    variables:
      imageSharePermission:
        fn::invoke:
          function: tencentcloud:getCvmImageSharePermission
          arguments:
            imageId: img-xxxxxx
    

    Using getCvmImageSharePermission

    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 getCvmImageSharePermission(args: GetCvmImageSharePermissionArgs, opts?: InvokeOptions): Promise<GetCvmImageSharePermissionResult>
    function getCvmImageSharePermissionOutput(args: GetCvmImageSharePermissionOutputArgs, opts?: InvokeOptions): Output<GetCvmImageSharePermissionResult>
    def get_cvm_image_share_permission(id: Optional[str] = None,
                                       image_id: Optional[str] = None,
                                       result_output_file: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetCvmImageSharePermissionResult
    def get_cvm_image_share_permission_output(id: Optional[pulumi.Input[str]] = None,
                                       image_id: Optional[pulumi.Input[str]] = None,
                                       result_output_file: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetCvmImageSharePermissionResult]
    func LookupCvmImageSharePermission(ctx *Context, args *LookupCvmImageSharePermissionArgs, opts ...InvokeOption) (*LookupCvmImageSharePermissionResult, error)
    func LookupCvmImageSharePermissionOutput(ctx *Context, args *LookupCvmImageSharePermissionOutputArgs, opts ...InvokeOption) LookupCvmImageSharePermissionResultOutput

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

    public static class GetCvmImageSharePermission 
    {
        public static Task<GetCvmImageSharePermissionResult> InvokeAsync(GetCvmImageSharePermissionArgs args, InvokeOptions? opts = null)
        public static Output<GetCvmImageSharePermissionResult> Invoke(GetCvmImageSharePermissionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCvmImageSharePermissionResult> getCvmImageSharePermission(GetCvmImageSharePermissionArgs args, InvokeOptions options)
    public static Output<GetCvmImageSharePermissionResult> getCvmImageSharePermission(GetCvmImageSharePermissionArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getCvmImageSharePermission:getCvmImageSharePermission
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ImageId string
    The ID of the image to be shared.
    Id string
    ResultOutputFile string
    Used to save results.
    ImageId string
    The ID of the image to be shared.
    Id string
    ResultOutputFile string
    Used to save results.
    imageId String
    The ID of the image to be shared.
    id String
    resultOutputFile String
    Used to save results.
    imageId string
    The ID of the image to be shared.
    id string
    resultOutputFile string
    Used to save results.
    image_id str
    The ID of the image to be shared.
    id str
    result_output_file str
    Used to save results.
    imageId String
    The ID of the image to be shared.
    id String
    resultOutputFile String
    Used to save results.

    getCvmImageSharePermission Result

    The following output properties are available:

    id String
    imageId String
    sharePermissionSets List<Property Map>
    Information on image sharing.
    resultOutputFile String

    Supporting Types

    GetCvmImageSharePermissionSharePermissionSet

    AccountId string
    ID of the account with which the image is shared.
    CreatedTime string
    Time when an image was shared.
    AccountId string
    ID of the account with which the image is shared.
    CreatedTime string
    Time when an image was shared.
    accountId String
    ID of the account with which the image is shared.
    createdTime String
    Time when an image was shared.
    accountId string
    ID of the account with which the image is shared.
    createdTime string
    Time when an image was shared.
    account_id str
    ID of the account with which the image is shared.
    created_time str
    Time when an image was shared.
    accountId String
    ID of the account with which the image is shared.
    createdTime String
    Time when an image was shared.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack