opentelekomcloud.ImsImageShareV1
Explore with Pulumi AI
Manages an IMS image share resource within OpenTelekomCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const sourceImageId = config.requireObject("sourceImageId");
const targetProjectIds = config.requireObject("targetProjectIds");
const share = new opentelekomcloud.ImsImageShareV1("share", {
sourceImageId: sourceImageId,
targetProjectIds: targetProjectIds,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
source_image_id = config.require_object("sourceImageId")
target_project_ids = config.require_object("targetProjectIds")
share = opentelekomcloud.ImsImageShareV1("share",
source_image_id=source_image_id,
target_project_ids=target_project_ids)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
sourceImageId := cfg.RequireObject("sourceImageId")
targetProjectIds := cfg.RequireObject("targetProjectIds")
_, err := opentelekomcloud.NewImsImageShareV1(ctx, "share", &opentelekomcloud.ImsImageShareV1Args{
SourceImageId: pulumi.Any(sourceImageId),
TargetProjectIds: pulumi.Any(targetProjectIds),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var sourceImageId = config.RequireObject<dynamic>("sourceImageId");
var targetProjectIds = config.RequireObject<dynamic>("targetProjectIds");
var share = new Opentelekomcloud.ImsImageShareV1("share", new()
{
SourceImageId = sourceImageId,
TargetProjectIds = targetProjectIds,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ImsImageShareV1;
import com.pulumi.opentelekomcloud.ImsImageShareV1Args;
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 config = ctx.config();
final var sourceImageId = config.get("sourceImageId");
final var targetProjectIds = config.get("targetProjectIds");
var share = new ImsImageShareV1("share", ImsImageShareV1Args.builder()
.sourceImageId(sourceImageId)
.targetProjectIds(targetProjectIds)
.build());
}
}
configuration:
sourceImageId:
type: dynamic
targetProjectIds:
type: dynamic
resources:
share:
type: opentelekomcloud:ImsImageShareV1
properties:
sourceImageId: ${sourceImageId}
targetProjectIds: ${targetProjectIds}
Create ImsImageShareV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ImsImageShareV1(name: string, args: ImsImageShareV1Args, opts?: CustomResourceOptions);
@overload
def ImsImageShareV1(resource_name: str,
args: ImsImageShareV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def ImsImageShareV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
source_image_id: Optional[str] = None,
target_project_ids: Optional[Sequence[str]] = None,
ims_image_share_v1_id: Optional[str] = None,
timeouts: Optional[ImsImageShareV1TimeoutsArgs] = None)
func NewImsImageShareV1(ctx *Context, name string, args ImsImageShareV1Args, opts ...ResourceOption) (*ImsImageShareV1, error)
public ImsImageShareV1(string name, ImsImageShareV1Args args, CustomResourceOptions? opts = null)
public ImsImageShareV1(String name, ImsImageShareV1Args args)
public ImsImageShareV1(String name, ImsImageShareV1Args args, CustomResourceOptions options)
type: opentelekomcloud:ImsImageShareV1
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ImsImageShareV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ImsImageShareV1Args
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ImsImageShareV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ImsImageShareV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ImsImageShareV1Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var imsImageShareV1Resource = new Opentelekomcloud.ImsImageShareV1("imsImageShareV1Resource", new()
{
SourceImageId = "string",
TargetProjectIds = new[]
{
"string",
},
ImsImageShareV1Id = "string",
Timeouts = new Opentelekomcloud.Inputs.ImsImageShareV1TimeoutsArgs
{
Create = "string",
Delete = "string",
},
});
example, err := opentelekomcloud.NewImsImageShareV1(ctx, "imsImageShareV1Resource", &opentelekomcloud.ImsImageShareV1Args{
SourceImageId: pulumi.String("string"),
TargetProjectIds: pulumi.StringArray{
pulumi.String("string"),
},
ImsImageShareV1Id: pulumi.String("string"),
Timeouts: &opentelekomcloud.ImsImageShareV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
var imsImageShareV1Resource = new ImsImageShareV1("imsImageShareV1Resource", ImsImageShareV1Args.builder()
.sourceImageId("string")
.targetProjectIds("string")
.imsImageShareV1Id("string")
.timeouts(ImsImageShareV1TimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.build());
ims_image_share_v1_resource = opentelekomcloud.ImsImageShareV1("imsImageShareV1Resource",
source_image_id="string",
target_project_ids=["string"],
ims_image_share_v1_id="string",
timeouts={
"create": "string",
"delete": "string",
})
const imsImageShareV1Resource = new opentelekomcloud.ImsImageShareV1("imsImageShareV1Resource", {
sourceImageId: "string",
targetProjectIds: ["string"],
imsImageShareV1Id: "string",
timeouts: {
create: "string",
"delete": "string",
},
});
type: opentelekomcloud:ImsImageShareV1
properties:
imsImageShareV1Id: string
sourceImageId: string
targetProjectIds:
- string
timeouts:
create: string
delete: string
ImsImageShareV1 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ImsImageShareV1 resource accepts the following input properties:
- Source
Image stringId Specifies the ID of the source image. The source image must be in the same region as the current resource.
Changing this parameter will create a new resource.
- Target
Project List<string>Ids - Specifies the IDs of the target projects.
- string
- The resource ID, same as
source_image_id
. - Timeouts
Ims
Image Share V1Timeouts
- Source
Image stringId Specifies the ID of the source image. The source image must be in the same region as the current resource.
Changing this parameter will create a new resource.
- Target
Project []stringIds - Specifies the IDs of the target projects.
- string
- The resource ID, same as
source_image_id
. - Timeouts
Ims
Image Share V1Timeouts Args
- source
Image StringId Specifies the ID of the source image. The source image must be in the same region as the current resource.
Changing this parameter will create a new resource.
- target
Project List<String>Ids - Specifies the IDs of the target projects.
- String
- The resource ID, same as
source_image_id
. - timeouts
Ims
Image Share V1Timeouts
- source
Image stringId Specifies the ID of the source image. The source image must be in the same region as the current resource.
Changing this parameter will create a new resource.
- target
Project string[]Ids - Specifies the IDs of the target projects.
- string
- The resource ID, same as
source_image_id
. - timeouts
Ims
Image Share V1Timeouts
- source_
image_ strid Specifies the ID of the source image. The source image must be in the same region as the current resource.
Changing this parameter will create a new resource.
- target_
project_ Sequence[str]ids - Specifies the IDs of the target projects.
- str
- The resource ID, same as
source_image_id
. - timeouts
Ims
Image Share V1Timeouts Args
- source
Image StringId Specifies the ID of the source image. The source image must be in the same region as the current resource.
Changing this parameter will create a new resource.
- target
Project List<String>Ids - Specifies the IDs of the target projects.
- String
- The resource ID, same as
source_image_id
. - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the ImsImageShareV1 resource produces the following output properties:
Look up Existing ImsImageShareV1 Resource
Get an existing ImsImageShareV1 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ImsImageShareV1State, opts?: CustomResourceOptions): ImsImageShareV1
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ims_image_share_v1_id: Optional[str] = None,
region: Optional[str] = None,
source_image_id: Optional[str] = None,
target_project_ids: Optional[Sequence[str]] = None,
timeouts: Optional[ImsImageShareV1TimeoutsArgs] = None) -> ImsImageShareV1
func GetImsImageShareV1(ctx *Context, name string, id IDInput, state *ImsImageShareV1State, opts ...ResourceOption) (*ImsImageShareV1, error)
public static ImsImageShareV1 Get(string name, Input<string> id, ImsImageShareV1State? state, CustomResourceOptions? opts = null)
public static ImsImageShareV1 get(String name, Output<String> id, ImsImageShareV1State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:ImsImageShareV1 get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- string
- The resource ID, same as
source_image_id
. - Region string
- The region in which resource is located.
- Source
Image stringId Specifies the ID of the source image. The source image must be in the same region as the current resource.
Changing this parameter will create a new resource.
- Target
Project List<string>Ids - Specifies the IDs of the target projects.
- Timeouts
Ims
Image Share V1Timeouts
- string
- The resource ID, same as
source_image_id
. - Region string
- The region in which resource is located.
- Source
Image stringId Specifies the ID of the source image. The source image must be in the same region as the current resource.
Changing this parameter will create a new resource.
- Target
Project []stringIds - Specifies the IDs of the target projects.
- Timeouts
Ims
Image Share V1Timeouts Args
- String
- The resource ID, same as
source_image_id
. - region String
- The region in which resource is located.
- source
Image StringId Specifies the ID of the source image. The source image must be in the same region as the current resource.
Changing this parameter will create a new resource.
- target
Project List<String>Ids - Specifies the IDs of the target projects.
- timeouts
Ims
Image Share V1Timeouts
- string
- The resource ID, same as
source_image_id
. - region string
- The region in which resource is located.
- source
Image stringId Specifies the ID of the source image. The source image must be in the same region as the current resource.
Changing this parameter will create a new resource.
- target
Project string[]Ids - Specifies the IDs of the target projects.
- timeouts
Ims
Image Share V1Timeouts
- str
- The resource ID, same as
source_image_id
. - region str
- The region in which resource is located.
- source_
image_ strid Specifies the ID of the source image. The source image must be in the same region as the current resource.
Changing this parameter will create a new resource.
- target_
project_ Sequence[str]ids - Specifies the IDs of the target projects.
- timeouts
Ims
Image Share V1Timeouts Args
- String
- The resource ID, same as
source_image_id
. - region String
- The region in which resource is located.
- source
Image StringId Specifies the ID of the source image. The source image must be in the same region as the current resource.
Changing this parameter will create a new resource.
- target
Project List<String>Ids - Specifies the IDs of the target projects.
- timeouts Property Map
Supporting Types
ImsImageShareV1Timeouts, ImsImageShareV1TimeoutsArgs
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.