Show / Hide Table of Contents

Class Namespace

Provides a Rancher v2 Namespace resource. This can be used to create namespaces for Rancher v2 environments and retrieve their information.

Example Usage

using Pulumi;
using Rancher2 = Pulumi.Rancher2;

class MyStack : Stack
{
public MyStack()
{
    // Create a new rancher2 Namespace
    var foo = new Rancher2.Namespace("foo", new Rancher2.NamespaceArgs
    {
        ContainerResourceLimit = new Rancher2.Inputs.NamespaceContainerResourceLimitArgs
        {
            LimitsCpu = "20m",
            LimitsMemory = "20Mi",
            RequestsCpu = "1m",
            RequestsMemory = "1Mi",
        },
        Description = "foo namespace",
        ProjectId = "<PROJECT_ID>",
        ResourceQuota = new Rancher2.Inputs.NamespaceResourceQuotaArgs
        {
            Limit = new Rancher2.Inputs.NamespaceResourceQuotaLimitArgs
            {
                LimitsCpu = "100m",
                LimitsMemory = "100Mi",
                RequestsStorage = "1Gi",
            },
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Namespace
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.Rancher2
Assembly: Pulumi.Rancher2.dll
Syntax
public class Namespace : CustomResource

Constructors

View Source

Namespace(String, NamespaceArgs, CustomResourceOptions)

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

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

The unique name of the resource

NamespaceArgs 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

Annotations

Annotations for Node Pool object (map)

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

ContainerResourceLimit

Default containers resource limits on namespace (List maxitem:1)

Declaration
public Output<NamespaceContainerResourceLimit> ContainerResourceLimit { get; }
Property Value
Type Description
Output<NamespaceContainerResourceLimit>
View Source

Description

A namespace description (string)

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

Labels

Labels for Node Pool object (map)

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

Name

The name of the namespace (string)

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

ProjectId

The project id where assign namespace. It's on the form project_id=&lt;cluster_id>:&lt;id>. Updating &lt;id> part on same &lt;cluster_id> namespace will be moved between projects (string)

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

ResourceQuota

Resource quota for namespace. Rancher v2.1.x or higher (list maxitems:1)

Declaration
public Output<NamespaceResourceQuota> ResourceQuota { get; }
Property Value
Type Description
Output<NamespaceResourceQuota>
View Source

WaitForCluster

Wait for cluster becomes active. Default false (bool)

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

Methods

View Source

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

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

Declaration
public static Namespace Get(string name, Input<string> id, NamespaceState 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.

NamespaceState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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