opensearch.ChannelConfiguration
Explore with Pulumi AI
Provides an OpenSearch channel configuration. Please refer to the OpenSearch channel configuration documentation for details.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opensearch from "@pulumi/opensearch";
// Create a channel configuration
const configuration1 = new opensearch.ChannelConfiguration("configuration1", {body: `{
"config_id": "configuration_1",
"config": {
"name": "name",
"description" : "description",
"config_type" : "slack",
"is_enabled" : true,
"slack": {
"url": "https://sample-slack-webhook"
}
}
}
`});
import pulumi
import pulumi_opensearch as opensearch
# Create a channel configuration
configuration1 = opensearch.ChannelConfiguration("configuration1", body="""{
"config_id": "configuration_1",
"config": {
"name": "name",
"description" : "description",
"config_type" : "slack",
"is_enabled" : true,
"slack": {
"url": "https://sample-slack-webhook"
}
}
}
""")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opensearch/v2/opensearch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a channel configuration
_, err := opensearch.NewChannelConfiguration(ctx, "configuration1", &opensearch.ChannelConfigurationArgs{
Body: pulumi.String(`{
"config_id": "configuration_1",
"config": {
"name": "name",
"description" : "description",
"config_type" : "slack",
"is_enabled" : true,
"slack": {
"url": "https://sample-slack-webhook"
}
}
}
`),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opensearch = Pulumi.Opensearch;
return await Deployment.RunAsync(() =>
{
// Create a channel configuration
var configuration1 = new Opensearch.ChannelConfiguration("configuration1", new()
{
Body = @"{
""config_id"": ""configuration_1"",
""config"": {
""name"": ""name"",
""description"" : ""description"",
""config_type"" : ""slack"",
""is_enabled"" : true,
""slack"": {
""url"": ""https://sample-slack-webhook""
}
}
}
",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opensearch.ChannelConfiguration;
import com.pulumi.opensearch.ChannelConfigurationArgs;
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) {
// Create a channel configuration
var configuration1 = new ChannelConfiguration("configuration1", ChannelConfigurationArgs.builder()
.body("""
{
"config_id": "configuration_1",
"config": {
"name": "name",
"description" : "description",
"config_type" : "slack",
"is_enabled" : true,
"slack": {
"url": "https://sample-slack-webhook"
}
}
}
""")
.build());
}
}
resources:
# Create a channel configuration
configuration1:
type: opensearch:ChannelConfiguration
properties:
body: |+
{
"config_id": "configuration_1",
"config": {
"name": "name",
"description" : "description",
"config_type" : "slack",
"is_enabled" : true,
"slack": {
"url": "https://sample-slack-webhook"
}
}
}
Create ChannelConfiguration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ChannelConfiguration(name: string, args: ChannelConfigurationArgs, opts?: CustomResourceOptions);
@overload
def ChannelConfiguration(resource_name: str,
args: ChannelConfigurationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ChannelConfiguration(resource_name: str,
opts: Optional[ResourceOptions] = None,
body: Optional[str] = None,
channel_configuration_id: Optional[str] = None)
func NewChannelConfiguration(ctx *Context, name string, args ChannelConfigurationArgs, opts ...ResourceOption) (*ChannelConfiguration, error)
public ChannelConfiguration(string name, ChannelConfigurationArgs args, CustomResourceOptions? opts = null)
public ChannelConfiguration(String name, ChannelConfigurationArgs args)
public ChannelConfiguration(String name, ChannelConfigurationArgs args, CustomResourceOptions options)
type: opensearch:ChannelConfiguration
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 ChannelConfigurationArgs
- 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 ChannelConfigurationArgs
- 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 ChannelConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ChannelConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ChannelConfigurationArgs
- 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 channelConfigurationResource = new Opensearch.ChannelConfiguration("channelConfigurationResource", new()
{
Body = "string",
ChannelConfigurationId = "string",
});
example, err := opensearch.NewChannelConfiguration(ctx, "channelConfigurationResource", &opensearch.ChannelConfigurationArgs{
Body: pulumi.String("string"),
ChannelConfigurationId: pulumi.String("string"),
})
var channelConfigurationResource = new ChannelConfiguration("channelConfigurationResource", ChannelConfigurationArgs.builder()
.body("string")
.channelConfigurationId("string")
.build());
channel_configuration_resource = opensearch.ChannelConfiguration("channelConfigurationResource",
body="string",
channel_configuration_id="string")
const channelConfigurationResource = new opensearch.ChannelConfiguration("channelConfigurationResource", {
body: "string",
channelConfigurationId: "string",
});
type: opensearch:ChannelConfiguration
properties:
body: string
channelConfigurationId: string
ChannelConfiguration 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 ChannelConfiguration resource accepts the following input properties:
- Body string
- The channel configuration document
- Channel
Configuration stringId - The ID of this resource.
- Body string
- The channel configuration document
- Channel
Configuration stringId - The ID of this resource.
- body String
- The channel configuration document
- channel
Configuration StringId - The ID of this resource.
- body string
- The channel configuration document
- channel
Configuration stringId - The ID of this resource.
- body str
- The channel configuration document
- channel_
configuration_ strid - The ID of this resource.
- body String
- The channel configuration document
- channel
Configuration StringId - The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ChannelConfiguration resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ChannelConfiguration Resource
Get an existing ChannelConfiguration 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?: ChannelConfigurationState, opts?: CustomResourceOptions): ChannelConfiguration
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
body: Optional[str] = None,
channel_configuration_id: Optional[str] = None) -> ChannelConfiguration
func GetChannelConfiguration(ctx *Context, name string, id IDInput, state *ChannelConfigurationState, opts ...ResourceOption) (*ChannelConfiguration, error)
public static ChannelConfiguration Get(string name, Input<string> id, ChannelConfigurationState? state, CustomResourceOptions? opts = null)
public static ChannelConfiguration get(String name, Output<String> id, ChannelConfigurationState state, CustomResourceOptions options)
resources: _: type: opensearch:ChannelConfiguration get: id: ${id}
- 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.
- Body string
- The channel configuration document
- Channel
Configuration stringId - The ID of this resource.
- Body string
- The channel configuration document
- Channel
Configuration stringId - The ID of this resource.
- body String
- The channel configuration document
- channel
Configuration StringId - The ID of this resource.
- body string
- The channel configuration document
- channel
Configuration stringId - The ID of this resource.
- body str
- The channel configuration document
- channel_
configuration_ strid - The ID of this resource.
- body String
- The channel configuration document
- channel
Configuration StringId - The ID of this resource.
Import
$ pulumi import opensearch:index/channelConfiguration:ChannelConfiguration configuration_1 configuration_1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- opensearch opensearch-project/terraform-provider-opensearch
- License
- Notes
- This Pulumi package is based on the
opensearch
Terraform Provider.