Channel
Channel info. Uses Azure REST API version 2025-02-15. In version 2.x of the Azure Native provider, it used API version 2022-06-15. Other available API versions: 2022-06-15, 2023-06-01-preview, 2023-12-15-preview, 2024-06-01-preview, 2024-12-15-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native eventgrid [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Channels_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var channel = new AzureNative.EventGrid.Channel("channel", new()
{
ChannelName = "exampleChannelName1",
ChannelType = AzureNative.EventGrid.ChannelType.PartnerTopic,
ExpirationTimeIfNotActivatedUtc = "2021-10-21T22:50:25.410433Z",
MessageForActivation = "Example message to approver",
PartnerNamespaceName = "examplePartnerNamespaceName1",
PartnerTopicInfo = new AzureNative.EventGrid.Inputs.PartnerTopicInfoArgs
{
AzureSubscriptionId = "5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
Name = "examplePartnerTopic1",
ResourceGroupName = "examplerg2",
Source = "ContosoCorp.Accounts.User1",
},
ResourceGroupName = "examplerg",
});
});
package main
import (
eventgrid "github.com/pulumi/pulumi-azure-native-sdk/eventgrid/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := eventgrid.NewChannel(ctx, "channel", &eventgrid.ChannelArgs{
ChannelName: pulumi.String("exampleChannelName1"),
ChannelType: pulumi.String(eventgrid.ChannelTypePartnerTopic),
ExpirationTimeIfNotActivatedUtc: pulumi.String("2021-10-21T22:50:25.410433Z"),
MessageForActivation: pulumi.String("Example message to approver"),
PartnerNamespaceName: pulumi.String("examplePartnerNamespaceName1"),
PartnerTopicInfo: &eventgrid.PartnerTopicInfoArgs{
AzureSubscriptionId: pulumi.String("5b4b650e-28b9-4790-b3ab-ddbd88d727c4"),
Name: pulumi.String("examplePartnerTopic1"),
ResourceGroupName: pulumi.String("examplerg2"),
Source: pulumi.String("ContosoCorp.Accounts.User1"),
},
ResourceGroupName: pulumi.String("examplerg"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.eventgrid.Channel;
import com.pulumi.azurenative.eventgrid.ChannelArgs;
import com.pulumi.azurenative.eventgrid.inputs.PartnerTopicInfoArgs;
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 channel = new Channel("channel", ChannelArgs.builder()
.channelName("exampleChannelName1")
.channelType("PartnerTopic")
.expirationTimeIfNotActivatedUtc("2021-10-21T22:50:25.410433Z")
.messageForActivation("Example message to approver")
.partnerNamespaceName("examplePartnerNamespaceName1")
.partnerTopicInfo(PartnerTopicInfoArgs.builder()
.azureSubscriptionId("5b4b650e-28b9-4790-b3ab-ddbd88d727c4")
.name("examplePartnerTopic1")
.resourceGroupName("examplerg2")
.source("ContosoCorp.Accounts.User1")
.build())
.resourceGroupName("examplerg")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:eventgrid:Channel exampleChannelName1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}
Properties
The Azure API version of the resource.
The type of the event channel which represents the direction flow of events.
Expiration time of the channel. If this timer expires while the corresponding partner topic is never activated, the channel and corresponding partner topic are deleted.
Context or helpful message that can be used during the approval process by the subscriber.
This property should be populated when channelType is PartnerTopic and represents information about the partner topic resource corresponding to the channel.
Provisioning state of the channel.
The readiness state of the corresponding partner topic.
The system metadata relating to the Event Grid resource.