1. Packages
  2. Ibm Provider
  3. API Docs
  4. EnSource
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

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,
});
Copy
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)
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
resources:
  enSource:
    type: ibm:EnSource
    properties:
      instanceGuid: ${ibm_resource_instance.en_terraform_test_resource.guid}
      description: API source for Event Notifications destinations
      enabled: true
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. EnSourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. EnSourceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. EnSourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
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"),
})
Copy
var enSourceResource = new EnSource("enSourceResource", EnSourceArgs.builder()
    .enabled(false)
    .instanceGuid("string")
    .description("string")
    .enSourceId("string")
    .name("string")
    .build());
Copy
en_source_resource = ibm.EnSource("enSourceResource",
    enabled=False,
    instance_guid="string",
    description="string",
    en_source_id="string",
    name="string")
Copy
const enSourceResource = new ibm.EnSource("enSourceResource", {
    enabled: false,
    instanceGuid: "string",
    description: "string",
    enSourceId: "string",
    name: "string",
});
Copy
type: ibm:EnSource
properties:
    description: string
    enSourceId: string
    enabled: false
    instanceGuid: string
    name: string
Copy

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 This property is required. bool
The enabled flag to enbale the created API source.
InstanceGuid This property is required. string
Unique identifier for IBM Cloud Event Notifications instance.
Description string
The Source description.
EnSourceId string
(String) The unique identifier of the en_source.
Name string
The Source name.
Enabled This property is required. bool
The enabled flag to enbale the created API source.
InstanceGuid This property is required. string
Unique identifier for IBM Cloud Event Notifications instance.
Description string
The Source description.
EnSourceId string
(String) The unique identifier of the en_source.
Name string
The Source name.
enabled This property is required. Boolean
The enabled flag to enbale the created API source.
instanceGuid This property is required. String
Unique identifier for IBM Cloud Event Notifications instance.
description String
The Source description.
enSourceId String
(String) The unique identifier of the en_source.
name String
The Source name.
enabled This property is required. boolean
The enabled flag to enbale the created API source.
instanceGuid This property is required. string
Unique identifier for IBM Cloud Event Notifications instance.
description string
The Source description.
enSourceId string
(String) The unique identifier of the en_source.
name string
The Source name.
enabled This property is required. bool
The enabled flag to enbale the created API source.
instance_guid This property is required. str
Unique identifier for IBM Cloud Event Notifications instance.
description str
The Source description.
en_source_id str
(String) The unique identifier of the en_source.
name str
The Source name.
enabled This property is required. Boolean
The enabled flag to enbale the created API source.
instanceGuid This property is required. String
Unique identifier for IBM Cloud Event Notifications instance.
description String
The Source description.
enSourceId String
(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 string
The provider-assigned unique ID for this managed resource.
SourceId string
(String) The unique identifier of the created source.
UpdatedAt string
(String) Last updated time.
Id string
The provider-assigned unique ID for this managed resource.
SourceId string
(String) The unique identifier of the created source.
UpdatedAt string
(String) Last updated time.
id String
The provider-assigned unique ID for this managed resource.
sourceId String
(String) The unique identifier of the created source.
updatedAt String
(String) Last updated time.
id string
The provider-assigned unique ID for this managed resource.
sourceId string
(String) The unique identifier of the created source.
updatedAt string
(String) Last updated time.
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.
id String
The provider-assigned unique ID for this managed resource.
sourceId String
(String) The unique identifier of the created source.
updatedAt String
(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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
Description string
The Source description.
EnSourceId string
(String) The unique identifier of the en_source.
Enabled bool
The enabled flag to enbale the created API source.
InstanceGuid string
Unique identifier for IBM Cloud Event Notifications instance.
Name string
The Source name.
SourceId string
(String) The unique identifier of the created source.
UpdatedAt string
(String) Last updated time.
Description string
The Source description.
EnSourceId string
(String) The unique identifier of the en_source.
Enabled bool
The enabled flag to enbale the created API source.
InstanceGuid string
Unique identifier for IBM Cloud Event Notifications instance.
Name string
The Source name.
SourceId string
(String) The unique identifier of the created source.
UpdatedAt string
(String) Last updated time.
description String
The Source description.
enSourceId String
(String) The unique identifier of the en_source.
enabled Boolean
The enabled flag to enbale the created API source.
instanceGuid String
Unique identifier for IBM Cloud Event Notifications instance.
name String
The Source name.
sourceId String
(String) The unique identifier of the created source.
updatedAt String
(String) Last updated time.
description string
The Source description.
enSourceId string
(String) The unique identifier of the en_source.
enabled boolean
The enabled flag to enbale the created API source.
instanceGuid string
Unique identifier for IBM Cloud Event Notifications instance.
name string
The Source name.
sourceId string
(String) The unique identifier of the created source.
updatedAt string
(String) Last updated time.
description str
The Source description.
en_source_id str
(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.
enSourceId String
(String) The unique identifier of the en_source.
enabled Boolean
The enabled flag to enbale the created API source.
instanceGuid String
Unique identifier for IBM Cloud Event Notifications instance.
name String
The Source name.
sourceId String
(String) The unique identifier of the created source.
updatedAt 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>
Copy

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.