opentelekomcloud.SwrDomainV2
Explore with Pulumi AI
Up-to-date reference of API arguments for SWR domain you can get at documentation portal
Manages the SWR image sharing domain resource within Open Telekom Cloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const accessDomain = config.requireObject("accessDomain");
const org1 = new opentelekomcloud.SwrOrganizationV2("org1", {});
const repo1 = new opentelekomcloud.SwrRepositoryV2("repo1", {
organization: org1.name,
description: "Test repository",
category: "linux",
isPublic: false,
});
const domain1 = new opentelekomcloud.SwrDomainV2("domain1", {
organization: org1.name,
repository: opentelekomcloud_swr_organization_v2.repo_1.name,
accessDomain: accessDomain,
permission: "read",
deadline: "forever",
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
access_domain = config.require_object("accessDomain")
org1 = opentelekomcloud.SwrOrganizationV2("org1")
repo1 = opentelekomcloud.SwrRepositoryV2("repo1",
organization=org1.name,
description="Test repository",
category="linux",
is_public=False)
domain1 = opentelekomcloud.SwrDomainV2("domain1",
organization=org1.name,
repository=opentelekomcloud_swr_organization_v2["repo_1"]["name"],
access_domain=access_domain,
permission="read",
deadline="forever")
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, "")
accessDomain := cfg.RequireObject("accessDomain")
org1, err := opentelekomcloud.NewSwrOrganizationV2(ctx, "org1", nil)
if err != nil {
return err
}
_, err = opentelekomcloud.NewSwrRepositoryV2(ctx, "repo1", &opentelekomcloud.SwrRepositoryV2Args{
Organization: org1.Name,
Description: pulumi.String("Test repository"),
Category: pulumi.String("linux"),
IsPublic: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewSwrDomainV2(ctx, "domain1", &opentelekomcloud.SwrDomainV2Args{
Organization: org1.Name,
Repository: pulumi.Any(opentelekomcloud_swr_organization_v2.Repo_1.Name),
AccessDomain: pulumi.Any(accessDomain),
Permission: pulumi.String("read"),
Deadline: pulumi.String("forever"),
})
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 accessDomain = config.RequireObject<dynamic>("accessDomain");
var org1 = new Opentelekomcloud.SwrOrganizationV2("org1");
var repo1 = new Opentelekomcloud.SwrRepositoryV2("repo1", new()
{
Organization = org1.Name,
Description = "Test repository",
Category = "linux",
IsPublic = false,
});
var domain1 = new Opentelekomcloud.SwrDomainV2("domain1", new()
{
Organization = org1.Name,
Repository = opentelekomcloud_swr_organization_v2.Repo_1.Name,
AccessDomain = accessDomain,
Permission = "read",
Deadline = "forever",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.SwrOrganizationV2;
import com.pulumi.opentelekomcloud.SwrRepositoryV2;
import com.pulumi.opentelekomcloud.SwrRepositoryV2Args;
import com.pulumi.opentelekomcloud.SwrDomainV2;
import com.pulumi.opentelekomcloud.SwrDomainV2Args;
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 accessDomain = config.get("accessDomain");
var org1 = new SwrOrganizationV2("org1");
var repo1 = new SwrRepositoryV2("repo1", SwrRepositoryV2Args.builder()
.organization(org1.name())
.description("Test repository")
.category("linux")
.isPublic(false)
.build());
var domain1 = new SwrDomainV2("domain1", SwrDomainV2Args.builder()
.organization(org1.name())
.repository(opentelekomcloud_swr_organization_v2.repo_1().name())
.accessDomain(accessDomain)
.permission("read")
.deadline("forever")
.build());
}
}
configuration:
accessDomain:
type: dynamic
resources:
org1:
type: opentelekomcloud:SwrOrganizationV2
repo1:
type: opentelekomcloud:SwrRepositoryV2
properties:
organization: ${org1.name}
description: Test repository
category: linux
isPublic: false
domain1:
type: opentelekomcloud:SwrDomainV2
properties:
organization: ${org1.name}
repository: ${opentelekomcloud_swr_organization_v2.repo_1.name}
accessDomain: ${accessDomain}
permission: read
deadline: forever
Create SwrDomainV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SwrDomainV2(name: string, args: SwrDomainV2Args, opts?: CustomResourceOptions);
@overload
def SwrDomainV2(resource_name: str,
args: SwrDomainV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def SwrDomainV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_domain: Optional[str] = None,
deadline: Optional[str] = None,
organization: Optional[str] = None,
permission: Optional[str] = None,
repository: Optional[str] = None,
description: Optional[str] = None,
swr_domain_v2_id: Optional[str] = None,
timeouts: Optional[SwrDomainV2TimeoutsArgs] = None)
func NewSwrDomainV2(ctx *Context, name string, args SwrDomainV2Args, opts ...ResourceOption) (*SwrDomainV2, error)
public SwrDomainV2(string name, SwrDomainV2Args args, CustomResourceOptions? opts = null)
public SwrDomainV2(String name, SwrDomainV2Args args)
public SwrDomainV2(String name, SwrDomainV2Args args, CustomResourceOptions options)
type: opentelekomcloud:SwrDomainV2
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 SwrDomainV2Args
- 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 SwrDomainV2Args
- 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 SwrDomainV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SwrDomainV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SwrDomainV2Args
- 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 swrDomainV2Resource = new Opentelekomcloud.SwrDomainV2("swrDomainV2Resource", new()
{
AccessDomain = "string",
Deadline = "string",
Organization = "string",
Permission = "string",
Repository = "string",
Description = "string",
SwrDomainV2Id = "string",
Timeouts = new Opentelekomcloud.Inputs.SwrDomainV2TimeoutsArgs
{
Default = "string",
},
});
example, err := opentelekomcloud.NewSwrDomainV2(ctx, "swrDomainV2Resource", &opentelekomcloud.SwrDomainV2Args{
AccessDomain: pulumi.String("string"),
Deadline: pulumi.String("string"),
Organization: pulumi.String("string"),
Permission: pulumi.String("string"),
Repository: pulumi.String("string"),
Description: pulumi.String("string"),
SwrDomainV2Id: pulumi.String("string"),
Timeouts: &opentelekomcloud.SwrDomainV2TimeoutsArgs{
Default: pulumi.String("string"),
},
})
var swrDomainV2Resource = new SwrDomainV2("swrDomainV2Resource", SwrDomainV2Args.builder()
.accessDomain("string")
.deadline("string")
.organization("string")
.permission("string")
.repository("string")
.description("string")
.swrDomainV2Id("string")
.timeouts(SwrDomainV2TimeoutsArgs.builder()
.default_("string")
.build())
.build());
swr_domain_v2_resource = opentelekomcloud.SwrDomainV2("swrDomainV2Resource",
access_domain="string",
deadline="string",
organization="string",
permission="string",
repository="string",
description="string",
swr_domain_v2_id="string",
timeouts={
"default": "string",
})
const swrDomainV2Resource = new opentelekomcloud.SwrDomainV2("swrDomainV2Resource", {
accessDomain: "string",
deadline: "string",
organization: "string",
permission: "string",
repository: "string",
description: "string",
swrDomainV2Id: "string",
timeouts: {
"default": "string",
},
});
type: opentelekomcloud:SwrDomainV2
properties:
accessDomain: string
deadline: string
description: string
organization: string
permission: string
repository: string
swrDomainV2Id: string
timeouts:
default: string
SwrDomainV2 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 SwrDomainV2 resource accepts the following input properties:
- Access
Domain string The name of the domain for image sharing.
access_domain
should be an existing OTC domain.- Deadline string
- End date of image sharing (UTC). When the value is set to
forever
, the image will be permanently available for the domain. The validity period is calculated by day. The shared images expire at00:00:00
on the day after the end date. - Organization string
- The name of the repository organization.
- Permission string
- Permission to be granted. Currently, only the
read
permission is supported. - Repository string
- The name of the repository.
- Description string
- Specifies SWR domain description.
- Swr
Domain stringV2Id - Timeouts
Swr
Domain V2Timeouts
- Access
Domain string The name of the domain for image sharing.
access_domain
should be an existing OTC domain.- Deadline string
- End date of image sharing (UTC). When the value is set to
forever
, the image will be permanently available for the domain. The validity period is calculated by day. The shared images expire at00:00:00
on the day after the end date. - Organization string
- The name of the repository organization.
- Permission string
- Permission to be granted. Currently, only the
read
permission is supported. - Repository string
- The name of the repository.
- Description string
- Specifies SWR domain description.
- Swr
Domain stringV2Id - Timeouts
Swr
Domain V2Timeouts Args
- access
Domain String The name of the domain for image sharing.
access_domain
should be an existing OTC domain.- deadline String
- End date of image sharing (UTC). When the value is set to
forever
, the image will be permanently available for the domain. The validity period is calculated by day. The shared images expire at00:00:00
on the day after the end date. - organization String
- The name of the repository organization.
- permission String
- Permission to be granted. Currently, only the
read
permission is supported. - repository String
- The name of the repository.
- description String
- Specifies SWR domain description.
- swr
Domain StringV2Id - timeouts
Swr
Domain V2Timeouts
- access
Domain string The name of the domain for image sharing.
access_domain
should be an existing OTC domain.- deadline string
- End date of image sharing (UTC). When the value is set to
forever
, the image will be permanently available for the domain. The validity period is calculated by day. The shared images expire at00:00:00
on the day after the end date. - organization string
- The name of the repository organization.
- permission string
- Permission to be granted. Currently, only the
read
permission is supported. - repository string
- The name of the repository.
- description string
- Specifies SWR domain description.
- swr
Domain stringV2Id - timeouts
Swr
Domain V2Timeouts
- access_
domain str The name of the domain for image sharing.
access_domain
should be an existing OTC domain.- deadline str
- End date of image sharing (UTC). When the value is set to
forever
, the image will be permanently available for the domain. The validity period is calculated by day. The shared images expire at00:00:00
on the day after the end date. - organization str
- The name of the repository organization.
- permission str
- Permission to be granted. Currently, only the
read
permission is supported. - repository str
- The name of the repository.
- description str
- Specifies SWR domain description.
- swr_
domain_ strv2_ id - timeouts
Swr
Domain V2Timeouts Args
- access
Domain String The name of the domain for image sharing.
access_domain
should be an existing OTC domain.- deadline String
- End date of image sharing (UTC). When the value is set to
forever
, the image will be permanently available for the domain. The validity period is calculated by day. The shared images expire at00:00:00
on the day after the end date. - organization String
- The name of the repository organization.
- permission String
- Permission to be granted. Currently, only the
read
permission is supported. - repository String
- The name of the repository.
- description String
- Specifies SWR domain description.
- swr
Domain StringV2Id - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the SwrDomainV2 resource produces the following output properties:
- Created string
- Indicates the creation time.
- Creator
Id string - Username ID of the domain creator.
- Creator
Name string - Username of the domain creator.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status bool
- Indicates the domain is valid (
true
) or expired (false
). - Updated string
- Indicates the domain when was last updated.
- Created string
- Indicates the creation time.
- Creator
Id string - Username ID of the domain creator.
- Creator
Name string - Username of the domain creator.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status bool
- Indicates the domain is valid (
true
) or expired (false
). - Updated string
- Indicates the domain when was last updated.
- created String
- Indicates the creation time.
- creator
Id String - Username ID of the domain creator.
- creator
Name String - Username of the domain creator.
- id String
- The provider-assigned unique ID for this managed resource.
- status Boolean
- Indicates the domain is valid (
true
) or expired (false
). - updated String
- Indicates the domain when was last updated.
- created string
- Indicates the creation time.
- creator
Id string - Username ID of the domain creator.
- creator
Name string - Username of the domain creator.
- id string
- The provider-assigned unique ID for this managed resource.
- status boolean
- Indicates the domain is valid (
true
) or expired (false
). - updated string
- Indicates the domain when was last updated.
- created str
- Indicates the creation time.
- creator_
id str - Username ID of the domain creator.
- creator_
name str - Username of the domain creator.
- id str
- The provider-assigned unique ID for this managed resource.
- status bool
- Indicates the domain is valid (
true
) or expired (false
). - updated str
- Indicates the domain when was last updated.
- created String
- Indicates the creation time.
- creator
Id String - Username ID of the domain creator.
- creator
Name String - Username of the domain creator.
- id String
- The provider-assigned unique ID for this managed resource.
- status Boolean
- Indicates the domain is valid (
true
) or expired (false
). - updated String
- Indicates the domain when was last updated.
Look up Existing SwrDomainV2 Resource
Get an existing SwrDomainV2 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?: SwrDomainV2State, opts?: CustomResourceOptions): SwrDomainV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_domain: Optional[str] = None,
created: Optional[str] = None,
creator_id: Optional[str] = None,
creator_name: Optional[str] = None,
deadline: Optional[str] = None,
description: Optional[str] = None,
organization: Optional[str] = None,
permission: Optional[str] = None,
repository: Optional[str] = None,
status: Optional[bool] = None,
swr_domain_v2_id: Optional[str] = None,
timeouts: Optional[SwrDomainV2TimeoutsArgs] = None,
updated: Optional[str] = None) -> SwrDomainV2
func GetSwrDomainV2(ctx *Context, name string, id IDInput, state *SwrDomainV2State, opts ...ResourceOption) (*SwrDomainV2, error)
public static SwrDomainV2 Get(string name, Input<string> id, SwrDomainV2State? state, CustomResourceOptions? opts = null)
public static SwrDomainV2 get(String name, Output<String> id, SwrDomainV2State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:SwrDomainV2 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.
- Access
Domain string The name of the domain for image sharing.
access_domain
should be an existing OTC domain.- Created string
- Indicates the creation time.
- Creator
Id string - Username ID of the domain creator.
- Creator
Name string - Username of the domain creator.
- Deadline string
- End date of image sharing (UTC). When the value is set to
forever
, the image will be permanently available for the domain. The validity period is calculated by day. The shared images expire at00:00:00
on the day after the end date. - Description string
- Specifies SWR domain description.
- Organization string
- The name of the repository organization.
- Permission string
- Permission to be granted. Currently, only the
read
permission is supported. - Repository string
- The name of the repository.
- Status bool
- Indicates the domain is valid (
true
) or expired (false
). - Swr
Domain stringV2Id - Timeouts
Swr
Domain V2Timeouts - Updated string
- Indicates the domain when was last updated.
- Access
Domain string The name of the domain for image sharing.
access_domain
should be an existing OTC domain.- Created string
- Indicates the creation time.
- Creator
Id string - Username ID of the domain creator.
- Creator
Name string - Username of the domain creator.
- Deadline string
- End date of image sharing (UTC). When the value is set to
forever
, the image will be permanently available for the domain. The validity period is calculated by day. The shared images expire at00:00:00
on the day after the end date. - Description string
- Specifies SWR domain description.
- Organization string
- The name of the repository organization.
- Permission string
- Permission to be granted. Currently, only the
read
permission is supported. - Repository string
- The name of the repository.
- Status bool
- Indicates the domain is valid (
true
) or expired (false
). - Swr
Domain stringV2Id - Timeouts
Swr
Domain V2Timeouts Args - Updated string
- Indicates the domain when was last updated.
- access
Domain String The name of the domain for image sharing.
access_domain
should be an existing OTC domain.- created String
- Indicates the creation time.
- creator
Id String - Username ID of the domain creator.
- creator
Name String - Username of the domain creator.
- deadline String
- End date of image sharing (UTC). When the value is set to
forever
, the image will be permanently available for the domain. The validity period is calculated by day. The shared images expire at00:00:00
on the day after the end date. - description String
- Specifies SWR domain description.
- organization String
- The name of the repository organization.
- permission String
- Permission to be granted. Currently, only the
read
permission is supported. - repository String
- The name of the repository.
- status Boolean
- Indicates the domain is valid (
true
) or expired (false
). - swr
Domain StringV2Id - timeouts
Swr
Domain V2Timeouts - updated String
- Indicates the domain when was last updated.
- access
Domain string The name of the domain for image sharing.
access_domain
should be an existing OTC domain.- created string
- Indicates the creation time.
- creator
Id string - Username ID of the domain creator.
- creator
Name string - Username of the domain creator.
- deadline string
- End date of image sharing (UTC). When the value is set to
forever
, the image will be permanently available for the domain. The validity period is calculated by day. The shared images expire at00:00:00
on the day after the end date. - description string
- Specifies SWR domain description.
- organization string
- The name of the repository organization.
- permission string
- Permission to be granted. Currently, only the
read
permission is supported. - repository string
- The name of the repository.
- status boolean
- Indicates the domain is valid (
true
) or expired (false
). - swr
Domain stringV2Id - timeouts
Swr
Domain V2Timeouts - updated string
- Indicates the domain when was last updated.
- access_
domain str The name of the domain for image sharing.
access_domain
should be an existing OTC domain.- created str
- Indicates the creation time.
- creator_
id str - Username ID of the domain creator.
- creator_
name str - Username of the domain creator.
- deadline str
- End date of image sharing (UTC). When the value is set to
forever
, the image will be permanently available for the domain. The validity period is calculated by day. The shared images expire at00:00:00
on the day after the end date. - description str
- Specifies SWR domain description.
- organization str
- The name of the repository organization.
- permission str
- Permission to be granted. Currently, only the
read
permission is supported. - repository str
- The name of the repository.
- status bool
- Indicates the domain is valid (
true
) or expired (false
). - swr_
domain_ strv2_ id - timeouts
Swr
Domain V2Timeouts Args - updated str
- Indicates the domain when was last updated.
- access
Domain String The name of the domain for image sharing.
access_domain
should be an existing OTC domain.- created String
- Indicates the creation time.
- creator
Id String - Username ID of the domain creator.
- creator
Name String - Username of the domain creator.
- deadline String
- End date of image sharing (UTC). When the value is set to
forever
, the image will be permanently available for the domain. The validity period is calculated by day. The shared images expire at00:00:00
on the day after the end date. - description String
- Specifies SWR domain description.
- organization String
- The name of the repository organization.
- permission String
- Permission to be granted. Currently, only the
read
permission is supported. - repository String
- The name of the repository.
- status Boolean
- Indicates the domain is valid (
true
) or expired (false
). - swr
Domain StringV2Id - timeouts Property Map
- updated String
- Indicates the domain when was last updated.
Supporting Types
SwrDomainV2Timeouts, SwrDomainV2TimeoutsArgs
- Default string
- Default string
- default_ String
- default string
- default str
- default String
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.