1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getCvmImageSharePermission
tencentcloud 1.81.187 published on Monday, Apr 28, 2025 by tencentcloudstack

tencentcloud.getCvmImageSharePermission

Explore with Pulumi AI

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",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

image_share_permission = tencentcloud.get_cvm_image_share_permission(image_id="img-xxxxxx")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  imageSharePermission:
    fn::invoke:
      function: tencentcloud:getCvmImageSharePermission
      arguments:
        imageId: img-xxxxxx
Copy

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>
Copy
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]
Copy
func LookupCvmImageSharePermission(ctx *Context, args *LookupCvmImageSharePermissionArgs, opts ...InvokeOption) (*LookupCvmImageSharePermissionResult, error)
func LookupCvmImageSharePermissionOutput(ctx *Context, args *LookupCvmImageSharePermissionOutputArgs, opts ...InvokeOption) LookupCvmImageSharePermissionResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetCvmImageSharePermissionResult> getCvmImageSharePermission(GetCvmImageSharePermissionArgs args, InvokeOptions options)
public static Output<GetCvmImageSharePermissionResult> getCvmImageSharePermission(GetCvmImageSharePermissionArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getCvmImageSharePermission:getCvmImageSharePermission
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ImageId This property is required. string
The ID of the image to be shared.
Id string
ResultOutputFile string
Used to save results.
ImageId This property is required. string
The ID of the image to be shared.
Id string
ResultOutputFile string
Used to save results.
imageId This property is required. String
The ID of the image to be shared.
id String
resultOutputFile String
Used to save results.
imageId This property is required. string
The ID of the image to be shared.
id string
resultOutputFile string
Used to save results.
image_id This property is required. str
The ID of the image to be shared.
id str
result_output_file str
Used to save results.
imageId This property is required. 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 This property is required. string
ID of the account with which the image is shared.
CreatedTime This property is required. string
Time when an image was shared.
AccountId This property is required. string
ID of the account with which the image is shared.
CreatedTime This property is required. string
Time when an image was shared.
accountId This property is required. String
ID of the account with which the image is shared.
createdTime This property is required. String
Time when an image was shared.
accountId This property is required. string
ID of the account with which the image is shared.
createdTime This property is required. string
Time when an image was shared.
account_id This property is required. str
ID of the account with which the image is shared.
created_time This property is required. str
Time when an image was shared.
accountId This property is required. String
ID of the account with which the image is shared.
createdTime This property is required. 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.