Table of Contents

Class CfnOutputProps

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll
public class CfnOutputProps : ICfnOutputProps
Inheritance
CfnOutputProps
Implements
Inherited Members

Examples

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

Remarks

ExampleMetadata: infused

Constructors

CfnOutputProps()

public CfnOutputProps()

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

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.