ibm.EnSource
Explore with Pulumi AI
Create, update, or delete a source by using IBM Cloud™ Event Notifications.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const enSource = new ibm.EnSource("enSource", {
instanceGuid: ibm_resource_instance.en_terraform_test_resource.guid,
description: "API source for Event Notifications destinations",
enabled: true,
});
import pulumi
import pulumi_ibm as ibm
en_source = ibm.EnSource("enSource",
instance_guid=ibm_resource_instance["en_terraform_test_resource"]["guid"],
description="API source for Event Notifications destinations",
enabled=True)
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 {
_, err := ibm.NewEnSource(ctx, "enSource", &ibm.EnSourceArgs{
InstanceGuid: pulumi.Any(ibm_resource_instance.En_terraform_test_resource.Guid),
Description: pulumi.String("API source for Event Notifications destinations"),
Enabled: pulumi.Bool(true),
})
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 enSource = new Ibm.EnSource("enSource", new()
{
InstanceGuid = ibm_resource_instance.En_terraform_test_resource.Guid,
Description = "API source for Event Notifications destinations",
Enabled = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.EnSource;
import com.pulumi.ibm.EnSourceArgs;
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 enSource = new EnSource("enSource", EnSourceArgs.builder()
.instanceGuid(ibm_resource_instance.en_terraform_test_resource().guid())
.description("API source for Event Notifications destinations")
.enabled(true)
.build());
}
}
resources:
enSource:
type: ibm:EnSource
properties:
instanceGuid: ${ibm_resource_instance.en_terraform_test_resource.guid}
description: API source for Event Notifications destinations
enabled: true
Create EnSource Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EnSource(name: string, args: EnSourceArgs, opts?: CustomResourceOptions);
@overload
def EnSource(resource_name: str,
args: EnSourceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EnSource(resource_name: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
instance_guid: Optional[str] = None,
description: Optional[str] = None,
en_source_id: Optional[str] = None,
name: Optional[str] = None)
func NewEnSource(ctx *Context, name string, args EnSourceArgs, opts ...ResourceOption) (*EnSource, error)
public EnSource(string name, EnSourceArgs args, CustomResourceOptions? opts = null)
public EnSource(String name, EnSourceArgs args)
public EnSource(String name, EnSourceArgs args, CustomResourceOptions options)
type: ibm:EnSource
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 EnSourceArgs
- 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 EnSourceArgs
- 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 EnSourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EnSourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EnSourceArgs
- 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 enSourceResource = new Ibm.EnSource("enSourceResource", new()
{
Enabled = false,
InstanceGuid = "string",
Description = "string",
EnSourceId = "string",
Name = "string",
});
example, err := ibm.NewEnSource(ctx, "enSourceResource", &ibm.EnSourceArgs{
Enabled: pulumi.Bool(false),
InstanceGuid: pulumi.String("string"),
Description: pulumi.String("string"),
EnSourceId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var enSourceResource = new EnSource("enSourceResource", EnSourceArgs.builder()
.enabled(false)
.instanceGuid("string")
.description("string")
.enSourceId("string")
.name("string")
.build());
en_source_resource = ibm.EnSource("enSourceResource",
enabled=False,
instance_guid="string",
description="string",
en_source_id="string",
name="string")
const enSourceResource = new ibm.EnSource("enSourceResource", {
enabled: false,
instanceGuid: "string",
description: "string",
enSourceId: "string",
name: "string",
});
type: ibm:EnSource
properties:
description: string
enSourceId: string
enabled: false
instanceGuid: string
name: string
EnSource 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 EnSource resource accepts the following input properties:
- Enabled bool
- The enabled flag to enbale the created API source.
- Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Description string
- The Source description.
- En
Source stringId - (String) The unique identifier of the
en_source
. - Name string
- The Source name.
- Enabled bool
- The enabled flag to enbale the created API source.
- Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Description string
- The Source description.
- En
Source stringId - (String) The unique identifier of the
en_source
. - Name string
- The Source name.
- enabled Boolean
- The enabled flag to enbale the created API source.
- instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- description String
- The Source description.
- en
Source StringId - (String) The unique identifier of the
en_source
. - name String
- The Source name.
- enabled boolean
- The enabled flag to enbale the created API source.
- instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- description string
- The Source description.
- en
Source stringId - (String) The unique identifier of the
en_source
. - name string
- The Source name.
- enabled bool
- The enabled flag to enbale the created API source.
- instance_
guid str - Unique identifier for IBM Cloud Event Notifications instance.
- description str
- The Source description.
- en_
source_ strid - (String) The unique identifier of the
en_source
. - name str
- The Source name.
- enabled Boolean
- The enabled flag to enbale the created API source.
- instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- description String
- The Source description.
- en
Source StringId - (String) The unique identifier of the
en_source
. - name String
- The Source name.
Outputs
All input properties are implicitly available as output properties. Additionally, the EnSource resource produces the following output properties:
- id str
- The provider-assigned unique ID for this managed resource.
- source_
id str - (String) The unique identifier of the created source.
- updated_
at str - (String) Last updated time.
Look up Existing EnSource Resource
Get an existing EnSource 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?: EnSourceState, opts?: CustomResourceOptions): EnSource
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
en_source_id: Optional[str] = None,
enabled: Optional[bool] = None,
instance_guid: Optional[str] = None,
name: Optional[str] = None,
source_id: Optional[str] = None,
updated_at: Optional[str] = None) -> EnSource
func GetEnSource(ctx *Context, name string, id IDInput, state *EnSourceState, opts ...ResourceOption) (*EnSource, error)
public static EnSource Get(string name, Input<string> id, EnSourceState? state, CustomResourceOptions? opts = null)
public static EnSource get(String name, Output<String> id, EnSourceState state, CustomResourceOptions options)
resources: _: type: ibm:EnSource 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.
- Description string
- The Source description.
- En
Source stringId - (String) The unique identifier of the
en_source
. - Enabled bool
- The enabled flag to enbale the created API source.
- Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Name string
- The Source name.
- Source
Id string - (String) The unique identifier of the created source.
- Updated
At string - (String) Last updated time.
- Description string
- The Source description.
- En
Source stringId - (String) The unique identifier of the
en_source
. - Enabled bool
- The enabled flag to enbale the created API source.
- Instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- Name string
- The Source name.
- Source
Id string - (String) The unique identifier of the created source.
- Updated
At string - (String) Last updated time.
- description String
- The Source description.
- en
Source StringId - (String) The unique identifier of the
en_source
. - enabled Boolean
- The enabled flag to enbale the created API source.
- instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- name String
- The Source name.
- source
Id String - (String) The unique identifier of the created source.
- updated
At String - (String) Last updated time.
- description string
- The Source description.
- en
Source stringId - (String) The unique identifier of the
en_source
. - enabled boolean
- The enabled flag to enbale the created API source.
- instance
Guid string - Unique identifier for IBM Cloud Event Notifications instance.
- name string
- The Source name.
- source
Id string - (String) The unique identifier of the created source.
- updated
At string - (String) Last updated time.
- description str
- The Source description.
- en_
source_ strid - (String) The unique identifier of the
en_source
. - enabled bool
- The enabled flag to enbale the created API source.
- instance_
guid str - Unique identifier for IBM Cloud Event Notifications instance.
- name str
- The Source name.
- source_
id str - (String) The unique identifier of the created source.
- updated_
at str - (String) Last updated time.
- description String
- The Source description.
- en
Source StringId - (String) The unique identifier of the
en_source
. - enabled Boolean
- The enabled flag to enbale the created API source.
- instance
Guid String - Unique identifier for IBM Cloud Event Notifications instance.
- name String
- The Source name.
- source
Id String - (String) The unique identifier of the created source.
- updated
At String - (String) Last updated time.
Import
You can import the ibm_en_source
resource by using id
.
The id
property can be formed from instance_guid
, and source_id
in the following format:
<instance_guid>/<source_id>
instance_guid
: A string. Unique identifier for IBM Cloud Event Notifications instance.source_id
: A string. Unique identifier for Source.
Example
$ pulumi import ibm:index/enSource:EnSource en_source <instance_guid>/<source_id>
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.