Show / Hide Table of Contents

Class ContainerObject

Manages a V1 container object resource within OpenStack.

Example Usage

Example with simple content

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
public MyStack()
{
    var container1 = new OpenStack.ObjectStorage.Container("container1", new OpenStack.ObjectStorage.ContainerArgs
    {
        ContentType = "application/json",
        Metadata = 
        {
            { "test", "true" },
        },
        Region = "RegionOne",
    });
    var doc1 = new OpenStack.ObjectStorage.ContainerObject("doc1", new OpenStack.ObjectStorage.ContainerObjectArgs
    {
        ContainerName = container1.Name,
        Content = @"               {
             ""foo"" : ""bar""
           }

",
        ContentType = "application/json",
        Metadata = 
        {
            { "test", "true" },
        },
        Region = "RegionOne",
    });
}

}

Example with content from file

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
public MyStack()
{
    var container1 = new OpenStack.ObjectStorage.Container("container1", new OpenStack.ObjectStorage.ContainerArgs
    {
        ContentType = "application/json",
        Metadata = 
        {
            { "test", "true" },
        },
        Region = "RegionOne",
    });
    var doc1 = new OpenStack.ObjectStorage.ContainerObject("doc1", new OpenStack.ObjectStorage.ContainerObjectArgs
    {
        ContainerName = container1.Name,
        ContentType = "application/json",
        Metadata = 
        {
            { "test", "true" },
        },
        Region = "RegionOne",
        Source = "./default.json",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
ContainerObject
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.OpenStack.ObjectStorage
Assembly: Pulumi.OpenStack.dll
Syntax
public class ContainerObject : CustomResource

Constructors

View Source

ContainerObject(String, ContainerObjectArgs, CustomResourceOptions)

Create a ContainerObject resource with the given unique name, arguments, and options.

Declaration
public ContainerObject(string name, ContainerObjectArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ContainerObjectArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ContainerName

A unique (within an account) name for the container. The container name must be from 1 to 256 characters long and can start with any character and contain any pattern. Character set must be UTF-8. The container name cannot contain a slash (/) character because this character delimits the container and object name. For example, the path /v1/account/www/pages specifies the www container, not the www/pages container.

Declaration
public Output<string> ContainerName { get; }
Property Value
Type Description
Output<System.String>
View Source

Content

A string representing the content of the object. Conflicts with source and copy_from.

Declaration
public Output<string> Content { get; }
Property Value
Type Description
Output<System.String>
View Source

ContentDisposition

A string which specifies the override behavior for the browser. For example, this header might specify that the browser use a download program to save this file rather than show the file, which is the default.

Declaration
public Output<string> ContentDisposition { get; }
Property Value
Type Description
Output<System.String>
View Source

ContentEncoding

A string representing the value of the Content-Encoding metadata.

Declaration
public Output<string> ContentEncoding { get; }
Property Value
Type Description
Output<System.String>
View Source

ContentLength

If the operation succeeds, this value is zero (0) or the length of informational or error text in the response body.

Declaration
public Output<int> ContentLength { get; }
Property Value
Type Description
Output<System.Int32>
View Source

ContentType

A string which sets the MIME type for the object.

Declaration
public Output<string> ContentType { get; }
Property Value
Type Description
Output<System.String>
View Source

CopyFrom

A string representing the name of an object used to create the new object by copying the copy_from object. The value is in form {container}/{object}. You must UTF-8-encode and then URL-encode the names of the container and object before you include them in the header. Conflicts with source and content.

Declaration
public Output<string> CopyFrom { get; }
Property Value
Type Description
Output<System.String>
View Source

Date

The date and time the system responded to the request, using the preferred format of RFC 7231 as shown in this example Thu, 16 Jun 2016 15:10:38 GMT. The time is always in UTC.

Declaration
public Output<string> Date { get; }
Property Value
Type Description
Output<System.String>
View Source

DeleteAfter

An integer representing the number of seconds after which the system removes the object. Internally, the Object Storage system stores this value in the X-Delete-At metadata item.

Declaration
public Output<int?> DeleteAfter { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

DeleteAt

An string representing the date when the system removes the object. For example, "2015-08-26" is equivalent to Mon, Wed, 26 Aug 2015 00:00:00 GMT.

Declaration
public Output<string> DeleteAt { get; }
Property Value
Type Description
Output<System.String>
View Source

DetectContentType

If set to true, Object Storage guesses the content type based on the file extension and ignores the value sent in the Content-Type header, if present.

Declaration
public Output<bool?> DetectContentType { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Etag

Used to trigger updates. The only meaningful value is ${md5(file("path/to/file"))}.

Declaration
public Output<string> Etag { get; }
Property Value
Type Description
Output<System.String>
View Source

LastModified

The date and time when the object was last modified. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm For example, 2015-08-27T09:49:58-05:00. The ±hh:mm value, if included, is the time zone as an offset from UTC. In the previous example, the offset value is -05:00.

Declaration
public Output<string> LastModified { get; }
Property Value
Type Description
Output<System.String>
View Source

Metadata

Declaration
public Output<ImmutableDictionary<string, object>> Metadata { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

Name

A unique name for the object.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

ObjectManifest

A string set to specify that this is a dynamic large object manifest object. The value is the container and object name prefix of the segment objects in the form container/prefix. You must UTF-8-encode and then URL-encode the names of the container and prefix before you include them in this header.

Declaration
public Output<string> ObjectManifest { get; }
Property Value
Type Description
Output<System.String>
View Source

Region

The region in which to create the container. If omitted, the region argument of the provider is used. Changing this creates a new container.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

Source

A string representing the local path of a file which will be used as the object's content. Conflicts with source and copy_from.

Declaration
public Output<string> Source { get; }
Property Value
Type Description
Output<System.String>
View Source

TransId

A unique transaction ID for this request. Your service provider might need this value if you report a problem.

Declaration
public Output<string> TransId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, ContainerObjectState, CustomResourceOptions)

Get an existing ContainerObject resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static ContainerObject Get(string name, Input<string> id, ContainerObjectState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ContainerObjectState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
ContainerObject
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.