1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. SwrDomainV2
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud

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

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

    }
}
Copy
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
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. SwrDomainV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. SwrDomainV2Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SwrDomainV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
    },
});
Copy
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: &.SwrDomainV2TimeoutsArgs{
Default: pulumi.String("string"),
},
})
Copy
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());
Copy
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",
    })
Copy
const swrDomainV2Resource = new opentelekomcloud.SwrDomainV2("swrDomainV2Resource", {
    accessDomain: "string",
    deadline: "string",
    organization: "string",
    permission: "string",
    repository: "string",
    description: "string",
    swrDomainV2Id: "string",
    timeouts: {
        "default": "string",
    },
});
Copy
type: opentelekomcloud:SwrDomainV2
properties:
    accessDomain: string
    deadline: string
    description: string
    organization: string
    permission: string
    repository: string
    swrDomainV2Id: string
    timeouts:
        default: string
Copy

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:

AccessDomain This property is required. string

The name of the domain for image sharing.

access_domain should be an existing OTC domain.

Deadline This property is required. 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 at 00:00:00 on the day after the end date.
Organization This property is required. string
The name of the repository organization.
Permission This property is required. string
Permission to be granted. Currently, only the read permission is supported.
Repository This property is required. string
The name of the repository.
Description string
Specifies SWR domain description.
SwrDomainV2Id string
Timeouts SwrDomainV2Timeouts
AccessDomain This property is required. string

The name of the domain for image sharing.

access_domain should be an existing OTC domain.

Deadline This property is required. 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 at 00:00:00 on the day after the end date.
Organization This property is required. string
The name of the repository organization.
Permission This property is required. string
Permission to be granted. Currently, only the read permission is supported.
Repository This property is required. string
The name of the repository.
Description string
Specifies SWR domain description.
SwrDomainV2Id string
Timeouts SwrDomainV2TimeoutsArgs
accessDomain This property is required. String

The name of the domain for image sharing.

access_domain should be an existing OTC domain.

deadline This property is required. 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 at 00:00:00 on the day after the end date.
organization This property is required. String
The name of the repository organization.
permission This property is required. String
Permission to be granted. Currently, only the read permission is supported.
repository This property is required. String
The name of the repository.
description String
Specifies SWR domain description.
swrDomainV2Id String
timeouts SwrDomainV2Timeouts
accessDomain This property is required. string

The name of the domain for image sharing.

access_domain should be an existing OTC domain.

deadline This property is required. 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 at 00:00:00 on the day after the end date.
organization This property is required. string
The name of the repository organization.
permission This property is required. string
Permission to be granted. Currently, only the read permission is supported.
repository This property is required. string
The name of the repository.
description string
Specifies SWR domain description.
swrDomainV2Id string
timeouts SwrDomainV2Timeouts
access_domain This property is required. str

The name of the domain for image sharing.

access_domain should be an existing OTC domain.

deadline This property is required. 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 at 00:00:00 on the day after the end date.
organization This property is required. str
The name of the repository organization.
permission This property is required. str
Permission to be granted. Currently, only the read permission is supported.
repository This property is required. str
The name of the repository.
description str
Specifies SWR domain description.
swr_domain_v2_id str
timeouts SwrDomainV2TimeoutsArgs
accessDomain This property is required. String

The name of the domain for image sharing.

access_domain should be an existing OTC domain.

deadline This property is required. 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 at 00:00:00 on the day after the end date.
organization This property is required. String
The name of the repository organization.
permission This property is required. String
Permission to be granted. Currently, only the read permission is supported.
repository This property is required. String
The name of the repository.
description String
Specifies SWR domain description.
swrDomainV2Id String
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.
CreatorId string
Username ID of the domain creator.
CreatorName 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.
CreatorId string
Username ID of the domain creator.
CreatorName 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.
creatorId String
Username ID of the domain creator.
creatorName 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.
creatorId string
Username ID of the domain creator.
creatorName 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.
creatorId String
Username ID of the domain creator.
creatorName 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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
AccessDomain string

The name of the domain for image sharing.

access_domain should be an existing OTC domain.

Created string
Indicates the creation time.
CreatorId string
Username ID of the domain creator.
CreatorName 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 at 00: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).
SwrDomainV2Id string
Timeouts SwrDomainV2Timeouts
Updated string
Indicates the domain when was last updated.
AccessDomain string

The name of the domain for image sharing.

access_domain should be an existing OTC domain.

Created string
Indicates the creation time.
CreatorId string
Username ID of the domain creator.
CreatorName 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 at 00: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).
SwrDomainV2Id string
Timeouts SwrDomainV2TimeoutsArgs
Updated string
Indicates the domain when was last updated.
accessDomain String

The name of the domain for image sharing.

access_domain should be an existing OTC domain.

created String
Indicates the creation time.
creatorId String
Username ID of the domain creator.
creatorName 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 at 00: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).
swrDomainV2Id String
timeouts SwrDomainV2Timeouts
updated String
Indicates the domain when was last updated.
accessDomain string

The name of the domain for image sharing.

access_domain should be an existing OTC domain.

created string
Indicates the creation time.
creatorId string
Username ID of the domain creator.
creatorName 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 at 00: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).
swrDomainV2Id string
timeouts SwrDomainV2Timeouts
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 at 00: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_v2_id str
timeouts SwrDomainV2TimeoutsArgs
updated str
Indicates the domain when was last updated.
accessDomain String

The name of the domain for image sharing.

access_domain should be an existing OTC domain.

created String
Indicates the creation time.
creatorId String
Username ID of the domain creator.
creatorName 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 at 00: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).
swrDomainV2Id String
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 String

Package Details

Repository
opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
License
Notes
This Pulumi package is based on the opentelekomcloud Terraform Provider.