Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 46 additions & 6 deletions packages/aws-cdk-lib/aws-appconfig/lib/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,15 @@ export class HostedConfiguration extends ConfigurationBase {
public readonly content: string;

/**
* The content type of the hosted configuration.
* The configuration content type, specified as a standard MIME type.
* Supported examples include:
* - `text/plain`
* - `application/json`
* - `application/octet-stream`
* - `application/x-yaml`
*
* For an up-to-date list of valid MIME types, see:
* https://www.iana.org/assignments/media-types/media-types.xhtml
*/
public readonly contentType?: string;

Expand Down Expand Up @@ -591,7 +599,7 @@ export class SourcedConfiguration extends ConfigurationBase {
private readonly locationUri: string;
private readonly _cfnConfigurationProfile: CfnConfigurationProfile;

constructor (scope: Construct, id: string, props: SourcedConfigurationProps) {
constructor(scope: Construct, id: string, props: SourcedConfigurationProps) {
super(scope, id, props);

this.location = props.location;
Expand Down Expand Up @@ -839,7 +847,15 @@ export abstract class ConfigurationContent {
* Defines the hosted configuration content from a file.
*
* @param inputPath The path to the file that defines configuration content
* @param contentType The content type of the configuration
* @param contentType The configuration content type, specified as a standard MIME type.
* Supported examples include:
* - `text/plain`
* - `application/json`
* - `application/octet-stream`
* - `application/x-yaml`
*
* For an up-to-date list of valid MIME types, see:
* https://www.iana.org/assignments/media-types/media-types.xhtml
*/
public static fromFile(inputPath: string, contentType?: string): ConfigurationContent {
return {
Expand All @@ -852,7 +868,15 @@ export abstract class ConfigurationContent {
* Defines the hosted configuration content from inline code.
*
* @param content The inline code that defines the configuration content
* @param contentType The content type of the configuration
* @param contentType The configuration content type, specified as a standard MIME type.
* Supported examples include:
* - `text/plain`
* - `application/json`
* - `application/octet-stream`
* - `application/x-yaml`
*
* For an up-to-date list of valid MIME types, see:
* https://www.iana.org/assignments/media-types/media-types.xhtml
*/
public static fromInline(content: string, contentType?: string): ConfigurationContent {
return {
Expand All @@ -865,7 +889,15 @@ export abstract class ConfigurationContent {
* Defines the hosted configuration content as JSON from inline code.
*
* @param content The inline code that defines the configuration content
* @param contentType The content type of the configuration
* @param contentType The configuration content type, specified as a standard MIME type.
* Supported examples include:
* - `text/plain`
* - `application/json`
* - `application/octet-stream`
* - `application/x-yaml`
*
* For an up-to-date list of valid MIME types, see:
* https://www.iana.org/assignments/media-types/media-types.xhtml
*/
public static fromInlineJson(content: string, contentType?: string): ConfigurationContent {
return {
Expand Down Expand Up @@ -904,7 +936,15 @@ export abstract class ConfigurationContent {
public abstract readonly content: string;

/**
* The configuration content type.
* The configuration content type, specified as a standard MIME type.
* Supported examples include:
* - `text/plain`
* - `application/json`
* - `application/octet-stream`
* - `application/x-yaml`
*
* For an up-to-date list of valid MIME types, see:
* https://www.iana.org/assignments/media-types/media-types.xhtml
*/
public abstract readonly contentType: string;
}
Expand Down
Loading