flexibleengine.ImagesImageShare
Explore with Pulumi AI
Use this resource to share an IMS image to other users (by porject) within FlexibleEngine.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const config = new pulumi.Config();
const sourceImageId = config.requireObject("sourceImageId");
const targetProjectIds = config.requireObject("targetProjectIds");
const test = new flexibleengine.ImagesImageShare("test", {
sourceImageId: sourceImageId,
targetProjectIds: targetProjectIds,
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
source_image_id = config.require_object("sourceImageId")
target_project_ids = config.require_object("targetProjectIds")
test = flexibleengine.ImagesImageShare("test",
source_image_id=source_image_id,
target_project_ids=target_project_ids)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"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 := flexibleengine.NewImagesImageShare(ctx, "test", &flexibleengine.ImagesImageShareArgs{
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 Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var sourceImageId = config.RequireObject<dynamic>("sourceImageId");
var targetProjectIds = config.RequireObject<dynamic>("targetProjectIds");
var test = new Flexibleengine.ImagesImageShare("test", new()
{
SourceImageId = sourceImageId,
TargetProjectIds = targetProjectIds,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.ImagesImageShare;
import com.pulumi.flexibleengine.ImagesImageShareArgs;
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 test = new ImagesImageShare("test", ImagesImageShareArgs.builder()
.sourceImageId(sourceImageId)
.targetProjectIds(targetProjectIds)
.build());
}
}
configuration:
sourceImageId:
type: dynamic
targetProjectIds:
type: dynamic
resources:
test:
type: flexibleengine:ImagesImageShare
properties:
sourceImageId: ${sourceImageId}
targetProjectIds: ${targetProjectIds}
Create ImagesImageShare Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ImagesImageShare(name: string, args: ImagesImageShareArgs, opts?: CustomResourceOptions);
@overload
def ImagesImageShare(resource_name: str,
args: ImagesImageShareArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ImagesImageShare(resource_name: str,
opts: Optional[ResourceOptions] = None,
source_image_id: Optional[str] = None,
target_project_ids: Optional[Sequence[str]] = None,
images_image_share_id: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[ImagesImageShareTimeoutsArgs] = None)
func NewImagesImageShare(ctx *Context, name string, args ImagesImageShareArgs, opts ...ResourceOption) (*ImagesImageShare, error)
public ImagesImageShare(string name, ImagesImageShareArgs args, CustomResourceOptions? opts = null)
public ImagesImageShare(String name, ImagesImageShareArgs args)
public ImagesImageShare(String name, ImagesImageShareArgs args, CustomResourceOptions options)
type: flexibleengine:ImagesImageShare
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 ImagesImageShareArgs
- 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 ImagesImageShareArgs
- 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 ImagesImageShareArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ImagesImageShareArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ImagesImageShareArgs
- 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 imagesImageShareResource = new Flexibleengine.ImagesImageShare("imagesImageShareResource", new()
{
SourceImageId = "string",
TargetProjectIds = new[]
{
"string",
},
ImagesImageShareId = "string",
Region = "string",
Timeouts = new Flexibleengine.Inputs.ImagesImageShareTimeoutsArgs
{
Create = "string",
Delete = "string",
},
});
example, err := flexibleengine.NewImagesImageShare(ctx, "imagesImageShareResource", &flexibleengine.ImagesImageShareArgs{
SourceImageId: pulumi.String("string"),
TargetProjectIds: pulumi.StringArray{
pulumi.String("string"),
},
ImagesImageShareId: pulumi.String("string"),
Region: pulumi.String("string"),
Timeouts: &flexibleengine.ImagesImageShareTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
var imagesImageShareResource = new ImagesImageShare("imagesImageShareResource", ImagesImageShareArgs.builder()
.sourceImageId("string")
.targetProjectIds("string")
.imagesImageShareId("string")
.region("string")
.timeouts(ImagesImageShareTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.build());
images_image_share_resource = flexibleengine.ImagesImageShare("imagesImageShareResource",
source_image_id="string",
target_project_ids=["string"],
images_image_share_id="string",
region="string",
timeouts={
"create": "string",
"delete": "string",
})
const imagesImageShareResource = new flexibleengine.ImagesImageShare("imagesImageShareResource", {
sourceImageId: "string",
targetProjectIds: ["string"],
imagesImageShareId: "string",
region: "string",
timeouts: {
create: "string",
"delete": "string",
},
});
type: flexibleengine:ImagesImageShare
properties:
imagesImageShareId: string
region: string
sourceImageId: string
targetProjectIds:
- string
timeouts:
create: string
delete: string
ImagesImageShare 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 ImagesImageShare resource accepts the following input properties:
- Source
Image stringId Specifies the ID of the source image.
Changing this parameter will create a new resource.
- Target
Project List<string>Ids Specifies the IDs of the target projects.
Cannot share an image with yourself.
- string
- The resource ID.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Timeouts
Images
Image Share Timeouts
- Source
Image stringId Specifies the ID of the source image.
Changing this parameter will create a new resource.
- Target
Project []stringIds Specifies the IDs of the target projects.
Cannot share an image with yourself.
- string
- The resource ID.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Timeouts
Images
Image Share Timeouts Args
- source
Image StringId Specifies the ID of the source image.
Changing this parameter will create a new resource.
- target
Project List<String>Ids Specifies the IDs of the target projects.
Cannot share an image with yourself.
- String
- The resource ID.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- timeouts
Images
Image Share Timeouts
- source
Image stringId Specifies the ID of the source image.
Changing this parameter will create a new resource.
- target
Project string[]Ids Specifies the IDs of the target projects.
Cannot share an image with yourself.
- string
- The resource ID.
- region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- timeouts
Images
Image Share Timeouts
- source_
image_ strid Specifies the ID of the source image.
Changing this parameter will create a new resource.
- target_
project_ Sequence[str]ids Specifies the IDs of the target projects.
Cannot share an image with yourself.
- str
- The resource ID.
- region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- timeouts
Images
Image Share Timeouts Args
- source
Image StringId Specifies the ID of the source image.
Changing this parameter will create a new resource.
- target
Project List<String>Ids Specifies the IDs of the target projects.
Cannot share an image with yourself.
- String
- The resource ID.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the ImagesImageShare resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ImagesImageShare Resource
Get an existing ImagesImageShare 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?: ImagesImageShareState, opts?: CustomResourceOptions): ImagesImageShare
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
images_image_share_id: Optional[str] = None,
region: Optional[str] = None,
source_image_id: Optional[str] = None,
target_project_ids: Optional[Sequence[str]] = None,
timeouts: Optional[ImagesImageShareTimeoutsArgs] = None) -> ImagesImageShare
func GetImagesImageShare(ctx *Context, name string, id IDInput, state *ImagesImageShareState, opts ...ResourceOption) (*ImagesImageShare, error)
public static ImagesImageShare Get(string name, Input<string> id, ImagesImageShareState? state, CustomResourceOptions? opts = null)
public static ImagesImageShare get(String name, Output<String> id, ImagesImageShareState state, CustomResourceOptions options)
resources: _: type: flexibleengine:ImagesImageShare 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.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Source
Image stringId Specifies the ID of the source image.
Changing this parameter will create a new resource.
- Target
Project List<string>Ids Specifies the IDs of the target projects.
Cannot share an image with yourself.
- Timeouts
Images
Image Share Timeouts
- string
- The resource ID.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Source
Image stringId Specifies the ID of the source image.
Changing this parameter will create a new resource.
- Target
Project []stringIds Specifies the IDs of the target projects.
Cannot share an image with yourself.
- Timeouts
Images
Image Share Timeouts Args
- String
- The resource ID.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- source
Image StringId Specifies the ID of the source image.
Changing this parameter will create a new resource.
- target
Project List<String>Ids Specifies the IDs of the target projects.
Cannot share an image with yourself.
- timeouts
Images
Image Share Timeouts
- string
- The resource ID.
- region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- source
Image stringId Specifies the ID of the source image.
Changing this parameter will create a new resource.
- target
Project string[]Ids Specifies the IDs of the target projects.
Cannot share an image with yourself.
- timeouts
Images
Image Share Timeouts
- str
- The resource ID.
- region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- source_
image_ strid Specifies the ID of the source image.
Changing this parameter will create a new resource.
- target_
project_ Sequence[str]ids Specifies the IDs of the target projects.
Cannot share an image with yourself.
- timeouts
Images
Image Share Timeouts Args
- String
- The resource ID.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- source
Image StringId Specifies the ID of the source image.
Changing this parameter will create a new resource.
- target
Project List<String>Ids Specifies the IDs of the target projects.
Cannot share an image with yourself.
- timeouts Property Map
Supporting Types
ImagesImageShareTimeouts, ImagesImageShareTimeoutsArgs
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.