ibm.EventStreamsMirroringConfig
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const esInstance = ibm.getResourceInstance({
name: "terraform-integration",
resourceGroupId: data.ibm_resource_group.group.id,
});
const esMirroringConfig = new ibm.EventStreamsMirroringConfig("esMirroringConfig", {
resourceInstanceId: esInstance.then(esInstance => esInstance.id),
mirroringTopicPatterns: [
"topicA",
"topicB",
],
});
import pulumi
import pulumi_ibm as ibm
es_instance = ibm.get_resource_instance(name="terraform-integration",
resource_group_id=data["ibm_resource_group"]["group"]["id"])
es_mirroring_config = ibm.EventStreamsMirroringConfig("esMirroringConfig",
resource_instance_id=es_instance.id,
mirroring_topic_patterns=[
"topicA",
"topicB",
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
esInstance, err := ibm.LookupResourceInstance(ctx, &ibm.LookupResourceInstanceArgs{
Name: pulumi.StringRef("terraform-integration"),
ResourceGroupId: pulumi.StringRef(data.Ibm_resource_group.Group.Id),
}, nil)
if err != nil {
return err
}
_, err = ibm.NewEventStreamsMirroringConfig(ctx, "esMirroringConfig", &ibm.EventStreamsMirroringConfigArgs{
ResourceInstanceId: pulumi.String(esInstance.Id),
MirroringTopicPatterns: pulumi.StringArray{
pulumi.String("topicA"),
pulumi.String("topicB"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var esInstance = Ibm.GetResourceInstance.Invoke(new()
{
Name = "terraform-integration",
ResourceGroupId = data.Ibm_resource_group.Group.Id,
});
var esMirroringConfig = new Ibm.EventStreamsMirroringConfig("esMirroringConfig", new()
{
ResourceInstanceId = esInstance.Apply(getResourceInstanceResult => getResourceInstanceResult.Id),
MirroringTopicPatterns = new[]
{
"topicA",
"topicB",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetResourceInstanceArgs;
import com.pulumi.ibm.EventStreamsMirroringConfig;
import com.pulumi.ibm.EventStreamsMirroringConfigArgs;
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) {
final var esInstance = IbmFunctions.getResourceInstance(GetResourceInstanceArgs.builder()
.name("terraform-integration")
.resourceGroupId(data.ibm_resource_group().group().id())
.build());
var esMirroringConfig = new EventStreamsMirroringConfig("esMirroringConfig", EventStreamsMirroringConfigArgs.builder()
.resourceInstanceId(esInstance.applyValue(getResourceInstanceResult -> getResourceInstanceResult.id()))
.mirroringTopicPatterns(
"topicA",
"topicB")
.build());
}
}
resources:
esMirroringConfig:
type: ibm:EventStreamsMirroringConfig
properties:
resourceInstanceId: ${esInstance.id}
mirroringTopicPatterns:
- topicA
- topicB
variables:
esInstance:
fn::invoke:
function: ibm:getResourceInstance
arguments:
name: terraform-integration
resourceGroupId: ${data.ibm_resource_group.group.id}
Create EventStreamsMirroringConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EventStreamsMirroringConfig(name: string, args: EventStreamsMirroringConfigArgs, opts?: CustomResourceOptions);
@overload
def EventStreamsMirroringConfig(resource_name: str,
args: EventStreamsMirroringConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EventStreamsMirroringConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
mirroring_topic_patterns: Optional[Sequence[str]] = None,
resource_instance_id: Optional[str] = None,
event_streams_mirroring_config_id: Optional[str] = None)
func NewEventStreamsMirroringConfig(ctx *Context, name string, args EventStreamsMirroringConfigArgs, opts ...ResourceOption) (*EventStreamsMirroringConfig, error)
public EventStreamsMirroringConfig(string name, EventStreamsMirroringConfigArgs args, CustomResourceOptions? opts = null)
public EventStreamsMirroringConfig(String name, EventStreamsMirroringConfigArgs args)
public EventStreamsMirroringConfig(String name, EventStreamsMirroringConfigArgs args, CustomResourceOptions options)
type: ibm:EventStreamsMirroringConfig
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 EventStreamsMirroringConfigArgs
- 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 EventStreamsMirroringConfigArgs
- 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 EventStreamsMirroringConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EventStreamsMirroringConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EventStreamsMirroringConfigArgs
- 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 eventStreamsMirroringConfigResource = new Ibm.EventStreamsMirroringConfig("eventStreamsMirroringConfigResource", new()
{
MirroringTopicPatterns = new[]
{
"string",
},
ResourceInstanceId = "string",
EventStreamsMirroringConfigId = "string",
});
example, err := ibm.NewEventStreamsMirroringConfig(ctx, "eventStreamsMirroringConfigResource", &ibm.EventStreamsMirroringConfigArgs{
MirroringTopicPatterns: pulumi.StringArray{
pulumi.String("string"),
},
ResourceInstanceId: pulumi.String("string"),
EventStreamsMirroringConfigId: pulumi.String("string"),
})
var eventStreamsMirroringConfigResource = new EventStreamsMirroringConfig("eventStreamsMirroringConfigResource", EventStreamsMirroringConfigArgs.builder()
.mirroringTopicPatterns("string")
.resourceInstanceId("string")
.eventStreamsMirroringConfigId("string")
.build());
event_streams_mirroring_config_resource = ibm.EventStreamsMirroringConfig("eventStreamsMirroringConfigResource",
mirroring_topic_patterns=["string"],
resource_instance_id="string",
event_streams_mirroring_config_id="string")
const eventStreamsMirroringConfigResource = new ibm.EventStreamsMirroringConfig("eventStreamsMirroringConfigResource", {
mirroringTopicPatterns: ["string"],
resourceInstanceId: "string",
eventStreamsMirroringConfigId: "string",
});
type: ibm:EventStreamsMirroringConfig
properties:
eventStreamsMirroringConfigId: string
mirroringTopicPatterns:
- string
resourceInstanceId: string
EventStreamsMirroringConfig 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 EventStreamsMirroringConfig resource accepts the following input properties:
- Mirroring
Topic List<string>Patterns - The topic selection patterns to set in instance
- Resource
Instance stringId - The ID or CRN of the Event Streams service instance.
- Event
Streams stringMirroring Config Id - (String) The ID of the mirroring config in CRN format. For example,
crn:v1:bluemix:public:messagehub:us-south:a/6db1b0d0b5c54ee5c201552547febcd8:cb5a0252-8b8d-4390-b017-80b743d32839:mirroring-config:
.
- Mirroring
Topic []stringPatterns - The topic selection patterns to set in instance
- Resource
Instance stringId - The ID or CRN of the Event Streams service instance.
- Event
Streams stringMirroring Config Id - (String) The ID of the mirroring config in CRN format. For example,
crn:v1:bluemix:public:messagehub:us-south:a/6db1b0d0b5c54ee5c201552547febcd8:cb5a0252-8b8d-4390-b017-80b743d32839:mirroring-config:
.
- mirroring
Topic List<String>Patterns - The topic selection patterns to set in instance
- resource
Instance StringId - The ID or CRN of the Event Streams service instance.
- event
Streams StringMirroring Config Id - (String) The ID of the mirroring config in CRN format. For example,
crn:v1:bluemix:public:messagehub:us-south:a/6db1b0d0b5c54ee5c201552547febcd8:cb5a0252-8b8d-4390-b017-80b743d32839:mirroring-config:
.
- mirroring
Topic string[]Patterns - The topic selection patterns to set in instance
- resource
Instance stringId - The ID or CRN of the Event Streams service instance.
- event
Streams stringMirroring Config Id - (String) The ID of the mirroring config in CRN format. For example,
crn:v1:bluemix:public:messagehub:us-south:a/6db1b0d0b5c54ee5c201552547febcd8:cb5a0252-8b8d-4390-b017-80b743d32839:mirroring-config:
.
- mirroring_
topic_ Sequence[str]patterns - The topic selection patterns to set in instance
- resource_
instance_ strid - The ID or CRN of the Event Streams service instance.
- event_
streams_ strmirroring_ config_ id - (String) The ID of the mirroring config in CRN format. For example,
crn:v1:bluemix:public:messagehub:us-south:a/6db1b0d0b5c54ee5c201552547febcd8:cb5a0252-8b8d-4390-b017-80b743d32839:mirroring-config:
.
- mirroring
Topic List<String>Patterns - The topic selection patterns to set in instance
- resource
Instance StringId - The ID or CRN of the Event Streams service instance.
- event
Streams StringMirroring Config Id - (String) The ID of the mirroring config in CRN format. For example,
crn:v1:bluemix:public:messagehub:us-south:a/6db1b0d0b5c54ee5c201552547febcd8:cb5a0252-8b8d-4390-b017-80b743d32839:mirroring-config:
.
Outputs
All input properties are implicitly available as output properties. Additionally, the EventStreamsMirroringConfig 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 EventStreamsMirroringConfig Resource
Get an existing EventStreamsMirroringConfig 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?: EventStreamsMirroringConfigState, opts?: CustomResourceOptions): EventStreamsMirroringConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
event_streams_mirroring_config_id: Optional[str] = None,
mirroring_topic_patterns: Optional[Sequence[str]] = None,
resource_instance_id: Optional[str] = None) -> EventStreamsMirroringConfig
func GetEventStreamsMirroringConfig(ctx *Context, name string, id IDInput, state *EventStreamsMirroringConfigState, opts ...ResourceOption) (*EventStreamsMirroringConfig, error)
public static EventStreamsMirroringConfig Get(string name, Input<string> id, EventStreamsMirroringConfigState? state, CustomResourceOptions? opts = null)
public static EventStreamsMirroringConfig get(String name, Output<String> id, EventStreamsMirroringConfigState state, CustomResourceOptions options)
resources: _: type: ibm:EventStreamsMirroringConfig 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.
- Event
Streams stringMirroring Config Id - (String) The ID of the mirroring config in CRN format. For example,
crn:v1:bluemix:public:messagehub:us-south:a/6db1b0d0b5c54ee5c201552547febcd8:cb5a0252-8b8d-4390-b017-80b743d32839:mirroring-config:
. - Mirroring
Topic List<string>Patterns - The topic selection patterns to set in instance
- Resource
Instance stringId - The ID or CRN of the Event Streams service instance.
- Event
Streams stringMirroring Config Id - (String) The ID of the mirroring config in CRN format. For example,
crn:v1:bluemix:public:messagehub:us-south:a/6db1b0d0b5c54ee5c201552547febcd8:cb5a0252-8b8d-4390-b017-80b743d32839:mirroring-config:
. - Mirroring
Topic []stringPatterns - The topic selection patterns to set in instance
- Resource
Instance stringId - The ID or CRN of the Event Streams service instance.
- event
Streams StringMirroring Config Id - (String) The ID of the mirroring config in CRN format. For example,
crn:v1:bluemix:public:messagehub:us-south:a/6db1b0d0b5c54ee5c201552547febcd8:cb5a0252-8b8d-4390-b017-80b743d32839:mirroring-config:
. - mirroring
Topic List<String>Patterns - The topic selection patterns to set in instance
- resource
Instance StringId - The ID or CRN of the Event Streams service instance.
- event
Streams stringMirroring Config Id - (String) The ID of the mirroring config in CRN format. For example,
crn:v1:bluemix:public:messagehub:us-south:a/6db1b0d0b5c54ee5c201552547febcd8:cb5a0252-8b8d-4390-b017-80b743d32839:mirroring-config:
. - mirroring
Topic string[]Patterns - The topic selection patterns to set in instance
- resource
Instance stringId - The ID or CRN of the Event Streams service instance.
- event_
streams_ strmirroring_ config_ id - (String) The ID of the mirroring config in CRN format. For example,
crn:v1:bluemix:public:messagehub:us-south:a/6db1b0d0b5c54ee5c201552547febcd8:cb5a0252-8b8d-4390-b017-80b743d32839:mirroring-config:
. - mirroring_
topic_ Sequence[str]patterns - The topic selection patterns to set in instance
- resource_
instance_ strid - The ID or CRN of the Event Streams service instance.
- event
Streams StringMirroring Config Id - (String) The ID of the mirroring config in CRN format. For example,
crn:v1:bluemix:public:messagehub:us-south:a/6db1b0d0b5c54ee5c201552547febcd8:cb5a0252-8b8d-4390-b017-80b743d32839:mirroring-config:
. - mirroring
Topic List<String>Patterns - The topic selection patterns to set in instance
- resource
Instance StringId - The ID or CRN of the Event Streams service instance.
Import
The ibm_event_streams_mirroring_config
resource can be imported by using the rule’s CRN
, which is the id
described above: the CRN of the service instance, with resource type “mirroring-config”.
Syntax
$ pulumi import ibm:index/eventStreamsMirroringConfig:EventStreamsMirroringConfig es_mirroring_config <crn>
Example
$ pulumi import ibm:index/eventStreamsMirroringConfig:EventStreamsMirroringConfig es_mirroring_config crn:v1:bluemix:public:messagehub:us-south:a/6db1b0d0b5c54ee5c201552547febcd8:cb5a0252-8b8d-4390-b017-80b743d32839:mirroring-config:
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.