Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/stretchr/testify v1.11.1
github.com/temporalio/cli/cliext v0.0.0-20260602200703-8bb57b77ad55
go.temporal.io/api v1.62.13
go.temporal.io/cloud-sdk v0.15.0
go.temporal.io/cloud-sdk v0.16.0
go.temporal.io/sdk v1.44.1
go.temporal.io/sdk/contrib/envconfig v1.0.0
golang.org/x/oauth2 v0.36.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09
go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0=
go.temporal.io/api v1.62.13 h1:xMa8Nt5oAMX+LvlCJA44wjTCc1H09i2rG9poB1/xvH4=
go.temporal.io/api v1.62.13/go.mod h1:0k75tRljEuELWGeXjEZZO7zYqBln4+1FrG6+IMOMy7Q=
go.temporal.io/cloud-sdk v0.15.0 h1:TwlGhTVnF7d9uIP5wjV/vr7TBYsPEpJw/MNuiylX3DQ=
go.temporal.io/cloud-sdk v0.15.0/go.mod h1:W2O9t9tvo3Q/LhGgYdj8JijWbN5C84os+cz/BadIHYI=
go.temporal.io/cloud-sdk v0.16.0 h1:8EgFMyc3M1XV2+OIOOuKeyhUI8Kjy7YCCbmGYlRw1No=
go.temporal.io/cloud-sdk v0.16.0/go.mod h1:W2O9t9tvo3Q/LhGgYdj8JijWbN5C84os+cz/BadIHYI=
go.temporal.io/sdk v1.44.1 h1:Mt2OZLZpqkzDIdg9YyQzO0Rb/HqCDnnqHlIAGAJ5gqM=
go.temporal.io/sdk v1.44.1/go.mod h1:vkApR12F9/Y8OR+hkxe7WyXQFuCX6clhzqnAk6rzDAM=
go.temporal.io/sdk/contrib/envconfig v1.0.0 h1:1Q/swVgB4EW/p3k7rI9/4hpU4/DC57FSRbU90+UisXw=
Expand Down
172 changes: 171 additions & 1 deletion temporalcloudcli/commands.gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,40 @@ func (v *ExportGcsRegionOptions) BuildFlags(f *pflag.FlagSet) {
_ = cobra.MarkFlagRequired(f, "region")
}

type ExportAzureBlobOptions struct {
TenantId string
SubscriptionId string
ResourceGroup string
StorageAccount string
ContainerName string
FlagSet *pflag.FlagSet
}

func (v *ExportAzureBlobOptions) BuildFlags(f *pflag.FlagSet) {
v.FlagSet = f
f.StringVar(&v.TenantId, "tenant-id", "", "The Azure tenant ID where the storage account exists and where Temporal's app registration is consented/granted access. Required.")
_ = cobra.MarkFlagRequired(f, "tenant-id")
f.StringVar(&v.SubscriptionId, "subscription-id", "", "The Azure subscription ID that contains the storage account. Required.")
_ = cobra.MarkFlagRequired(f, "subscription-id")
f.StringVar(&v.ResourceGroup, "resource-group", "", "The Azure resource group that contains the storage account. Required.")
_ = cobra.MarkFlagRequired(f, "resource-group")
f.StringVar(&v.StorageAccount, "storage-account", "", "The name of the destination Azure storage account where Temporal will send data. Required.")
_ = cobra.MarkFlagRequired(f, "storage-account")
f.StringVar(&v.ContainerName, "container-name", "", "The name of the destination Azure Blob container where Temporal will send data. Required.")
_ = cobra.MarkFlagRequired(f, "container-name")
}

type ExportAzureBlobRegionOptions struct {
Region string
FlagSet *pflag.FlagSet
}

func (v *ExportAzureBlobRegionOptions) BuildFlags(f *pflag.FlagSet) {
v.FlagSet = f
f.StringVar(&v.Region, "region", "", "The region where the Azure storage account is located. Required.")
_ = cobra.MarkFlagRequired(f, "region")
}

type CloudCommand struct {
Command cobra.Command
ClientOptions
Expand Down Expand Up @@ -2489,8 +2523,9 @@ func NewCloudNamespaceExportCommand(cctx *CommandContext, parent *CloudNamespace
s.Parent = parent
s.Command.Use = "export"
s.Command.Short = "Manage workflow history export sinks for namespaces"
s.Command.Long = "Commands for managing workflow history export sinks for Temporal Cloud namespaces.\n\nExport sinks define destinations (S3 or GCS) to which workflow history is exported."
s.Command.Long = "Commands for managing workflow history export sinks for Temporal Cloud namespaces.\n\nExport sinks define destinations (S3, GCS, or Azure Blob) to which workflow history is exported."
s.Command.Args = cobra.NoArgs
s.Command.AddCommand(&NewCloudNamespaceExportAzureBlobCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudNamespaceExportDeleteCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudNamespaceExportDisableCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudNamespaceExportEnableCommand(cctx, &s).Command)
Expand All @@ -2501,6 +2536,141 @@ func NewCloudNamespaceExportCommand(cctx *CommandContext, parent *CloudNamespace
return &s
}

type CloudNamespaceExportAzureBlobCommand struct {
Parent *CloudNamespaceExportCommand
Command cobra.Command
}

func NewCloudNamespaceExportAzureBlobCommand(cctx *CommandContext, parent *CloudNamespaceExportCommand) *CloudNamespaceExportAzureBlobCommand {
var s CloudNamespaceExportAzureBlobCommand
s.Parent = parent
s.Command.Use = "azure-blob"
s.Command.Short = "Manage Azure Blob workflow history export sinks"
s.Command.Long = "Commands for managing Azure Blob workflow history export sinks for Temporal Cloud namespaces."
s.Command.Args = cobra.NoArgs
s.Command.AddCommand(&NewCloudNamespaceExportAzureBlobCreateCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudNamespaceExportAzureBlobUpdateCommand(cctx, &s).Command)
s.Command.AddCommand(&NewCloudNamespaceExportAzureBlobValidateCommand(cctx, &s).Command)
return &s
}

type CloudNamespaceExportAzureBlobCreateCommand struct {
Parent *CloudNamespaceExportAzureBlobCommand
Command cobra.Command
ClientOptions
NamespaceOptions
AsyncOperationOptions
ExportSinkOptions
ExportAzureBlobOptions
ExportAzureBlobRegionOptions
}

func NewCloudNamespaceExportAzureBlobCreateCommand(cctx *CommandContext, parent *CloudNamespaceExportAzureBlobCommand) *CloudNamespaceExportAzureBlobCreateCommand {
var s CloudNamespaceExportAzureBlobCreateCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "create [flags]"
s.Command.Short = "Create an Azure Blob workflow history export sink"
if hasHighlighting {
s.Command.Long = "Create a new Azure Blob workflow history export sink for a Temporal Cloud namespace.\nThe sink is created in the enabled state.\n\nExample:\n\n\x1b[1mtemporal cloud namespace export azure-blob create --namespace my-namespace.my-account --sink-name my-sink \\\n --tenant-id 11111111-1111-1111-1111-111111111111 \\\n --subscription-id 22222222-2222-2222-2222-222222222222 \\\n --resource-group my-resource-group --storage-account my-storage-account \\\n --container-name my-container --region eastus\x1b[0m"
} else {
s.Command.Long = "Create a new Azure Blob workflow history export sink for a Temporal Cloud namespace.\nThe sink is created in the enabled state.\n\nExample:\n\n```\ntemporal cloud namespace export azure-blob create --namespace my-namespace.my-account --sink-name my-sink \\\n --tenant-id 11111111-1111-1111-1111-111111111111 \\\n --subscription-id 22222222-2222-2222-2222-222222222222 \\\n --resource-group my-resource-group --storage-account my-storage-account \\\n --container-name my-container --region eastus\n```"
}
s.Command.Args = cobra.NoArgs
s.ClientOptions.BuildFlags(s.Command.Flags())
s.NamespaceOptions.BuildFlags(s.Command.Flags())
s.AsyncOperationOptions.BuildFlags(s.Command.Flags())
s.ExportSinkOptions.BuildFlags(s.Command.Flags())
s.ExportAzureBlobOptions.BuildFlags(s.Command.Flags())
s.ExportAzureBlobRegionOptions.BuildFlags(s.Command.Flags())
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}

type CloudNamespaceExportAzureBlobUpdateCommand struct {
Parent *CloudNamespaceExportAzureBlobCommand
Command cobra.Command
ClientOptions
NamespaceOptions
AsyncOperationOptions
ResourceVersionOptions
ExportSinkOptions
TenantId string
SubscriptionId string
ResourceGroup string
StorageAccount string
ContainerName string
}

func NewCloudNamespaceExportAzureBlobUpdateCommand(cctx *CommandContext, parent *CloudNamespaceExportAzureBlobCommand) *CloudNamespaceExportAzureBlobUpdateCommand {
var s CloudNamespaceExportAzureBlobUpdateCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "update [flags]"
s.Command.Short = "Update an Azure Blob workflow history export sink"
if hasHighlighting {
s.Command.Long = "Update the configuration of an existing Azure Blob workflow history export sink.\nOnly the flags you provide are changed; omitted flags keep their current\nvalues. The enabled/disabled state and region are also preserved.\n\nExample (rotate storage account only):\n\n\x1b[1mtemporal cloud namespace export azure-blob update --namespace my-namespace.my-account --sink-name my-sink \\\n --storage-account my-new-storage-account\x1b[0m"
} else {
s.Command.Long = "Update the configuration of an existing Azure Blob workflow history export sink.\nOnly the flags you provide are changed; omitted flags keep their current\nvalues. The enabled/disabled state and region are also preserved.\n\nExample (rotate storage account only):\n\n```\ntemporal cloud namespace export azure-blob update --namespace my-namespace.my-account --sink-name my-sink \\\n --storage-account my-new-storage-account\n```"
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVar(&s.TenantId, "tenant-id", "", "The Azure tenant ID where the storage account exists and where Temporal's app registration is consented/granted access. If omitted, the current value is kept.")
s.Command.Flags().StringVar(&s.SubscriptionId, "subscription-id", "", "The Azure subscription ID that contains the storage account. If omitted, the current value is kept.")
s.Command.Flags().StringVar(&s.ResourceGroup, "resource-group", "", "The Azure resource group that contains the storage account. If omitted, the current value is kept.")
s.Command.Flags().StringVar(&s.StorageAccount, "storage-account", "", "The name of the destination Azure storage account where Temporal will send data. If omitted, the current value is kept.")
s.Command.Flags().StringVar(&s.ContainerName, "container-name", "", "The name of the destination Azure Blob container where Temporal will send data. If omitted, the current value is kept.")
s.ClientOptions.BuildFlags(s.Command.Flags())
s.NamespaceOptions.BuildFlags(s.Command.Flags())
s.AsyncOperationOptions.BuildFlags(s.Command.Flags())
s.ResourceVersionOptions.BuildFlags(s.Command.Flags())
s.ExportSinkOptions.BuildFlags(s.Command.Flags())
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}

type CloudNamespaceExportAzureBlobValidateCommand struct {
Parent *CloudNamespaceExportAzureBlobCommand
Command cobra.Command
ClientOptions
NamespaceOptions
ExportSinkOptions
ExportAzureBlobOptions
ExportAzureBlobRegionOptions
}

func NewCloudNamespaceExportAzureBlobValidateCommand(cctx *CommandContext, parent *CloudNamespaceExportAzureBlobCommand) *CloudNamespaceExportAzureBlobValidateCommand {
var s CloudNamespaceExportAzureBlobValidateCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "validate [flags]"
s.Command.Short = "Validate an Azure Blob workflow history export sink configuration"
if hasHighlighting {
s.Command.Long = "Validate an Azure Blob workflow history export sink configuration without creating or updating it.\nA successful response means the configuration is valid.\n\nExample:\n\n\x1b[1mtemporal cloud namespace export azure-blob validate --namespace my-namespace.my-account --sink-name my-sink \\\n --tenant-id 11111111-1111-1111-1111-111111111111 \\\n --subscription-id 22222222-2222-2222-2222-222222222222 \\\n --resource-group my-resource-group --storage-account my-storage-account \\\n --container-name my-container --region eastus\x1b[0m"
} else {
s.Command.Long = "Validate an Azure Blob workflow history export sink configuration without creating or updating it.\nA successful response means the configuration is valid.\n\nExample:\n\n```\ntemporal cloud namespace export azure-blob validate --namespace my-namespace.my-account --sink-name my-sink \\\n --tenant-id 11111111-1111-1111-1111-111111111111 \\\n --subscription-id 22222222-2222-2222-2222-222222222222 \\\n --resource-group my-resource-group --storage-account my-storage-account \\\n --container-name my-container --region eastus\n```"
}
s.Command.Args = cobra.NoArgs
s.ClientOptions.BuildFlags(s.Command.Flags())
s.NamespaceOptions.BuildFlags(s.Command.Flags())
s.ExportSinkOptions.BuildFlags(s.Command.Flags())
s.ExportAzureBlobOptions.BuildFlags(s.Command.Flags())
s.ExportAzureBlobRegionOptions.BuildFlags(s.Command.Flags())
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}

type CloudNamespaceExportDeleteCommand struct {
Parent *CloudNamespaceExportCommand
Command cobra.Command
Expand Down
Loading
Loading