aws.appconfig.HostedConfigurationVersion
Explore with Pulumi AI
Provides an AppConfig Hosted Configuration Version resource.
Example Usage
Freeform
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.appconfig.HostedConfigurationVersion("example", {
applicationId: exampleAwsAppconfigApplication.id,
configurationProfileId: exampleAwsAppconfigConfigurationProfile.configurationProfileId,
description: "Example Freeform Hosted Configuration Version",
contentType: "application/json",
content: JSON.stringify({
foo: "bar",
fruit: [
"apple",
"pear",
"orange",
],
isThingEnabled: true,
}),
});
import pulumi
import json
import pulumi_aws as aws
example = aws.appconfig.HostedConfigurationVersion("example",
application_id=example_aws_appconfig_application["id"],
configuration_profile_id=example_aws_appconfig_configuration_profile["configurationProfileId"],
description="Example Freeform Hosted Configuration Version",
content_type="application/json",
content=json.dumps({
"foo": "bar",
"fruit": [
"apple",
"pear",
"orange",
],
"isThingEnabled": True,
}))
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appconfig"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"foo": "bar",
"fruit": []string{
"apple",
"pear",
"orange",
},
"isThingEnabled": true,
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = appconfig.NewHostedConfigurationVersion(ctx, "example", &appconfig.HostedConfigurationVersionArgs{
ApplicationId: pulumi.Any(exampleAwsAppconfigApplication.Id),
ConfigurationProfileId: pulumi.Any(exampleAwsAppconfigConfigurationProfile.ConfigurationProfileId),
Description: pulumi.String("Example Freeform Hosted Configuration Version"),
ContentType: pulumi.String("application/json"),
Content: pulumi.String(json0),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.AppConfig.HostedConfigurationVersion("example", new()
{
ApplicationId = exampleAwsAppconfigApplication.Id,
ConfigurationProfileId = exampleAwsAppconfigConfigurationProfile.ConfigurationProfileId,
Description = "Example Freeform Hosted Configuration Version",
ContentType = "application/json",
Content = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["foo"] = "bar",
["fruit"] = new[]
{
"apple",
"pear",
"orange",
},
["isThingEnabled"] = true,
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appconfig.HostedConfigurationVersion;
import com.pulumi.aws.appconfig.HostedConfigurationVersionArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new HostedConfigurationVersion("example", HostedConfigurationVersionArgs.builder()
.applicationId(exampleAwsAppconfigApplication.id())
.configurationProfileId(exampleAwsAppconfigConfigurationProfile.configurationProfileId())
.description("Example Freeform Hosted Configuration Version")
.contentType("application/json")
.content(serializeJson(
jsonObject(
jsonProperty("foo", "bar"),
jsonProperty("fruit", jsonArray(
"apple",
"pear",
"orange"
)),
jsonProperty("isThingEnabled", true)
)))
.build());
}
}
resources:
example:
type: aws:appconfig:HostedConfigurationVersion
properties:
applicationId: ${exampleAwsAppconfigApplication.id}
configurationProfileId: ${exampleAwsAppconfigConfigurationProfile.configurationProfileId}
description: Example Freeform Hosted Configuration Version
contentType: application/json
content:
fn::toJSON:
foo: bar
fruit:
- apple
- pear
- orange
isThingEnabled: true
Feature Flags
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.appconfig.HostedConfigurationVersion("example", {
applicationId: exampleAwsAppconfigApplication.id,
configurationProfileId: exampleAwsAppconfigConfigurationProfile.configurationProfileId,
description: "Example Feature Flag Configuration Version",
contentType: "application/json",
content: JSON.stringify({
flags: {
foo: {
name: "foo",
_deprecation: {
status: "planned",
},
},
bar: {
name: "bar",
attributes: {
someAttribute: {
constraints: {
type: "string",
required: true,
},
},
someOtherAttribute: {
constraints: {
type: "number",
required: true,
},
},
},
},
},
values: {
foo: {
enabled: "true",
},
bar: {
enabled: "true",
someAttribute: "Hello World",
someOtherAttribute: 123,
},
},
version: "1",
}),
});
import pulumi
import json
import pulumi_aws as aws
example = aws.appconfig.HostedConfigurationVersion("example",
application_id=example_aws_appconfig_application["id"],
configuration_profile_id=example_aws_appconfig_configuration_profile["configurationProfileId"],
description="Example Feature Flag Configuration Version",
content_type="application/json",
content=json.dumps({
"flags": {
"foo": {
"name": "foo",
"_deprecation": {
"status": "planned",
},
},
"bar": {
"name": "bar",
"attributes": {
"someAttribute": {
"constraints": {
"type": "string",
"required": True,
},
},
"someOtherAttribute": {
"constraints": {
"type": "number",
"required": True,
},
},
},
},
},
"values": {
"foo": {
"enabled": "true",
},
"bar": {
"enabled": "true",
"someAttribute": "Hello World",
"someOtherAttribute": 123,
},
},
"version": "1",
}))
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appconfig"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"flags": map[string]interface{}{
"foo": map[string]interface{}{
"name": "foo",
"_deprecation": map[string]interface{}{
"status": "planned",
},
},
"bar": map[string]interface{}{
"name": "bar",
"attributes": map[string]interface{}{
"someAttribute": map[string]interface{}{
"constraints": map[string]interface{}{
"type": "string",
"required": true,
},
},
"someOtherAttribute": map[string]interface{}{
"constraints": map[string]interface{}{
"type": "number",
"required": true,
},
},
},
},
},
"values": map[string]interface{}{
"foo": map[string]interface{}{
"enabled": "true",
},
"bar": map[string]interface{}{
"enabled": "true",
"someAttribute": "Hello World",
"someOtherAttribute": 123,
},
},
"version": "1",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = appconfig.NewHostedConfigurationVersion(ctx, "example", &appconfig.HostedConfigurationVersionArgs{
ApplicationId: pulumi.Any(exampleAwsAppconfigApplication.Id),
ConfigurationProfileId: pulumi.Any(exampleAwsAppconfigConfigurationProfile.ConfigurationProfileId),
Description: pulumi.String("Example Feature Flag Configuration Version"),
ContentType: pulumi.String("application/json"),
Content: pulumi.String(json0),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.AppConfig.HostedConfigurationVersion("example", new()
{
ApplicationId = exampleAwsAppconfigApplication.Id,
ConfigurationProfileId = exampleAwsAppconfigConfigurationProfile.ConfigurationProfileId,
Description = "Example Feature Flag Configuration Version",
ContentType = "application/json",
Content = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["flags"] = new Dictionary<string, object?>
{
["foo"] = new Dictionary<string, object?>
{
["name"] = "foo",
["_deprecation"] = new Dictionary<string, object?>
{
["status"] = "planned",
},
},
["bar"] = new Dictionary<string, object?>
{
["name"] = "bar",
["attributes"] = new Dictionary<string, object?>
{
["someAttribute"] = new Dictionary<string, object?>
{
["constraints"] = new Dictionary<string, object?>
{
["type"] = "string",
["required"] = true,
},
},
["someOtherAttribute"] = new Dictionary<string, object?>
{
["constraints"] = new Dictionary<string, object?>
{
["type"] = "number",
["required"] = true,
},
},
},
},
},
["values"] = new Dictionary<string, object?>
{
["foo"] = new Dictionary<string, object?>
{
["enabled"] = "true",
},
["bar"] = new Dictionary<string, object?>
{
["enabled"] = "true",
["someAttribute"] = "Hello World",
["someOtherAttribute"] = 123,
},
},
["version"] = "1",
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appconfig.HostedConfigurationVersion;
import com.pulumi.aws.appconfig.HostedConfigurationVersionArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new HostedConfigurationVersion("example", HostedConfigurationVersionArgs.builder()
.applicationId(exampleAwsAppconfigApplication.id())
.configurationProfileId(exampleAwsAppconfigConfigurationProfile.configurationProfileId())
.description("Example Feature Flag Configuration Version")
.contentType("application/json")
.content(serializeJson(
jsonObject(
jsonProperty("flags", jsonObject(
jsonProperty("foo", jsonObject(
jsonProperty("name", "foo"),
jsonProperty("_deprecation", jsonObject(
jsonProperty("status", "planned")
))
)),
jsonProperty("bar", jsonObject(
jsonProperty("name", "bar"),
jsonProperty("attributes", jsonObject(
jsonProperty("someAttribute", jsonObject(
jsonProperty("constraints", jsonObject(
jsonProperty("type", "string"),
jsonProperty("required", true)
))
)),
jsonProperty("someOtherAttribute", jsonObject(
jsonProperty("constraints", jsonObject(
jsonProperty("type", "number"),
jsonProperty("required", true)
))
))
))
))
)),
jsonProperty("values", jsonObject(
jsonProperty("foo", jsonObject(
jsonProperty("enabled", "true")
)),
jsonProperty("bar", jsonObject(
jsonProperty("enabled", "true"),
jsonProperty("someAttribute", "Hello World"),
jsonProperty("someOtherAttribute", 123)
))
)),
jsonProperty("version", "1")
)))
.build());
}
}
resources:
example:
type: aws:appconfig:HostedConfigurationVersion
properties:
applicationId: ${exampleAwsAppconfigApplication.id}
configurationProfileId: ${exampleAwsAppconfigConfigurationProfile.configurationProfileId}
description: Example Feature Flag Configuration Version
contentType: application/json
content:
fn::toJSON:
flags:
foo:
name: foo
_deprecation:
status: planned
bar:
name: bar
attributes:
someAttribute:
constraints:
type: string
required: true
someOtherAttribute:
constraints:
type: number
required: true
values:
foo:
enabled: 'true'
bar:
enabled: 'true'
someAttribute: Hello World
someOtherAttribute: 123
version: '1'
Create HostedConfigurationVersion Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new HostedConfigurationVersion(name: string, args: HostedConfigurationVersionArgs, opts?: CustomResourceOptions);
@overload
def HostedConfigurationVersion(resource_name: str,
args: HostedConfigurationVersionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def HostedConfigurationVersion(resource_name: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
configuration_profile_id: Optional[str] = None,
content: Optional[str] = None,
content_type: Optional[str] = None,
description: Optional[str] = None)
func NewHostedConfigurationVersion(ctx *Context, name string, args HostedConfigurationVersionArgs, opts ...ResourceOption) (*HostedConfigurationVersion, error)
public HostedConfigurationVersion(string name, HostedConfigurationVersionArgs args, CustomResourceOptions? opts = null)
public HostedConfigurationVersion(String name, HostedConfigurationVersionArgs args)
public HostedConfigurationVersion(String name, HostedConfigurationVersionArgs args, CustomResourceOptions options)
type: aws:appconfig:HostedConfigurationVersion
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args HostedConfigurationVersionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args HostedConfigurationVersionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args HostedConfigurationVersionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HostedConfigurationVersionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HostedConfigurationVersionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var hostedConfigurationVersionResource = new Aws.AppConfig.HostedConfigurationVersion("hostedConfigurationVersionResource", new()
{
ApplicationId = "string",
ConfigurationProfileId = "string",
Content = "string",
ContentType = "string",
Description = "string",
});
example, err := appconfig.NewHostedConfigurationVersion(ctx, "hostedConfigurationVersionResource", &appconfig.HostedConfigurationVersionArgs{
ApplicationId: pulumi.String("string"),
ConfigurationProfileId: pulumi.String("string"),
Content: pulumi.String("string"),
ContentType: pulumi.String("string"),
Description: pulumi.String("string"),
})
var hostedConfigurationVersionResource = new HostedConfigurationVersion("hostedConfigurationVersionResource", HostedConfigurationVersionArgs.builder()
.applicationId("string")
.configurationProfileId("string")
.content("string")
.contentType("string")
.description("string")
.build());
hosted_configuration_version_resource = aws.appconfig.HostedConfigurationVersion("hostedConfigurationVersionResource",
application_id="string",
configuration_profile_id="string",
content="string",
content_type="string",
description="string")
const hostedConfigurationVersionResource = new aws.appconfig.HostedConfigurationVersion("hostedConfigurationVersionResource", {
applicationId: "string",
configurationProfileId: "string",
content: "string",
contentType: "string",
description: "string",
});
type: aws:appconfig:HostedConfigurationVersion
properties:
applicationId: string
configurationProfileId: string
content: string
contentType: string
description: string
HostedConfigurationVersion Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The HostedConfigurationVersion resource accepts the following input properties:
- Application
Id string - Application ID.
- Configuration
Profile stringId - Configuration profile ID.
- Content string
- Content of the configuration or the configuration data.
- Content
Type string - Standard MIME type describing the format of the configuration content. For more information, see Content-Type.
- Description string
- Description of the configuration.
- Application
Id string - Application ID.
- Configuration
Profile stringId - Configuration profile ID.
- Content string
- Content of the configuration or the configuration data.
- Content
Type string - Standard MIME type describing the format of the configuration content. For more information, see Content-Type.
- Description string
- Description of the configuration.
- application
Id String - Application ID.
- configuration
Profile StringId - Configuration profile ID.
- content String
- Content of the configuration or the configuration data.
- content
Type String - Standard MIME type describing the format of the configuration content. For more information, see Content-Type.
- description String
- Description of the configuration.
- application
Id string - Application ID.
- configuration
Profile stringId - Configuration profile ID.
- content string
- Content of the configuration or the configuration data.
- content
Type string - Standard MIME type describing the format of the configuration content. For more information, see Content-Type.
- description string
- Description of the configuration.
- application_
id str - Application ID.
- configuration_
profile_ strid - Configuration profile ID.
- content str
- Content of the configuration or the configuration data.
- content_
type str - Standard MIME type describing the format of the configuration content. For more information, see Content-Type.
- description str
- Description of the configuration.
- application
Id String - Application ID.
- configuration
Profile StringId - Configuration profile ID.
- content String
- Content of the configuration or the configuration data.
- content
Type String - Standard MIME type describing the format of the configuration content. For more information, see Content-Type.
- description String
- Description of the configuration.
Outputs
All input properties are implicitly available as output properties. Additionally, the HostedConfigurationVersion resource produces the following output properties:
- Arn string
- ARN of the AppConfig hosted configuration version.
- Id string
- The provider-assigned unique ID for this managed resource.
- Version
Number int - Version number of the hosted configuration.
- Arn string
- ARN of the AppConfig hosted configuration version.
- Id string
- The provider-assigned unique ID for this managed resource.
- Version
Number int - Version number of the hosted configuration.
- arn String
- ARN of the AppConfig hosted configuration version.
- id String
- The provider-assigned unique ID for this managed resource.
- version
Number Integer - Version number of the hosted configuration.
- arn string
- ARN of the AppConfig hosted configuration version.
- id string
- The provider-assigned unique ID for this managed resource.
- version
Number number - Version number of the hosted configuration.
- arn str
- ARN of the AppConfig hosted configuration version.
- id str
- The provider-assigned unique ID for this managed resource.
- version_
number int - Version number of the hosted configuration.
- arn String
- ARN of the AppConfig hosted configuration version.
- id String
- The provider-assigned unique ID for this managed resource.
- version
Number Number - Version number of the hosted configuration.
Look up Existing HostedConfigurationVersion Resource
Get an existing HostedConfigurationVersion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: HostedConfigurationVersionState, opts?: CustomResourceOptions): HostedConfigurationVersion
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
arn: Optional[str] = None,
configuration_profile_id: Optional[str] = None,
content: Optional[str] = None,
content_type: Optional[str] = None,
description: Optional[str] = None,
version_number: Optional[int] = None) -> HostedConfigurationVersion
func GetHostedConfigurationVersion(ctx *Context, name string, id IDInput, state *HostedConfigurationVersionState, opts ...ResourceOption) (*HostedConfigurationVersion, error)
public static HostedConfigurationVersion Get(string name, Input<string> id, HostedConfigurationVersionState? state, CustomResourceOptions? opts = null)
public static HostedConfigurationVersion get(String name, Output<String> id, HostedConfigurationVersionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Application
Id string - Application ID.
- Arn string
- ARN of the AppConfig hosted configuration version.
- Configuration
Profile stringId - Configuration profile ID.
- Content string
- Content of the configuration or the configuration data.
- Content
Type string - Standard MIME type describing the format of the configuration content. For more information, see Content-Type.
- Description string
- Description of the configuration.
- Version
Number int - Version number of the hosted configuration.
- Application
Id string - Application ID.
- Arn string
- ARN of the AppConfig hosted configuration version.
- Configuration
Profile stringId - Configuration profile ID.
- Content string
- Content of the configuration or the configuration data.
- Content
Type string - Standard MIME type describing the format of the configuration content. For more information, see Content-Type.
- Description string
- Description of the configuration.
- Version
Number int - Version number of the hosted configuration.
- application
Id String - Application ID.
- arn String
- ARN of the AppConfig hosted configuration version.
- configuration
Profile StringId - Configuration profile ID.
- content String
- Content of the configuration or the configuration data.
- content
Type String - Standard MIME type describing the format of the configuration content. For more information, see Content-Type.
- description String
- Description of the configuration.
- version
Number Integer - Version number of the hosted configuration.
- application
Id string - Application ID.
- arn string
- ARN of the AppConfig hosted configuration version.
- configuration
Profile stringId - Configuration profile ID.
- content string
- Content of the configuration or the configuration data.
- content
Type string - Standard MIME type describing the format of the configuration content. For more information, see Content-Type.
- description string
- Description of the configuration.
- version
Number number - Version number of the hosted configuration.
- application_
id str - Application ID.
- arn str
- ARN of the AppConfig hosted configuration version.
- configuration_
profile_ strid - Configuration profile ID.
- content str
- Content of the configuration or the configuration data.
- content_
type str - Standard MIME type describing the format of the configuration content. For more information, see Content-Type.
- description str
- Description of the configuration.
- version_
number int - Version number of the hosted configuration.
- application
Id String - Application ID.
- arn String
- ARN of the AppConfig hosted configuration version.
- configuration
Profile StringId - Configuration profile ID.
- content String
- Content of the configuration or the configuration data.
- content
Type String - Standard MIME type describing the format of the configuration content. For more information, see Content-Type.
- description String
- Description of the configuration.
- version
Number Number - Version number of the hosted configuration.
Import
Using pulumi import
, import AppConfig Hosted Configuration Versions using the application ID, configuration profile ID, and version number separated by a slash (/
). For example:
$ pulumi import aws:appconfig/hostedConfigurationVersion:HostedConfigurationVersion example 71abcde/11xxxxx/2
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.