Class CfnConfiguration
Creates a new MSK configuration.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.MSK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnConfiguration : CfnResource, IInspectable
Syntax (vb)
Public Class CfnConfiguration
Inherits CfnResource
Implements IInspectable
Remarks
To see an example of how to use this operation, first save the following text to a file and name the file config-file.txt .
auto.create.topics.enable = true zookeeper.connection.timeout.ms = 1000 log.roll.ms = 604800000
Now run the following Python 3.6 script in the folder where you saved config-file.txt . This script uses the properties specified in config-file.txt to create a configuration named SalesClusterConfiguration
. This configuration can work with Apache Kafka versions 1.1.1 and 2.1.0.
import boto3 client = boto3.client('kafka') config_file = open('config-file.txt', 'r') server_properties = config_file.read() response = client.create_configuration( Name='SalesClusterConfiguration', Description='The configuration to use on all sales clusters.', KafkaVersions=['1.1.1', '2.1.0'], ServerProperties=server_properties
) print(response)
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-configuration.html
CloudformationResource: AWS::MSK::Configuration
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MSK;
var cfnConfiguration = new CfnConfiguration(this, "MyCfnConfiguration", new CfnConfigurationProps {
Name = "name",
ServerProperties = "serverProperties",
// the properties below are optional
Description = "description",
KafkaVersionsList = new [] { "kafkaVersionsList" },
LatestRevision = new LatestRevisionProperty {
CreationTime = "creationTime",
Description = "description",
Revision = 123
}
});
Synopsis
Constructors
CfnConfiguration(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnConfiguration(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnConfiguration(Construct, String, ICfnConfigurationProps) |
Properties
AttrArn | |
AttrLatestRevisionCreationTime | The time when the configuration was created. |
AttrLatestRevisionDescription | The description of the configuration. |
AttrLatestRevisionRevision | A string that uniquely identifies a revision of an MSK configuration. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Description | The description of the configuration. |
KafkaVersionsList | |
LatestRevision | Latest revision of the configuration. |
Name | The name of the configuration. |
ServerProperties | Contents of the server.properties file. When using the API, you must ensure that the contents of the file are base64 encoded. When using the console, the SDK, or the CLI, the contents of server.properties can be in plaintext. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnConfiguration(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnConfiguration(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnConfiguration(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnConfiguration(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnConfiguration(Construct, String, ICfnConfigurationProps)
public CfnConfiguration(Construct scope, string id, ICfnConfigurationProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnConfigurationProps
Resource properties.
Properties
AttrArn
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrLatestRevisionCreationTime
The time when the configuration was created.
public virtual string AttrLatestRevisionCreationTime { get; }
Property Value
System.String
Remarks
CloudformationAttribute: LatestRevision.CreationTime
AttrLatestRevisionDescription
The description of the configuration.
public virtual string AttrLatestRevisionDescription { get; }
Property Value
System.String
Remarks
CloudformationAttribute: LatestRevision.Description
AttrLatestRevisionRevision
A string that uniquely identifies a revision of an MSK configuration.
public virtual double AttrLatestRevisionRevision { get; }
Property Value
System.Double
Remarks
CloudformationAttribute: LatestRevision.Revision
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Description
The description of the configuration.
public virtual string Description { get; set; }
Property Value
System.String
KafkaVersionsList
public virtual string[] KafkaVersionsList { get; set; }
Property Value
System.String[]
LatestRevision
Latest revision of the configuration.
public virtual object LatestRevision { get; set; }
Property Value
System.Object
Name
The name of the configuration.
public virtual string Name { get; set; }
Property Value
System.String
ServerProperties
Contents of the server.properties file. When using the API, you must ensure that the contents of the file are base64 encoded. When using the console, the SDK, or the CLI, the contents of server.properties can be in plaintext.
public virtual string ServerProperties { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>