Show / Hide Table of Contents

Class CfnOutputProps

Inheritance
object
CfnOutputProps
Implements
ICfnOutputProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnOutputProps : ICfnOutputProps
Syntax (vb)
Public Class CfnOutputProps Implements ICfnOutputProps
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.S3;
            Cluster cluster;

            // add service account
            var serviceAccount = cluster.AddServiceAccount("MyServiceAccount");

            var bucket = new Bucket(this, "Bucket");
            bucket.GrantReadWrite(serviceAccount);

            var mypod = cluster.AddManifest("mypod", new Dictionary<string, object> {
                { "apiVersion", "v1" },
                { "kind", "Pod" },
                { "metadata", new Dictionary<string, string> { { "name", "mypod" } } },
                { "spec", new Dictionary<string, object> {
                    { "serviceAccountName", serviceAccount.ServiceAccountName },
                    { "containers", new [] { new Struct {
                        Name = "hello",
                        Image = "paulbouwer/hello-kubernetes:1.5",
                        Ports = new [] { new Struct { ContainerPort = 8080 } }
                    } } }
                } }
            });

            // create the resource after the service account.
            mypod.Node.AddDependency(serviceAccount);

            // print the IAM role arn for this service account
            // print the IAM role arn for this service account
            new CfnOutput(this, "ServiceAccountIamRole", new CfnOutputProps { Value = serviceAccount.Role.RoleArn });

Synopsis

Constructors

CfnOutputProps()

Properties

Condition

A condition to associate with this output value.

Description

A String type that describes the output value.

ExportName

The name used to export the value of this output across stacks.

Key

The key of the property returned by aws cloudformation describe-stacks command.

Value

The value of the property returned by the aws cloudformation describe-stacks command.

Constructors

CfnOutputProps()

public CfnOutputProps()
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.S3;
            Cluster cluster;

            // add service account
            var serviceAccount = cluster.AddServiceAccount("MyServiceAccount");

            var bucket = new Bucket(this, "Bucket");
            bucket.GrantReadWrite(serviceAccount);

            var mypod = cluster.AddManifest("mypod", new Dictionary<string, object> {
                { "apiVersion", "v1" },
                { "kind", "Pod" },
                { "metadata", new Dictionary<string, string> { { "name", "mypod" } } },
                { "spec", new Dictionary<string, object> {
                    { "serviceAccountName", serviceAccount.ServiceAccountName },
                    { "containers", new [] { new Struct {
                        Name = "hello",
                        Image = "paulbouwer/hello-kubernetes:1.5",
                        Ports = new [] { new Struct { ContainerPort = 8080 } }
                    } } }
                } }
            });

            // create the resource after the service account.
            mypod.Node.AddDependency(serviceAccount);

            // print the IAM role arn for this service account
            // print the IAM role arn for this service account
            new CfnOutput(this, "ServiceAccountIamRole", new CfnOutputProps { Value = serviceAccount.Role.RoleArn });

Properties

Condition

A condition to associate with this output value.

public CfnCondition? Condition { get; set; }
Property Value

CfnCondition

Remarks

If the condition evaluates to false, this output value will not be included in the stack.

Default: - No condition is associated with the output.

Description

A String type that describes the output value.

public string? Description { get; set; }
Property Value

string

Remarks

The description can be a maximum of 4 K in length.

Default: - No description.

ExportName

The name used to export the value of this output across stacks.

public string? ExportName { get; set; }
Property Value

string

Remarks

To import the value from another stack, use Fn.importValue(exportName).

Default: - the output is not exported

Key

The key of the property returned by aws cloudformation describe-stacks command.

public string? Key { get; set; }
Property Value

string

Remarks

ExampleMetadata: infused

Value

The value of the property returned by the aws cloudformation describe-stacks command.

public string Value { get; set; }
Property Value

string

Remarks

The value of an output can include literals, parameter references, pseudo-parameters, a mapping value, or intrinsic functions.

Implements

ICfnOutputProps
Back to top Generated by DocFX