Documentation ¶
Index ¶
- func PkgVersion() (semver.Version, error)
- type Cluster
- type ClusterArgs
- type ClusterArray
- type ClusterArrayInput
- type ClusterArrayOutput
- type ClusterInput
- type ClusterInstance
- type ClusterInstanceArgs
- type ClusterInstanceArray
- type ClusterInstanceArrayInput
- type ClusterInstanceArrayOutput
- func (ClusterInstanceArrayOutput) ElementType() reflect.Type
- func (o ClusterInstanceArrayOutput) Index(i pulumi.IntInput) ClusterInstanceOutput
- func (o ClusterInstanceArrayOutput) ToClusterInstanceArrayOutput() ClusterInstanceArrayOutput
- func (o ClusterInstanceArrayOutput) ToClusterInstanceArrayOutputWithContext(ctx context.Context) ClusterInstanceArrayOutput
- type ClusterInstanceInput
- type ClusterInstanceOutput
- func (ClusterInstanceOutput) ElementType() reflect.Type
- func (o ClusterInstanceOutput) Id() pulumi.StringPtrOutput
- func (o ClusterInstanceOutput) ManageIp() pulumi.StringPtrOutput
- func (o ClusterInstanceOutput) Name() pulumi.StringPtrOutput
- func (o ClusterInstanceOutput) PrivateIp() pulumi.StringPtrOutput
- func (o ClusterInstanceOutput) PublicIp() pulumi.StringPtrOutput
- func (o ClusterInstanceOutput) Role() pulumi.StringPtrOutput
- func (o ClusterInstanceOutput) ToClusterInstanceOutput() ClusterInstanceOutput
- func (o ClusterInstanceOutput) ToClusterInstanceOutputWithContext(ctx context.Context) ClusterInstanceOutput
- func (o ClusterInstanceOutput) TrafficIp() pulumi.StringPtrOutput
- func (o ClusterInstanceOutput) Type() pulumi.StringPtrOutput
- type ClusterMap
- type ClusterMapInput
- type ClusterMapOutput
- type ClusterOutput
- func (o ClusterOutput) AvailabilityZone() pulumi.StringOutput
- func (o ClusterOutput) Created() pulumi.StringOutput
- func (ClusterOutput) ElementType() reflect.Type
- func (o ClusterOutput) Emails() pulumi.StringArrayOutput
- func (o ClusterOutput) EnterpriseProjectId() pulumi.StringPtrOutput
- func (o ClusterOutput) FlavorId() pulumi.StringOutput
- func (o ClusterOutput) Instances() ClusterInstanceArrayOutput
- func (o ClusterOutput) IsAutoOff() pulumi.BoolOutput
- func (o ClusterOutput) Name() pulumi.StringOutput
- func (o ClusterOutput) PhoneNums() pulumi.StringArrayOutput
- func (o ClusterOutput) PublicEndpoint() pulumi.StringOutput
- func (o ClusterOutput) PublicIp() pulumi.StringOutput
- func (o ClusterOutput) Region() pulumi.StringOutput
- func (o ClusterOutput) ScheduleBootTime() pulumi.StringOutput
- func (o ClusterOutput) ScheduleOffTime() pulumi.StringOutput
- func (o ClusterOutput) SecurityGroupId() pulumi.StringOutput
- func (o ClusterOutput) Status() pulumi.StringOutput
- func (o ClusterOutput) SubnetId() pulumi.StringOutput
- func (o ClusterOutput) ToClusterOutput() ClusterOutput
- func (o ClusterOutput) ToClusterOutputWithContext(ctx context.Context) ClusterOutput
- func (o ClusterOutput) Version() pulumi.StringOutput
- func (o ClusterOutput) VpcId() pulumi.StringOutput
- type ClusterState
- type GetFlavorsArgs
- type GetFlavorsFlavor
- type GetFlavorsFlavorArgs
- type GetFlavorsFlavorArray
- type GetFlavorsFlavorArrayInput
- type GetFlavorsFlavorArrayOutput
- func (GetFlavorsFlavorArrayOutput) ElementType() reflect.Type
- func (o GetFlavorsFlavorArrayOutput) Index(i pulumi.IntInput) GetFlavorsFlavorOutput
- func (o GetFlavorsFlavorArrayOutput) ToGetFlavorsFlavorArrayOutput() GetFlavorsFlavorArrayOutput
- func (o GetFlavorsFlavorArrayOutput) ToGetFlavorsFlavorArrayOutputWithContext(ctx context.Context) GetFlavorsFlavorArrayOutput
- type GetFlavorsFlavorInput
- type GetFlavorsFlavorOutput
- func (GetFlavorsFlavorOutput) ElementType() reflect.Type
- func (o GetFlavorsFlavorOutput) Id() pulumi.StringOutput
- func (o GetFlavorsFlavorOutput) Name() pulumi.StringOutput
- func (o GetFlavorsFlavorOutput) ToGetFlavorsFlavorOutput() GetFlavorsFlavorOutput
- func (o GetFlavorsFlavorOutput) ToGetFlavorsFlavorOutputWithContext(ctx context.Context) GetFlavorsFlavorOutput
- type GetFlavorsOutputArgs
- type GetFlavorsResult
- type GetFlavorsResultOutput
- func (GetFlavorsResultOutput) ElementType() reflect.Type
- func (o GetFlavorsResultOutput) Flavors() GetFlavorsFlavorArrayOutput
- func (o GetFlavorsResultOutput) Id() pulumi.StringOutput
- func (o GetFlavorsResultOutput) Region() pulumi.StringOutput
- func (o GetFlavorsResultOutput) ToGetFlavorsResultOutput() GetFlavorsResultOutput
- func (o GetFlavorsResultOutput) ToGetFlavorsResultOutputWithContext(ctx context.Context) GetFlavorsResultOutput
- func (o GetFlavorsResultOutput) Version() pulumi.StringOutput
- type Job
- type JobArgs
- type JobArray
- type JobArrayInput
- type JobArrayOutput
- type JobConfig
- type JobConfigArgs
- func (JobConfigArgs) ElementType() reflect.Type
- func (i JobConfigArgs) ToJobConfigOutput() JobConfigOutput
- func (i JobConfigArgs) ToJobConfigOutputWithContext(ctx context.Context) JobConfigOutput
- func (i JobConfigArgs) ToJobConfigPtrOutput() JobConfigPtrOutput
- func (i JobConfigArgs) ToJobConfigPtrOutputWithContext(ctx context.Context) JobConfigPtrOutput
- type JobConfigInput
- type JobConfigOutput
- func (JobConfigOutput) ElementType() reflect.Type
- func (o JobConfigOutput) GroupName() pulumi.StringPtrOutput
- func (o JobConfigOutput) RetryType() pulumi.StringPtrOutput
- func (o JobConfigOutput) SchedulerCycle() pulumi.IntPtrOutput
- func (o JobConfigOutput) SchedulerCycleType() pulumi.StringPtrOutput
- func (o JobConfigOutput) SchedulerDisposableType() pulumi.StringPtrOutput
- func (o JobConfigOutput) SchedulerEnabled() pulumi.BoolPtrOutput
- func (o JobConfigOutput) SchedulerRunAt() pulumi.StringPtrOutput
- func (o JobConfigOutput) SchedulerStartDate() pulumi.StringPtrOutput
- func (o JobConfigOutput) SchedulerStopDate() pulumi.StringPtrOutput
- func (o JobConfigOutput) ThrottlingDirtyWriteToBucket() pulumi.StringPtrOutput
- func (o JobConfigOutput) ThrottlingDirtyWriteToDirectory() pulumi.StringPtrOutput
- func (o JobConfigOutput) ThrottlingDirtyWriteToLink() pulumi.StringPtrOutput
- func (o JobConfigOutput) ThrottlingExtractorsNumber() pulumi.IntPtrOutput
- func (o JobConfigOutput) ThrottlingLoaderNumber() pulumi.IntPtrOutput
- func (o JobConfigOutput) ThrottlingMaxErrorRecords() pulumi.IntPtrOutput
- func (o JobConfigOutput) ThrottlingRecordDirtyData() pulumi.BoolPtrOutput
- func (o JobConfigOutput) ToJobConfigOutput() JobConfigOutput
- func (o JobConfigOutput) ToJobConfigOutputWithContext(ctx context.Context) JobConfigOutput
- func (o JobConfigOutput) ToJobConfigPtrOutput() JobConfigPtrOutput
- func (o JobConfigOutput) ToJobConfigPtrOutputWithContext(ctx context.Context) JobConfigPtrOutput
- type JobConfigPtrInput
- type JobConfigPtrOutput
- func (o JobConfigPtrOutput) Elem() JobConfigOutput
- func (JobConfigPtrOutput) ElementType() reflect.Type
- func (o JobConfigPtrOutput) GroupName() pulumi.StringPtrOutput
- func (o JobConfigPtrOutput) RetryType() pulumi.StringPtrOutput
- func (o JobConfigPtrOutput) SchedulerCycle() pulumi.IntPtrOutput
- func (o JobConfigPtrOutput) SchedulerCycleType() pulumi.StringPtrOutput
- func (o JobConfigPtrOutput) SchedulerDisposableType() pulumi.StringPtrOutput
- func (o JobConfigPtrOutput) SchedulerEnabled() pulumi.BoolPtrOutput
- func (o JobConfigPtrOutput) SchedulerRunAt() pulumi.StringPtrOutput
- func (o JobConfigPtrOutput) SchedulerStartDate() pulumi.StringPtrOutput
- func (o JobConfigPtrOutput) SchedulerStopDate() pulumi.StringPtrOutput
- func (o JobConfigPtrOutput) ThrottlingDirtyWriteToBucket() pulumi.StringPtrOutput
- func (o JobConfigPtrOutput) ThrottlingDirtyWriteToDirectory() pulumi.StringPtrOutput
- func (o JobConfigPtrOutput) ThrottlingDirtyWriteToLink() pulumi.StringPtrOutput
- func (o JobConfigPtrOutput) ThrottlingExtractorsNumber() pulumi.IntPtrOutput
- func (o JobConfigPtrOutput) ThrottlingLoaderNumber() pulumi.IntPtrOutput
- func (o JobConfigPtrOutput) ThrottlingMaxErrorRecords() pulumi.IntPtrOutput
- func (o JobConfigPtrOutput) ThrottlingRecordDirtyData() pulumi.BoolPtrOutput
- func (o JobConfigPtrOutput) ToJobConfigPtrOutput() JobConfigPtrOutput
- func (o JobConfigPtrOutput) ToJobConfigPtrOutputWithContext(ctx context.Context) JobConfigPtrOutput
- type JobInput
- type JobMap
- type JobMapInput
- type JobMapOutput
- type JobOutput
- func (o JobOutput) ClusterId() pulumi.StringOutput
- func (o JobOutput) Config() JobConfigPtrOutput
- func (o JobOutput) DestinationConnector() pulumi.StringOutput
- func (o JobOutput) DestinationJobConfig() pulumi.StringMapOutput
- func (o JobOutput) DestinationLinkName() pulumi.StringOutput
- func (JobOutput) ElementType() reflect.Type
- func (o JobOutput) JobType() pulumi.StringOutput
- func (o JobOutput) Name() pulumi.StringOutput
- func (o JobOutput) Region() pulumi.StringOutput
- func (o JobOutput) SourceConnector() pulumi.StringOutput
- func (o JobOutput) SourceJobConfig() pulumi.StringMapOutput
- func (o JobOutput) SourceLinkName() pulumi.StringOutput
- func (o JobOutput) Status() pulumi.StringOutput
- func (o JobOutput) ToJobOutput() JobOutput
- func (o JobOutput) ToJobOutputWithContext(ctx context.Context) JobOutput
- type JobState
- type Link
- type LinkArgs
- type LinkArray
- type LinkArrayInput
- type LinkArrayOutput
- type LinkInput
- type LinkMap
- type LinkMapInput
- type LinkMapOutput
- type LinkOutput
- func (o LinkOutput) AccessKey() pulumi.StringPtrOutput
- func (o LinkOutput) ClusterId() pulumi.StringOutput
- func (o LinkOutput) Config() pulumi.StringMapOutput
- func (o LinkOutput) Connector() pulumi.StringOutput
- func (LinkOutput) ElementType() reflect.Type
- func (o LinkOutput) Enabled() pulumi.BoolPtrOutput
- func (o LinkOutput) Name() pulumi.StringOutput
- func (o LinkOutput) Password() pulumi.StringPtrOutput
- func (o LinkOutput) Region() pulumi.StringOutput
- func (o LinkOutput) SecretKey() pulumi.StringPtrOutput
- func (o LinkOutput) ToLinkOutput() LinkOutput
- func (o LinkOutput) ToLinkOutputWithContext(ctx context.Context) LinkOutput
- type LinkState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PkgVersion ¶ added in v0.0.2
PkgVersion uses reflection to determine the version of the current package. If a version cannot be determined, v1 will be assumed. The second return value is always nil.
Types ¶
type Cluster ¶
type Cluster struct { pulumi.CustomResourceState // Specifies available zone. // Changing this parameter will create a new resource. AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"` // Create time. The format is: `YYYY-MM-DDThh:mm:ss`. Created pulumi.StringOutput `pulumi:"created"` // Specifies email address for receiving notifications when a table/file migration // job fails or an EIP exception occurs. The max number is 5. Changing this parameter will create a new resource. Emails pulumi.StringArrayOutput `pulumi:"emails"` // Specifies the enterprise project id. // Changing this parameter will create a new resource. EnterpriseProjectId pulumi.StringPtrOutput `pulumi:"enterpriseProjectId"` // Specifies flavor id. Changing this parameter will create a new resource. FlavorId pulumi.StringOutput `pulumi:"flavorId"` // Instance list. Structure is documented below. Instances ClusterInstanceArrayOutput `pulumi:"instances"` // Specifies Whether to enable auto shutdown. The auto shutdown and scheduled // startup/shutdown functions cannot be enabled at the same time. When auto shutdown is enabled, if no job is running in // the cluster and no scheduled job is created, a cluster will be automatically shut down 15 minutes after it starts // running to reduce costs. The default value is `false`. Changing this parameter will create a new resource. IsAutoOff pulumi.BoolOutput `pulumi:"isAutoOff"` // Specifies cluster name. Changing this parameter will create a new resource. Name pulumi.StringOutput `pulumi:"name"` // Specifies phone number for receiving notifications when a table/file // migration job fails or an EIP exception occurs. The max number is 5. Changing this parameter will create a new resource. PhoneNums pulumi.StringArrayOutput `pulumi:"phoneNums"` // EIP bound to the cluster. PublicEndpoint pulumi.StringOutput `pulumi:"publicEndpoint"` // Public IP. PublicIp pulumi.StringOutput `pulumi:"publicIp"` // The region in which to create the cluster resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringOutput `pulumi:"region"` // Specifies time for scheduled startup of a CDM cluster. // The CDM cluster starts at this time every day. The scheduled startup/shutdown and auto shutdown function cannot be // enabled at the same time. The time format is `hh:mm:ss`. Changing this parameter will create a new resource. ScheduleBootTime pulumi.StringOutput `pulumi:"scheduleBootTime"` // Specifies time for scheduled shutdown of a CDM cluster. // The system shuts down directly at this time every day without waiting for unfinished jobs to complete. // The scheduled startup/shutdown and auto shutdown function cannot be enabled at the same time. // The time format is `hh:mm:ss`. Changing this parameter will create a new resource. ScheduleOffTime pulumi.StringOutput `pulumi:"scheduleOffTime"` // Specifies security group ID. // Changing this parameter will create a new resource. SecurityGroupId pulumi.StringOutput `pulumi:"securityGroupId"` // Status. Status pulumi.StringOutput `pulumi:"status"` // Specifies subnet ID. Changing this parameter will create a new resource. SubnetId pulumi.StringOutput `pulumi:"subnetId"` // Specifies the cluster version. Changing this parameter will create a new resource. Version pulumi.StringOutput `pulumi:"version"` // Specifies VPC ID. Changing this parameter will create a new resource. VpcId pulumi.StringOutput `pulumi:"vpcId"` }
Manages CDM cluster resource within HuaweiCloud.
## Example Usage ### create a cdm cluster
```go package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Cdm" "github.com/pulumi/pulumi-huaweicloud/sdk/go/huaweicloud/Cdm" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { cfg := config.New(ctx, "") name := cfg.RequireObject("name") flavorId := cfg.RequireObject("flavorId") availabilityZone := cfg.RequireObject("availabilityZone") vpcId := cfg.RequireObject("vpcId") subnetId := cfg.RequireObject("subnetId") secgroupId := cfg.RequireObject("secgroupId") test, err := Cdm.GetFlavors(ctx, nil, nil) if err != nil { return err } _, err = Cdm.NewCluster(ctx, "cluster", &Cdm.ClusterArgs{ AvailabilityZone: pulumi.Any(availabilityZone), FlavorId: pulumi.String(test.Flavors[0].Id), SubnetId: pulumi.Any(subnetId), VpcId: pulumi.Any(vpcId), SecurityGroupId: pulumi.Any(secgroupId), }) if err != nil { return err } return nil }) }
```
## Import
Clusters can be imported by `id`. For example, bash
```sh
$ pulumi import huaweicloud:Cdm/cluster:Cluster test b11b407c-e604-4e8d-8bc4-92398320b847
```
Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`email` and `phone_num`.
It is generally recommended running `terraform plan` after importing a cluster.
You can then decide if changes should be applied to the cluster, or the resource definition should be updated to align with the cluster. Also you can ignore changes as below. hcl resource "huaweicloud_cdm_cluster" "test" {
... lifecycle { ignore_changes = [ email, phone_num, ] } }
func GetCluster ¶
func GetCluster(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ClusterState, opts ...pulumi.ResourceOption) (*Cluster, error)
GetCluster gets an existing Cluster resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewCluster ¶
func NewCluster(ctx *pulumi.Context, name string, args *ClusterArgs, opts ...pulumi.ResourceOption) (*Cluster, error)
NewCluster registers a new resource with the given unique name, arguments, and options.
func (*Cluster) ElementType ¶
func (*Cluster) ToClusterOutput ¶
func (i *Cluster) ToClusterOutput() ClusterOutput
func (*Cluster) ToClusterOutputWithContext ¶
func (i *Cluster) ToClusterOutputWithContext(ctx context.Context) ClusterOutput
type ClusterArgs ¶
type ClusterArgs struct { // Specifies available zone. // Changing this parameter will create a new resource. AvailabilityZone pulumi.StringInput // Specifies email address for receiving notifications when a table/file migration // job fails or an EIP exception occurs. The max number is 5. Changing this parameter will create a new resource. Emails pulumi.StringArrayInput // Specifies the enterprise project id. // Changing this parameter will create a new resource. EnterpriseProjectId pulumi.StringPtrInput // Specifies flavor id. Changing this parameter will create a new resource. FlavorId pulumi.StringInput // Specifies Whether to enable auto shutdown. The auto shutdown and scheduled // startup/shutdown functions cannot be enabled at the same time. When auto shutdown is enabled, if no job is running in // the cluster and no scheduled job is created, a cluster will be automatically shut down 15 minutes after it starts // running to reduce costs. The default value is `false`. Changing this parameter will create a new resource. IsAutoOff pulumi.BoolPtrInput // Specifies cluster name. Changing this parameter will create a new resource. Name pulumi.StringPtrInput // Specifies phone number for receiving notifications when a table/file // migration job fails or an EIP exception occurs. The max number is 5. Changing this parameter will create a new resource. PhoneNums pulumi.StringArrayInput // The region in which to create the cluster resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringPtrInput // Specifies time for scheduled startup of a CDM cluster. // The CDM cluster starts at this time every day. The scheduled startup/shutdown and auto shutdown function cannot be // enabled at the same time. The time format is `hh:mm:ss`. Changing this parameter will create a new resource. ScheduleBootTime pulumi.StringPtrInput // Specifies time for scheduled shutdown of a CDM cluster. // The system shuts down directly at this time every day without waiting for unfinished jobs to complete. // The scheduled startup/shutdown and auto shutdown function cannot be enabled at the same time. // The time format is `hh:mm:ss`. Changing this parameter will create a new resource. ScheduleOffTime pulumi.StringPtrInput // Specifies security group ID. // Changing this parameter will create a new resource. SecurityGroupId pulumi.StringInput // Specifies subnet ID. Changing this parameter will create a new resource. SubnetId pulumi.StringInput // Specifies the cluster version. Changing this parameter will create a new resource. Version pulumi.StringPtrInput // Specifies VPC ID. Changing this parameter will create a new resource. VpcId pulumi.StringInput }
The set of arguments for constructing a Cluster resource.
func (ClusterArgs) ElementType ¶
func (ClusterArgs) ElementType() reflect.Type
type ClusterArray ¶
type ClusterArray []ClusterInput
func (ClusterArray) ElementType ¶
func (ClusterArray) ElementType() reflect.Type
func (ClusterArray) ToClusterArrayOutput ¶
func (i ClusterArray) ToClusterArrayOutput() ClusterArrayOutput
func (ClusterArray) ToClusterArrayOutputWithContext ¶
func (i ClusterArray) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput
type ClusterArrayInput ¶
type ClusterArrayInput interface { pulumi.Input ToClusterArrayOutput() ClusterArrayOutput ToClusterArrayOutputWithContext(context.Context) ClusterArrayOutput }
ClusterArrayInput is an input type that accepts ClusterArray and ClusterArrayOutput values. You can construct a concrete instance of `ClusterArrayInput` via:
ClusterArray{ ClusterArgs{...} }
type ClusterArrayOutput ¶
type ClusterArrayOutput struct{ *pulumi.OutputState }
func (ClusterArrayOutput) ElementType ¶
func (ClusterArrayOutput) ElementType() reflect.Type
func (ClusterArrayOutput) Index ¶
func (o ClusterArrayOutput) Index(i pulumi.IntInput) ClusterOutput
func (ClusterArrayOutput) ToClusterArrayOutput ¶
func (o ClusterArrayOutput) ToClusterArrayOutput() ClusterArrayOutput
func (ClusterArrayOutput) ToClusterArrayOutputWithContext ¶
func (o ClusterArrayOutput) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput
type ClusterInput ¶
type ClusterInput interface { pulumi.Input ToClusterOutput() ClusterOutput ToClusterOutputWithContext(ctx context.Context) ClusterOutput }
type ClusterInstance ¶
type ClusterInstance struct { // Instance ID. Id *string `pulumi:"id"` // Management IP address. ManageIp *string `pulumi:"manageIp"` // Specifies cluster name. Changing this parameter will create a new resource. Name *string `pulumi:"name"` // Private IP. PrivateIp *string `pulumi:"privateIp"` // Public IP. PublicIp *string `pulumi:"publicIp"` // Instance role. Role *string `pulumi:"role"` // Traffic IP. TrafficIp *string `pulumi:"trafficIp"` // Instance type. Type *string `pulumi:"type"` }
type ClusterInstanceArgs ¶
type ClusterInstanceArgs struct { // Instance ID. Id pulumi.StringPtrInput `pulumi:"id"` // Management IP address. ManageIp pulumi.StringPtrInput `pulumi:"manageIp"` // Specifies cluster name. Changing this parameter will create a new resource. Name pulumi.StringPtrInput `pulumi:"name"` // Private IP. PrivateIp pulumi.StringPtrInput `pulumi:"privateIp"` // Public IP. PublicIp pulumi.StringPtrInput `pulumi:"publicIp"` // Instance role. Role pulumi.StringPtrInput `pulumi:"role"` // Traffic IP. TrafficIp pulumi.StringPtrInput `pulumi:"trafficIp"` // Instance type. Type pulumi.StringPtrInput `pulumi:"type"` }
func (ClusterInstanceArgs) ElementType ¶
func (ClusterInstanceArgs) ElementType() reflect.Type
func (ClusterInstanceArgs) ToClusterInstanceOutput ¶
func (i ClusterInstanceArgs) ToClusterInstanceOutput() ClusterInstanceOutput
func (ClusterInstanceArgs) ToClusterInstanceOutputWithContext ¶
func (i ClusterInstanceArgs) ToClusterInstanceOutputWithContext(ctx context.Context) ClusterInstanceOutput
type ClusterInstanceArray ¶
type ClusterInstanceArray []ClusterInstanceInput
func (ClusterInstanceArray) ElementType ¶
func (ClusterInstanceArray) ElementType() reflect.Type
func (ClusterInstanceArray) ToClusterInstanceArrayOutput ¶
func (i ClusterInstanceArray) ToClusterInstanceArrayOutput() ClusterInstanceArrayOutput
func (ClusterInstanceArray) ToClusterInstanceArrayOutputWithContext ¶
func (i ClusterInstanceArray) ToClusterInstanceArrayOutputWithContext(ctx context.Context) ClusterInstanceArrayOutput
type ClusterInstanceArrayInput ¶
type ClusterInstanceArrayInput interface { pulumi.Input ToClusterInstanceArrayOutput() ClusterInstanceArrayOutput ToClusterInstanceArrayOutputWithContext(context.Context) ClusterInstanceArrayOutput }
ClusterInstanceArrayInput is an input type that accepts ClusterInstanceArray and ClusterInstanceArrayOutput values. You can construct a concrete instance of `ClusterInstanceArrayInput` via:
ClusterInstanceArray{ ClusterInstanceArgs{...} }
type ClusterInstanceArrayOutput ¶
type ClusterInstanceArrayOutput struct{ *pulumi.OutputState }
func (ClusterInstanceArrayOutput) ElementType ¶
func (ClusterInstanceArrayOutput) ElementType() reflect.Type
func (ClusterInstanceArrayOutput) Index ¶
func (o ClusterInstanceArrayOutput) Index(i pulumi.IntInput) ClusterInstanceOutput
func (ClusterInstanceArrayOutput) ToClusterInstanceArrayOutput ¶
func (o ClusterInstanceArrayOutput) ToClusterInstanceArrayOutput() ClusterInstanceArrayOutput
func (ClusterInstanceArrayOutput) ToClusterInstanceArrayOutputWithContext ¶
func (o ClusterInstanceArrayOutput) ToClusterInstanceArrayOutputWithContext(ctx context.Context) ClusterInstanceArrayOutput
type ClusterInstanceInput ¶
type ClusterInstanceInput interface { pulumi.Input ToClusterInstanceOutput() ClusterInstanceOutput ToClusterInstanceOutputWithContext(context.Context) ClusterInstanceOutput }
ClusterInstanceInput is an input type that accepts ClusterInstanceArgs and ClusterInstanceOutput values. You can construct a concrete instance of `ClusterInstanceInput` via:
ClusterInstanceArgs{...}
type ClusterInstanceOutput ¶
type ClusterInstanceOutput struct{ *pulumi.OutputState }
func (ClusterInstanceOutput) ElementType ¶
func (ClusterInstanceOutput) ElementType() reflect.Type
func (ClusterInstanceOutput) Id ¶
func (o ClusterInstanceOutput) Id() pulumi.StringPtrOutput
Instance ID.
func (ClusterInstanceOutput) ManageIp ¶
func (o ClusterInstanceOutput) ManageIp() pulumi.StringPtrOutput
Management IP address.
func (ClusterInstanceOutput) Name ¶
func (o ClusterInstanceOutput) Name() pulumi.StringPtrOutput
Specifies cluster name. Changing this parameter will create a new resource.
func (ClusterInstanceOutput) PrivateIp ¶
func (o ClusterInstanceOutput) PrivateIp() pulumi.StringPtrOutput
Private IP.
func (ClusterInstanceOutput) PublicIp ¶
func (o ClusterInstanceOutput) PublicIp() pulumi.StringPtrOutput
Public IP.
func (ClusterInstanceOutput) Role ¶
func (o ClusterInstanceOutput) Role() pulumi.StringPtrOutput
Instance role.
func (ClusterInstanceOutput) ToClusterInstanceOutput ¶
func (o ClusterInstanceOutput) ToClusterInstanceOutput() ClusterInstanceOutput
func (ClusterInstanceOutput) ToClusterInstanceOutputWithContext ¶
func (o ClusterInstanceOutput) ToClusterInstanceOutputWithContext(ctx context.Context) ClusterInstanceOutput
func (ClusterInstanceOutput) TrafficIp ¶
func (o ClusterInstanceOutput) TrafficIp() pulumi.StringPtrOutput
Traffic IP.
func (ClusterInstanceOutput) Type ¶
func (o ClusterInstanceOutput) Type() pulumi.StringPtrOutput
Instance type.
type ClusterMap ¶
type ClusterMap map[string]ClusterInput
func (ClusterMap) ElementType ¶
func (ClusterMap) ElementType() reflect.Type
func (ClusterMap) ToClusterMapOutput ¶
func (i ClusterMap) ToClusterMapOutput() ClusterMapOutput
func (ClusterMap) ToClusterMapOutputWithContext ¶
func (i ClusterMap) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput
type ClusterMapInput ¶
type ClusterMapInput interface { pulumi.Input ToClusterMapOutput() ClusterMapOutput ToClusterMapOutputWithContext(context.Context) ClusterMapOutput }
ClusterMapInput is an input type that accepts ClusterMap and ClusterMapOutput values. You can construct a concrete instance of `ClusterMapInput` via:
ClusterMap{ "key": ClusterArgs{...} }
type ClusterMapOutput ¶
type ClusterMapOutput struct{ *pulumi.OutputState }
func (ClusterMapOutput) ElementType ¶
func (ClusterMapOutput) ElementType() reflect.Type
func (ClusterMapOutput) MapIndex ¶
func (o ClusterMapOutput) MapIndex(k pulumi.StringInput) ClusterOutput
func (ClusterMapOutput) ToClusterMapOutput ¶
func (o ClusterMapOutput) ToClusterMapOutput() ClusterMapOutput
func (ClusterMapOutput) ToClusterMapOutputWithContext ¶
func (o ClusterMapOutput) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput
type ClusterOutput ¶
type ClusterOutput struct{ *pulumi.OutputState }
func (ClusterOutput) AvailabilityZone ¶
func (o ClusterOutput) AvailabilityZone() pulumi.StringOutput
Specifies available zone. Changing this parameter will create a new resource.
func (ClusterOutput) Created ¶
func (o ClusterOutput) Created() pulumi.StringOutput
Create time. The format is: `YYYY-MM-DDThh:mm:ss`.
func (ClusterOutput) ElementType ¶
func (ClusterOutput) ElementType() reflect.Type
func (ClusterOutput) Emails ¶
func (o ClusterOutput) Emails() pulumi.StringArrayOutput
Specifies email address for receiving notifications when a table/file migration job fails or an EIP exception occurs. The max number is 5. Changing this parameter will create a new resource.
func (ClusterOutput) EnterpriseProjectId ¶
func (o ClusterOutput) EnterpriseProjectId() pulumi.StringPtrOutput
Specifies the enterprise project id. Changing this parameter will create a new resource.
func (ClusterOutput) FlavorId ¶
func (o ClusterOutput) FlavorId() pulumi.StringOutput
Specifies flavor id. Changing this parameter will create a new resource.
func (ClusterOutput) Instances ¶
func (o ClusterOutput) Instances() ClusterInstanceArrayOutput
Instance list. Structure is documented below.
func (ClusterOutput) IsAutoOff ¶
func (o ClusterOutput) IsAutoOff() pulumi.BoolOutput
Specifies Whether to enable auto shutdown. The auto shutdown and scheduled startup/shutdown functions cannot be enabled at the same time. When auto shutdown is enabled, if no job is running in the cluster and no scheduled job is created, a cluster will be automatically shut down 15 minutes after it starts running to reduce costs. The default value is `false`. Changing this parameter will create a new resource.
func (ClusterOutput) Name ¶
func (o ClusterOutput) Name() pulumi.StringOutput
Specifies cluster name. Changing this parameter will create a new resource.
func (ClusterOutput) PhoneNums ¶
func (o ClusterOutput) PhoneNums() pulumi.StringArrayOutput
Specifies phone number for receiving notifications when a table/file migration job fails or an EIP exception occurs. The max number is 5. Changing this parameter will create a new resource.
func (ClusterOutput) PublicEndpoint ¶
func (o ClusterOutput) PublicEndpoint() pulumi.StringOutput
EIP bound to the cluster.
func (ClusterOutput) Region ¶
func (o ClusterOutput) Region() pulumi.StringOutput
The region in which to create the cluster resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
func (ClusterOutput) ScheduleBootTime ¶
func (o ClusterOutput) ScheduleBootTime() pulumi.StringOutput
Specifies time for scheduled startup of a CDM cluster. The CDM cluster starts at this time every day. The scheduled startup/shutdown and auto shutdown function cannot be enabled at the same time. The time format is `hh:mm:ss`. Changing this parameter will create a new resource.
func (ClusterOutput) ScheduleOffTime ¶
func (o ClusterOutput) ScheduleOffTime() pulumi.StringOutput
Specifies time for scheduled shutdown of a CDM cluster. The system shuts down directly at this time every day without waiting for unfinished jobs to complete. The scheduled startup/shutdown and auto shutdown function cannot be enabled at the same time. The time format is `hh:mm:ss`. Changing this parameter will create a new resource.
func (ClusterOutput) SecurityGroupId ¶
func (o ClusterOutput) SecurityGroupId() pulumi.StringOutput
Specifies security group ID. Changing this parameter will create a new resource.
func (ClusterOutput) SubnetId ¶
func (o ClusterOutput) SubnetId() pulumi.StringOutput
Specifies subnet ID. Changing this parameter will create a new resource.
func (ClusterOutput) ToClusterOutput ¶
func (o ClusterOutput) ToClusterOutput() ClusterOutput
func (ClusterOutput) ToClusterOutputWithContext ¶
func (o ClusterOutput) ToClusterOutputWithContext(ctx context.Context) ClusterOutput
func (ClusterOutput) Version ¶
func (o ClusterOutput) Version() pulumi.StringOutput
Specifies the cluster version. Changing this parameter will create a new resource.
func (ClusterOutput) VpcId ¶
func (o ClusterOutput) VpcId() pulumi.StringOutput
Specifies VPC ID. Changing this parameter will create a new resource.
type ClusterState ¶
type ClusterState struct { // Specifies available zone. // Changing this parameter will create a new resource. AvailabilityZone pulumi.StringPtrInput // Create time. The format is: `YYYY-MM-DDThh:mm:ss`. Created pulumi.StringPtrInput // Specifies email address for receiving notifications when a table/file migration // job fails or an EIP exception occurs. The max number is 5. Changing this parameter will create a new resource. Emails pulumi.StringArrayInput // Specifies the enterprise project id. // Changing this parameter will create a new resource. EnterpriseProjectId pulumi.StringPtrInput // Specifies flavor id. Changing this parameter will create a new resource. FlavorId pulumi.StringPtrInput // Instance list. Structure is documented below. Instances ClusterInstanceArrayInput // Specifies Whether to enable auto shutdown. The auto shutdown and scheduled // startup/shutdown functions cannot be enabled at the same time. When auto shutdown is enabled, if no job is running in // the cluster and no scheduled job is created, a cluster will be automatically shut down 15 minutes after it starts // running to reduce costs. The default value is `false`. Changing this parameter will create a new resource. IsAutoOff pulumi.BoolPtrInput // Specifies cluster name. Changing this parameter will create a new resource. Name pulumi.StringPtrInput // Specifies phone number for receiving notifications when a table/file // migration job fails or an EIP exception occurs. The max number is 5. Changing this parameter will create a new resource. PhoneNums pulumi.StringArrayInput // EIP bound to the cluster. PublicEndpoint pulumi.StringPtrInput // Public IP. PublicIp pulumi.StringPtrInput // The region in which to create the cluster resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringPtrInput // Specifies time for scheduled startup of a CDM cluster. // The CDM cluster starts at this time every day. The scheduled startup/shutdown and auto shutdown function cannot be // enabled at the same time. The time format is `hh:mm:ss`. Changing this parameter will create a new resource. ScheduleBootTime pulumi.StringPtrInput // Specifies time for scheduled shutdown of a CDM cluster. // The system shuts down directly at this time every day without waiting for unfinished jobs to complete. // The scheduled startup/shutdown and auto shutdown function cannot be enabled at the same time. // The time format is `hh:mm:ss`. Changing this parameter will create a new resource. ScheduleOffTime pulumi.StringPtrInput // Specifies security group ID. // Changing this parameter will create a new resource. SecurityGroupId pulumi.StringPtrInput // Status. Status pulumi.StringPtrInput // Specifies subnet ID. Changing this parameter will create a new resource. SubnetId pulumi.StringPtrInput // Specifies the cluster version. Changing this parameter will create a new resource. Version pulumi.StringPtrInput // Specifies VPC ID. Changing this parameter will create a new resource. VpcId pulumi.StringPtrInput }
func (ClusterState) ElementType ¶
func (ClusterState) ElementType() reflect.Type
type GetFlavorsArgs ¶
type GetFlavorsArgs struct { // The region in which to obtain the CDM flavors. // If omitted, the provider-level region will be used. Region *string `pulumi:"region"` }
A collection of arguments for invoking getFlavors.
type GetFlavorsFlavor ¶
type GetFlavorsFlavorArgs ¶
type GetFlavorsFlavorArgs struct { // The id of the CDM flavor. Id pulumi.StringInput `pulumi:"id"` // The name of the CDM flavor. Name pulumi.StringInput `pulumi:"name"` }
func (GetFlavorsFlavorArgs) ElementType ¶
func (GetFlavorsFlavorArgs) ElementType() reflect.Type
func (GetFlavorsFlavorArgs) ToGetFlavorsFlavorOutput ¶
func (i GetFlavorsFlavorArgs) ToGetFlavorsFlavorOutput() GetFlavorsFlavorOutput
func (GetFlavorsFlavorArgs) ToGetFlavorsFlavorOutputWithContext ¶
func (i GetFlavorsFlavorArgs) ToGetFlavorsFlavorOutputWithContext(ctx context.Context) GetFlavorsFlavorOutput
type GetFlavorsFlavorArray ¶
type GetFlavorsFlavorArray []GetFlavorsFlavorInput
func (GetFlavorsFlavorArray) ElementType ¶
func (GetFlavorsFlavorArray) ElementType() reflect.Type
func (GetFlavorsFlavorArray) ToGetFlavorsFlavorArrayOutput ¶
func (i GetFlavorsFlavorArray) ToGetFlavorsFlavorArrayOutput() GetFlavorsFlavorArrayOutput
func (GetFlavorsFlavorArray) ToGetFlavorsFlavorArrayOutputWithContext ¶
func (i GetFlavorsFlavorArray) ToGetFlavorsFlavorArrayOutputWithContext(ctx context.Context) GetFlavorsFlavorArrayOutput
type GetFlavorsFlavorArrayInput ¶
type GetFlavorsFlavorArrayInput interface { pulumi.Input ToGetFlavorsFlavorArrayOutput() GetFlavorsFlavorArrayOutput ToGetFlavorsFlavorArrayOutputWithContext(context.Context) GetFlavorsFlavorArrayOutput }
GetFlavorsFlavorArrayInput is an input type that accepts GetFlavorsFlavorArray and GetFlavorsFlavorArrayOutput values. You can construct a concrete instance of `GetFlavorsFlavorArrayInput` via:
GetFlavorsFlavorArray{ GetFlavorsFlavorArgs{...} }
type GetFlavorsFlavorArrayOutput ¶
type GetFlavorsFlavorArrayOutput struct{ *pulumi.OutputState }
func (GetFlavorsFlavorArrayOutput) ElementType ¶
func (GetFlavorsFlavorArrayOutput) ElementType() reflect.Type
func (GetFlavorsFlavorArrayOutput) Index ¶
func (o GetFlavorsFlavorArrayOutput) Index(i pulumi.IntInput) GetFlavorsFlavorOutput
func (GetFlavorsFlavorArrayOutput) ToGetFlavorsFlavorArrayOutput ¶
func (o GetFlavorsFlavorArrayOutput) ToGetFlavorsFlavorArrayOutput() GetFlavorsFlavorArrayOutput
func (GetFlavorsFlavorArrayOutput) ToGetFlavorsFlavorArrayOutputWithContext ¶
func (o GetFlavorsFlavorArrayOutput) ToGetFlavorsFlavorArrayOutputWithContext(ctx context.Context) GetFlavorsFlavorArrayOutput
type GetFlavorsFlavorInput ¶
type GetFlavorsFlavorInput interface { pulumi.Input ToGetFlavorsFlavorOutput() GetFlavorsFlavorOutput ToGetFlavorsFlavorOutputWithContext(context.Context) GetFlavorsFlavorOutput }
GetFlavorsFlavorInput is an input type that accepts GetFlavorsFlavorArgs and GetFlavorsFlavorOutput values. You can construct a concrete instance of `GetFlavorsFlavorInput` via:
GetFlavorsFlavorArgs{...}
type GetFlavorsFlavorOutput ¶
type GetFlavorsFlavorOutput struct{ *pulumi.OutputState }
func (GetFlavorsFlavorOutput) ElementType ¶
func (GetFlavorsFlavorOutput) ElementType() reflect.Type
func (GetFlavorsFlavorOutput) Id ¶
func (o GetFlavorsFlavorOutput) Id() pulumi.StringOutput
The id of the CDM flavor.
func (GetFlavorsFlavorOutput) Name ¶
func (o GetFlavorsFlavorOutput) Name() pulumi.StringOutput
The name of the CDM flavor.
func (GetFlavorsFlavorOutput) ToGetFlavorsFlavorOutput ¶
func (o GetFlavorsFlavorOutput) ToGetFlavorsFlavorOutput() GetFlavorsFlavorOutput
func (GetFlavorsFlavorOutput) ToGetFlavorsFlavorOutputWithContext ¶
func (o GetFlavorsFlavorOutput) ToGetFlavorsFlavorOutputWithContext(ctx context.Context) GetFlavorsFlavorOutput
type GetFlavorsOutputArgs ¶
type GetFlavorsOutputArgs struct { // The region in which to obtain the CDM flavors. // If omitted, the provider-level region will be used. Region pulumi.StringPtrInput `pulumi:"region"` }
A collection of arguments for invoking getFlavors.
func (GetFlavorsOutputArgs) ElementType ¶
func (GetFlavorsOutputArgs) ElementType() reflect.Type
type GetFlavorsResult ¶
type GetFlavorsResult struct { // Indicates the flavors information. Structure is documented below. Flavors []GetFlavorsFlavor `pulumi:"flavors"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Region string `pulumi:"region"` // The version of the CDM cluster. Version string `pulumi:"version"` }
A collection of values returned by getFlavors.
func GetFlavors ¶
func GetFlavors(ctx *pulumi.Context, args *GetFlavorsArgs, opts ...pulumi.InvokeOption) (*GetFlavorsResult, error)
Use this data source to get available HuaweiCloud CDM flavors.
## Example Usage
```go package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Cdm" "github.com/pulumi/pulumi-huaweicloud/sdk/go/huaweicloud/Cdm" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := Cdm.GetFlavors(ctx, nil, nil) if err != nil { return err } return nil }) }
```
type GetFlavorsResultOutput ¶
type GetFlavorsResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getFlavors.
func GetFlavorsOutput ¶
func GetFlavorsOutput(ctx *pulumi.Context, args GetFlavorsOutputArgs, opts ...pulumi.InvokeOption) GetFlavorsResultOutput
func (GetFlavorsResultOutput) ElementType ¶
func (GetFlavorsResultOutput) ElementType() reflect.Type
func (GetFlavorsResultOutput) Flavors ¶
func (o GetFlavorsResultOutput) Flavors() GetFlavorsFlavorArrayOutput
Indicates the flavors information. Structure is documented below.
func (GetFlavorsResultOutput) Id ¶
func (o GetFlavorsResultOutput) Id() pulumi.StringOutput
The provider-assigned unique ID for this managed resource.
func (GetFlavorsResultOutput) Region ¶
func (o GetFlavorsResultOutput) Region() pulumi.StringOutput
func (GetFlavorsResultOutput) ToGetFlavorsResultOutput ¶
func (o GetFlavorsResultOutput) ToGetFlavorsResultOutput() GetFlavorsResultOutput
func (GetFlavorsResultOutput) ToGetFlavorsResultOutputWithContext ¶
func (o GetFlavorsResultOutput) ToGetFlavorsResultOutputWithContext(ctx context.Context) GetFlavorsResultOutput
func (GetFlavorsResultOutput) Version ¶
func (o GetFlavorsResultOutput) Version() pulumi.StringOutput
The version of the CDM cluster.
type Job ¶
type Job struct { pulumi.CustomResourceState // Specifies the ID of CDM cluster which this job run in. // Changing this parameter will create a new resource. ClusterId pulumi.StringOutput `pulumi:"clusterId"` // Specifies the job configuration. Structure is documented below. Config JobConfigPtrOutput `pulumi:"config"` // Specifies the connector name of destination link. // Changing this parameter will create a new resource. DestinationConnector pulumi.StringOutput `pulumi:"destinationConnector"` // Specifies the destination job configuration parameters. Each type of the // data source to be connected has different configuration parameters, please refer to the document link below. DestinationJobConfig pulumi.StringMapOutput `pulumi:"destinationJobConfig"` // Specifies the destination link name. // Changing this parameter will create a new resource. DestinationLinkName pulumi.StringOutput `pulumi:"destinationLinkName"` // Specifies type of job. Changing this parameter will create a new resource. // The options are as follows: JobType pulumi.StringOutput `pulumi:"jobType"` // Specifies job name, which can contains of 1 to 240 characters, starting with a // letter. Only letters, digits, hyphens (-), and underscores (_) are allowed. Name pulumi.StringOutput `pulumi:"name"` // The region in which to create the job resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringOutput `pulumi:"region"` // Specifies the connector name of source link. // Changing this parameter will create a new resource. SourceConnector pulumi.StringOutput `pulumi:"sourceConnector"` // Specifies the source job configuration parameters. Each type of the data source // to be connected has different configuration parameters, please refer to the document link below. SourceJobConfig pulumi.StringMapOutput `pulumi:"sourceJobConfig"` // Specifies the source link name. // Changing this parameter will create a new resource. SourceLinkName pulumi.StringOutput `pulumi:"sourceLinkName"` // Job status. The options are as follows: Status pulumi.StringOutput `pulumi:"status"` }
Manages CDM job resource within HuaweiCloud.
## Example Usage ### Create a cdm job
```go package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Cdm" "github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Obs" "github.com/pulumi/pulumi-huaweicloud/sdk/go/huaweicloud/Cdm" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { cfg := config.New(ctx, "") name := cfg.RequireObject("name") obsLinkName := cfg.RequireObject("obsLinkName") obsInputBucket := cfg.RequireObject("obsInputBucket") obsOutputBucket := cfg.RequireObject("obsOutputBucket") obsLinkNameInput := cfg.RequireObject("obsLinkNameInput") _, err := Obs.NewBucket(ctx, "input", &Obs.BucketArgs{ Bucket: pulumi.String("job-input"), Acl: pulumi.String("private"), ForceDestroy: pulumi.Bool(true), }) if err != nil { return err } _, err = Obs.NewBucket(ctx, "output", &Obs.BucketArgs{ Bucket: pulumi.String("job-output"), Acl: pulumi.String("private"), ForceDestroy: pulumi.Bool(true), }) if err != nil { return err } _, err = Cdm.NewJob(ctx, "test", &Cdm.JobArgs{ JobType: pulumi.String("NORMAL_JOB"), ClusterId: pulumi.Any(huaweicloud_cdm_cluster.Test.Id), SourceConnector: pulumi.String("obs-connector"), SourceLinkName: pulumi.Any(obsLinkName), SourceJobConfig: pulumi.StringMap{ "bucketName": pulumi.Any(obsInputBucket), "inputDirectory": pulumi.String("/"), "listTextFile": pulumi.String("false"), "inputFormat": pulumi.String("BINARY_FILE"), "fromCompression": pulumi.String("NONE"), "fromFileOpType": pulumi.String("DO_NOTHING"), "useMarkerFile": pulumi.String("false"), "useTimeFilter": pulumi.String("false"), "fileSeparator": pulumi.String("|"), "filterType": pulumi.String("NONE"), "useWildCard": pulumi.String("false"), "decryption": pulumi.String("NONE"), "nonexistentPathDisregard": pulumi.String("false"), }, DestinationConnector: pulumi.String("obs-connector"), DestinationLinkName: pulumi.Any(obsLinkName), DestinationJobConfig: pulumi.StringMap{ "bucketName": pulumi.Any(obsOutputBucket), "outputDirectory": pulumi.String("/"), "outputFormat": pulumi.String("BINARY_FILE"), "validateMD5": pulumi.String("true"), "recordMD5Result": pulumi.String("false"), "duplicateFileOpType": pulumi.String("REPLACE"), "useCustomDirectory": pulumi.String("false"), "encryption": pulumi.String("NONE"), "copyContentType": pulumi.String("false"), "shouldClearTable": pulumi.String("false"), }, Config: &cdm.JobConfigArgs{ RetryType: pulumi.String("NONE"), SchedulerEnabled: pulumi.Bool(false), ThrottlingExtractorsNumber: pulumi.Int(4), ThrottlingRecordDirtyData: pulumi.Bool(false), ThrottlingMaxErrorRecords: pulumi.Int(10), ThrottlingLoaderNumber: pulumi.Int(1), }, }) if err != nil { return err } return nil }) }
```
## Import
Jobs can be imported by `id`. It is composed of the ID of CDM cluster which this job run in and the name of job,
separated by a slash. For example, bash
```sh
$ pulumi import huaweicloud:Cdm/job:Job test b11b407c-e604-4e8d-8bc4-92398320b847/jobName
```
Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`source_job_config` and `destination_job_config`.
It is generally recommended running `terraform plan` after importing a cluster.
You can then decide if changes should be applied to the cluster, or the resource definition should be updated to align with the cluster. Also you can ignore changes as below. hcl resource "huaweicloud_cdm_cluster" "test" {
... lifecycle { ignore_changes = [ source_job_config, destination_job_config, ] } }
func GetJob ¶
func GetJob(ctx *pulumi.Context, name string, id pulumi.IDInput, state *JobState, opts ...pulumi.ResourceOption) (*Job, error)
GetJob gets an existing Job resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewJob ¶
func NewJob(ctx *pulumi.Context, name string, args *JobArgs, opts ...pulumi.ResourceOption) (*Job, error)
NewJob registers a new resource with the given unique name, arguments, and options.
func (*Job) ElementType ¶
func (*Job) ToJobOutput ¶
type JobArgs ¶
type JobArgs struct { // Specifies the ID of CDM cluster which this job run in. // Changing this parameter will create a new resource. ClusterId pulumi.StringInput // Specifies the job configuration. Structure is documented below. Config JobConfigPtrInput // Specifies the connector name of destination link. // Changing this parameter will create a new resource. DestinationConnector pulumi.StringInput // Specifies the destination job configuration parameters. Each type of the // data source to be connected has different configuration parameters, please refer to the document link below. DestinationJobConfig pulumi.StringMapInput // Specifies the destination link name. // Changing this parameter will create a new resource. DestinationLinkName pulumi.StringInput // Specifies type of job. Changing this parameter will create a new resource. // The options are as follows: JobType pulumi.StringInput // Specifies job name, which can contains of 1 to 240 characters, starting with a // letter. Only letters, digits, hyphens (-), and underscores (_) are allowed. Name pulumi.StringPtrInput // The region in which to create the job resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringPtrInput // Specifies the connector name of source link. // Changing this parameter will create a new resource. SourceConnector pulumi.StringInput // Specifies the source job configuration parameters. Each type of the data source // to be connected has different configuration parameters, please refer to the document link below. SourceJobConfig pulumi.StringMapInput // Specifies the source link name. // Changing this parameter will create a new resource. SourceLinkName pulumi.StringInput }
The set of arguments for constructing a Job resource.
func (JobArgs) ElementType ¶
type JobArray ¶
type JobArray []JobInput
func (JobArray) ElementType ¶
func (JobArray) ToJobArrayOutput ¶
func (i JobArray) ToJobArrayOutput() JobArrayOutput
func (JobArray) ToJobArrayOutputWithContext ¶
func (i JobArray) ToJobArrayOutputWithContext(ctx context.Context) JobArrayOutput
type JobArrayInput ¶
type JobArrayInput interface { pulumi.Input ToJobArrayOutput() JobArrayOutput ToJobArrayOutputWithContext(context.Context) JobArrayOutput }
JobArrayInput is an input type that accepts JobArray and JobArrayOutput values. You can construct a concrete instance of `JobArrayInput` via:
JobArray{ JobArgs{...} }
type JobArrayOutput ¶
type JobArrayOutput struct{ *pulumi.OutputState }
func (JobArrayOutput) ElementType ¶
func (JobArrayOutput) ElementType() reflect.Type
func (JobArrayOutput) ToJobArrayOutput ¶
func (o JobArrayOutput) ToJobArrayOutput() JobArrayOutput
func (JobArrayOutput) ToJobArrayOutputWithContext ¶
func (o JobArrayOutput) ToJobArrayOutputWithContext(ctx context.Context) JobArrayOutput
type JobConfig ¶
type JobConfig struct { // Specifies group to which a job belongs. The default group is `DEFAULT`. GroupName *string `pulumi:"groupName"` // Specifies whether to automatically retry if a job fails to be executed. // The options are as follows: // + **NONE**: Do not retry. // + **RETRY_TRIPLE**: Retry three times. RetryType *string `pulumi:"retryType"` // Specifies cycle of a scheduled task. If `schedulerCycleType` is set to minute // and `schedulerCycle` is set to 10, the scheduled task is executed every 10 minutes. SchedulerCycle *int `pulumi:"schedulerCycle"` // Specifies cycle type of a scheduled task. The options are as follows: // `minute`, `hour`, `day`, `week`, `month`. SchedulerCycleType *string `pulumi:"schedulerCycleType"` // Specifies whether to delete a job after the job is executed. // The options are as follows: // + **NONE**: The job will not be deleted after it is executed. // + **DELETE_AFTER_SUCCEED**: The job will be deleted only after it is successfully executed. It is applicable to // massive one-time jobs. // + **DELETE**: Thejob will be deleted after it is executed, regardless of the execution result. SchedulerDisposableType *string `pulumi:"schedulerDisposableType"` // Specifies whether to enable a scheduled task. Default value is `false`. SchedulerEnabled *bool `pulumi:"schedulerEnabled"` // Specifies time when a scheduled task is triggered in a cycle. This parameter // is valid only when `schedulerCycleType` is set to `hour`, `week`, or `month`. // + If `schedulerCycleType` is set to month, cycle is set to 1, and runAt is set to 15, the scheduled task is executed // on the 15th day of each month. You can set runAt to multiple values and separate the values with commas (,). // For example, if runAt is set to 1,2,3,4,5, the scheduled task is executed on the first day, second day, third day, // fourth day, and fifth day of each month. // + If `schedulerCycleType` is set to week and runAt is set to mon,tue,wed,thu,fri, the scheduled task is executed on // Monday to Friday. // + If `schedulerCycleType` is set to hour and runAt is set to 27,57, the scheduled task is executed at the 27th and // 57th minute in the cycle. SchedulerRunAt *string `pulumi:"schedulerRunAt"` // Specifies start time of a scheduled task. // For example, `2018-01-24 19:56:19` SchedulerStartDate *string `pulumi:"schedulerStartDate"` // Specifies End time of a scheduled task. For example, `2018-01-27 23:59:00`. // If you do not set the end time, the scheduled task is always executed and will never stop. SchedulerStopDate *string `pulumi:"schedulerStopDate"` // Specifies name of the OBS bucket to which dirty data is // written. This parameter is valid only when dirty data is written to `OBS`. ThrottlingDirtyWriteToBucket *string `pulumi:"throttlingDirtyWriteToBucket"` // Specifies the directory in the OBS bucket or HDFS which // dirty data is written to. For example, `/data/dirtydata/`. ThrottlingDirtyWriteToDirectory *string `pulumi:"throttlingDirtyWriteToDirectory"` // Specifies the link name to which dirty data is written to. // The Dirty data can be written only to `OBS` or `HDFS`. ThrottlingDirtyWriteToLink *string `pulumi:"throttlingDirtyWriteToLink"` // Specifies maximum number of concurrent extraction jobs. ThrottlingExtractorsNumber *int `pulumi:"throttlingExtractorsNumber"` // Specifies maximum number of loading jobs. This parameter is available // only when HBase or Hive serves as the destination data source. ThrottlingLoaderNumber *int `pulumi:"throttlingLoaderNumber"` // Specifies maximum number of error records in a single // shard. When the number of error records of a map exceeds the upper limit, the task automatically ends. ThrottlingMaxErrorRecords *int `pulumi:"throttlingMaxErrorRecords"` // Specifies whether to write dirty data. ThrottlingRecordDirtyData *bool `pulumi:"throttlingRecordDirtyData"` }
type JobConfigArgs ¶
type JobConfigArgs struct { // Specifies group to which a job belongs. The default group is `DEFAULT`. GroupName pulumi.StringPtrInput `pulumi:"groupName"` // Specifies whether to automatically retry if a job fails to be executed. // The options are as follows: // + **NONE**: Do not retry. // + **RETRY_TRIPLE**: Retry three times. RetryType pulumi.StringPtrInput `pulumi:"retryType"` // Specifies cycle of a scheduled task. If `schedulerCycleType` is set to minute // and `schedulerCycle` is set to 10, the scheduled task is executed every 10 minutes. SchedulerCycle pulumi.IntPtrInput `pulumi:"schedulerCycle"` // Specifies cycle type of a scheduled task. The options are as follows: // `minute`, `hour`, `day`, `week`, `month`. SchedulerCycleType pulumi.StringPtrInput `pulumi:"schedulerCycleType"` // Specifies whether to delete a job after the job is executed. // The options are as follows: // + **NONE**: The job will not be deleted after it is executed. // + **DELETE_AFTER_SUCCEED**: The job will be deleted only after it is successfully executed. It is applicable to // massive one-time jobs. // + **DELETE**: Thejob will be deleted after it is executed, regardless of the execution result. SchedulerDisposableType pulumi.StringPtrInput `pulumi:"schedulerDisposableType"` // Specifies whether to enable a scheduled task. Default value is `false`. SchedulerEnabled pulumi.BoolPtrInput `pulumi:"schedulerEnabled"` // Specifies time when a scheduled task is triggered in a cycle. This parameter // is valid only when `schedulerCycleType` is set to `hour`, `week`, or `month`. // + If `schedulerCycleType` is set to month, cycle is set to 1, and runAt is set to 15, the scheduled task is executed // on the 15th day of each month. You can set runAt to multiple values and separate the values with commas (,). // For example, if runAt is set to 1,2,3,4,5, the scheduled task is executed on the first day, second day, third day, // fourth day, and fifth day of each month. // + If `schedulerCycleType` is set to week and runAt is set to mon,tue,wed,thu,fri, the scheduled task is executed on // Monday to Friday. // + If `schedulerCycleType` is set to hour and runAt is set to 27,57, the scheduled task is executed at the 27th and // 57th minute in the cycle. SchedulerRunAt pulumi.StringPtrInput `pulumi:"schedulerRunAt"` // Specifies start time of a scheduled task. // For example, `2018-01-24 19:56:19` SchedulerStartDate pulumi.StringPtrInput `pulumi:"schedulerStartDate"` // Specifies End time of a scheduled task. For example, `2018-01-27 23:59:00`. // If you do not set the end time, the scheduled task is always executed and will never stop. SchedulerStopDate pulumi.StringPtrInput `pulumi:"schedulerStopDate"` // Specifies name of the OBS bucket to which dirty data is // written. This parameter is valid only when dirty data is written to `OBS`. ThrottlingDirtyWriteToBucket pulumi.StringPtrInput `pulumi:"throttlingDirtyWriteToBucket"` // Specifies the directory in the OBS bucket or HDFS which // dirty data is written to. For example, `/data/dirtydata/`. ThrottlingDirtyWriteToDirectory pulumi.StringPtrInput `pulumi:"throttlingDirtyWriteToDirectory"` // Specifies the link name to which dirty data is written to. // The Dirty data can be written only to `OBS` or `HDFS`. ThrottlingDirtyWriteToLink pulumi.StringPtrInput `pulumi:"throttlingDirtyWriteToLink"` // Specifies maximum number of concurrent extraction jobs. ThrottlingExtractorsNumber pulumi.IntPtrInput `pulumi:"throttlingExtractorsNumber"` // Specifies maximum number of loading jobs. This parameter is available // only when HBase or Hive serves as the destination data source. ThrottlingLoaderNumber pulumi.IntPtrInput `pulumi:"throttlingLoaderNumber"` // Specifies maximum number of error records in a single // shard. When the number of error records of a map exceeds the upper limit, the task automatically ends. ThrottlingMaxErrorRecords pulumi.IntPtrInput `pulumi:"throttlingMaxErrorRecords"` // Specifies whether to write dirty data. ThrottlingRecordDirtyData pulumi.BoolPtrInput `pulumi:"throttlingRecordDirtyData"` }
func (JobConfigArgs) ElementType ¶
func (JobConfigArgs) ElementType() reflect.Type
func (JobConfigArgs) ToJobConfigOutput ¶
func (i JobConfigArgs) ToJobConfigOutput() JobConfigOutput
func (JobConfigArgs) ToJobConfigOutputWithContext ¶
func (i JobConfigArgs) ToJobConfigOutputWithContext(ctx context.Context) JobConfigOutput
func (JobConfigArgs) ToJobConfigPtrOutput ¶
func (i JobConfigArgs) ToJobConfigPtrOutput() JobConfigPtrOutput
func (JobConfigArgs) ToJobConfigPtrOutputWithContext ¶
func (i JobConfigArgs) ToJobConfigPtrOutputWithContext(ctx context.Context) JobConfigPtrOutput
type JobConfigInput ¶
type JobConfigInput interface { pulumi.Input ToJobConfigOutput() JobConfigOutput ToJobConfigOutputWithContext(context.Context) JobConfigOutput }
JobConfigInput is an input type that accepts JobConfigArgs and JobConfigOutput values. You can construct a concrete instance of `JobConfigInput` via:
JobConfigArgs{...}
type JobConfigOutput ¶
type JobConfigOutput struct{ *pulumi.OutputState }
func (JobConfigOutput) ElementType ¶
func (JobConfigOutput) ElementType() reflect.Type
func (JobConfigOutput) GroupName ¶
func (o JobConfigOutput) GroupName() pulumi.StringPtrOutput
Specifies group to which a job belongs. The default group is `DEFAULT`.
func (JobConfigOutput) RetryType ¶
func (o JobConfigOutput) RetryType() pulumi.StringPtrOutput
Specifies whether to automatically retry if a job fails to be executed. The options are as follows: + **NONE**: Do not retry. + **RETRY_TRIPLE**: Retry three times.
func (JobConfigOutput) SchedulerCycle ¶
func (o JobConfigOutput) SchedulerCycle() pulumi.IntPtrOutput
Specifies cycle of a scheduled task. If `schedulerCycleType` is set to minute and `schedulerCycle` is set to 10, the scheduled task is executed every 10 minutes.
func (JobConfigOutput) SchedulerCycleType ¶
func (o JobConfigOutput) SchedulerCycleType() pulumi.StringPtrOutput
Specifies cycle type of a scheduled task. The options are as follows: `minute`, `hour`, `day`, `week`, `month`.
func (JobConfigOutput) SchedulerDisposableType ¶
func (o JobConfigOutput) SchedulerDisposableType() pulumi.StringPtrOutput
Specifies whether to delete a job after the job is executed. The options are as follows:
- **NONE**: The job will not be deleted after it is executed.
- **DELETE_AFTER_SUCCEED**: The job will be deleted only after it is successfully executed. It is applicable to massive one-time jobs.
- **DELETE**: Thejob will be deleted after it is executed, regardless of the execution result.
func (JobConfigOutput) SchedulerEnabled ¶
func (o JobConfigOutput) SchedulerEnabled() pulumi.BoolPtrOutput
Specifies whether to enable a scheduled task. Default value is `false`.
func (JobConfigOutput) SchedulerRunAt ¶
func (o JobConfigOutput) SchedulerRunAt() pulumi.StringPtrOutput
Specifies time when a scheduled task is triggered in a cycle. This parameter is valid only when `schedulerCycleType` is set to `hour`, `week`, or `month`.
- If `schedulerCycleType` is set to month, cycle is set to 1, and runAt is set to 15, the scheduled task is executed on the 15th day of each month. You can set runAt to multiple values and separate the values with commas (,). For example, if runAt is set to 1,2,3,4,5, the scheduled task is executed on the first day, second day, third day, fourth day, and fifth day of each month.
- If `schedulerCycleType` is set to week and runAt is set to mon,tue,wed,thu,fri, the scheduled task is executed on Monday to Friday.
- If `schedulerCycleType` is set to hour and runAt is set to 27,57, the scheduled task is executed at the 27th and 57th minute in the cycle.
func (JobConfigOutput) SchedulerStartDate ¶
func (o JobConfigOutput) SchedulerStartDate() pulumi.StringPtrOutput
Specifies start time of a scheduled task. For example, `2018-01-24 19:56:19`
func (JobConfigOutput) SchedulerStopDate ¶
func (o JobConfigOutput) SchedulerStopDate() pulumi.StringPtrOutput
Specifies End time of a scheduled task. For example, `2018-01-27 23:59:00`. If you do not set the end time, the scheduled task is always executed and will never stop.
func (JobConfigOutput) ThrottlingDirtyWriteToBucket ¶
func (o JobConfigOutput) ThrottlingDirtyWriteToBucket() pulumi.StringPtrOutput
Specifies name of the OBS bucket to which dirty data is written. This parameter is valid only when dirty data is written to `OBS`.
func (JobConfigOutput) ThrottlingDirtyWriteToDirectory ¶
func (o JobConfigOutput) ThrottlingDirtyWriteToDirectory() pulumi.StringPtrOutput
Specifies the directory in the OBS bucket or HDFS which dirty data is written to. For example, `/data/dirtydata/`.
func (JobConfigOutput) ThrottlingDirtyWriteToLink ¶
func (o JobConfigOutput) ThrottlingDirtyWriteToLink() pulumi.StringPtrOutput
Specifies the link name to which dirty data is written to. The Dirty data can be written only to `OBS` or `HDFS`.
func (JobConfigOutput) ThrottlingExtractorsNumber ¶
func (o JobConfigOutput) ThrottlingExtractorsNumber() pulumi.IntPtrOutput
Specifies maximum number of concurrent extraction jobs.
func (JobConfigOutput) ThrottlingLoaderNumber ¶
func (o JobConfigOutput) ThrottlingLoaderNumber() pulumi.IntPtrOutput
Specifies maximum number of loading jobs. This parameter is available only when HBase or Hive serves as the destination data source.
func (JobConfigOutput) ThrottlingMaxErrorRecords ¶
func (o JobConfigOutput) ThrottlingMaxErrorRecords() pulumi.IntPtrOutput
Specifies maximum number of error records in a single shard. When the number of error records of a map exceeds the upper limit, the task automatically ends.
func (JobConfigOutput) ThrottlingRecordDirtyData ¶
func (o JobConfigOutput) ThrottlingRecordDirtyData() pulumi.BoolPtrOutput
Specifies whether to write dirty data.
func (JobConfigOutput) ToJobConfigOutput ¶
func (o JobConfigOutput) ToJobConfigOutput() JobConfigOutput
func (JobConfigOutput) ToJobConfigOutputWithContext ¶
func (o JobConfigOutput) ToJobConfigOutputWithContext(ctx context.Context) JobConfigOutput
func (JobConfigOutput) ToJobConfigPtrOutput ¶
func (o JobConfigOutput) ToJobConfigPtrOutput() JobConfigPtrOutput
func (JobConfigOutput) ToJobConfigPtrOutputWithContext ¶
func (o JobConfigOutput) ToJobConfigPtrOutputWithContext(ctx context.Context) JobConfigPtrOutput
type JobConfigPtrInput ¶
type JobConfigPtrInput interface { pulumi.Input ToJobConfigPtrOutput() JobConfigPtrOutput ToJobConfigPtrOutputWithContext(context.Context) JobConfigPtrOutput }
JobConfigPtrInput is an input type that accepts JobConfigArgs, JobConfigPtr and JobConfigPtrOutput values. You can construct a concrete instance of `JobConfigPtrInput` via:
JobConfigArgs{...} or: nil
func JobConfigPtr ¶
func JobConfigPtr(v *JobConfigArgs) JobConfigPtrInput
type JobConfigPtrOutput ¶
type JobConfigPtrOutput struct{ *pulumi.OutputState }
func (JobConfigPtrOutput) Elem ¶
func (o JobConfigPtrOutput) Elem() JobConfigOutput
func (JobConfigPtrOutput) ElementType ¶
func (JobConfigPtrOutput) ElementType() reflect.Type
func (JobConfigPtrOutput) GroupName ¶
func (o JobConfigPtrOutput) GroupName() pulumi.StringPtrOutput
Specifies group to which a job belongs. The default group is `DEFAULT`.
func (JobConfigPtrOutput) RetryType ¶
func (o JobConfigPtrOutput) RetryType() pulumi.StringPtrOutput
Specifies whether to automatically retry if a job fails to be executed. The options are as follows: + **NONE**: Do not retry. + **RETRY_TRIPLE**: Retry three times.
func (JobConfigPtrOutput) SchedulerCycle ¶
func (o JobConfigPtrOutput) SchedulerCycle() pulumi.IntPtrOutput
Specifies cycle of a scheduled task. If `schedulerCycleType` is set to minute and `schedulerCycle` is set to 10, the scheduled task is executed every 10 minutes.
func (JobConfigPtrOutput) SchedulerCycleType ¶
func (o JobConfigPtrOutput) SchedulerCycleType() pulumi.StringPtrOutput
Specifies cycle type of a scheduled task. The options are as follows: `minute`, `hour`, `day`, `week`, `month`.
func (JobConfigPtrOutput) SchedulerDisposableType ¶
func (o JobConfigPtrOutput) SchedulerDisposableType() pulumi.StringPtrOutput
Specifies whether to delete a job after the job is executed. The options are as follows:
- **NONE**: The job will not be deleted after it is executed.
- **DELETE_AFTER_SUCCEED**: The job will be deleted only after it is successfully executed. It is applicable to massive one-time jobs.
- **DELETE**: Thejob will be deleted after it is executed, regardless of the execution result.
func (JobConfigPtrOutput) SchedulerEnabled ¶
func (o JobConfigPtrOutput) SchedulerEnabled() pulumi.BoolPtrOutput
Specifies whether to enable a scheduled task. Default value is `false`.
func (JobConfigPtrOutput) SchedulerRunAt ¶
func (o JobConfigPtrOutput) SchedulerRunAt() pulumi.StringPtrOutput
Specifies time when a scheduled task is triggered in a cycle. This parameter is valid only when `schedulerCycleType` is set to `hour`, `week`, or `month`.
- If `schedulerCycleType` is set to month, cycle is set to 1, and runAt is set to 15, the scheduled task is executed on the 15th day of each month. You can set runAt to multiple values and separate the values with commas (,). For example, if runAt is set to 1,2,3,4,5, the scheduled task is executed on the first day, second day, third day, fourth day, and fifth day of each month.
- If `schedulerCycleType` is set to week and runAt is set to mon,tue,wed,thu,fri, the scheduled task is executed on Monday to Friday.
- If `schedulerCycleType` is set to hour and runAt is set to 27,57, the scheduled task is executed at the 27th and 57th minute in the cycle.
func (JobConfigPtrOutput) SchedulerStartDate ¶
func (o JobConfigPtrOutput) SchedulerStartDate() pulumi.StringPtrOutput
Specifies start time of a scheduled task. For example, `2018-01-24 19:56:19`
func (JobConfigPtrOutput) SchedulerStopDate ¶
func (o JobConfigPtrOutput) SchedulerStopDate() pulumi.StringPtrOutput
Specifies End time of a scheduled task. For example, `2018-01-27 23:59:00`. If you do not set the end time, the scheduled task is always executed and will never stop.
func (JobConfigPtrOutput) ThrottlingDirtyWriteToBucket ¶
func (o JobConfigPtrOutput) ThrottlingDirtyWriteToBucket() pulumi.StringPtrOutput
Specifies name of the OBS bucket to which dirty data is written. This parameter is valid only when dirty data is written to `OBS`.
func (JobConfigPtrOutput) ThrottlingDirtyWriteToDirectory ¶
func (o JobConfigPtrOutput) ThrottlingDirtyWriteToDirectory() pulumi.StringPtrOutput
Specifies the directory in the OBS bucket or HDFS which dirty data is written to. For example, `/data/dirtydata/`.
func (JobConfigPtrOutput) ThrottlingDirtyWriteToLink ¶
func (o JobConfigPtrOutput) ThrottlingDirtyWriteToLink() pulumi.StringPtrOutput
Specifies the link name to which dirty data is written to. The Dirty data can be written only to `OBS` or `HDFS`.
func (JobConfigPtrOutput) ThrottlingExtractorsNumber ¶
func (o JobConfigPtrOutput) ThrottlingExtractorsNumber() pulumi.IntPtrOutput
Specifies maximum number of concurrent extraction jobs.
func (JobConfigPtrOutput) ThrottlingLoaderNumber ¶
func (o JobConfigPtrOutput) ThrottlingLoaderNumber() pulumi.IntPtrOutput
Specifies maximum number of loading jobs. This parameter is available only when HBase or Hive serves as the destination data source.
func (JobConfigPtrOutput) ThrottlingMaxErrorRecords ¶
func (o JobConfigPtrOutput) ThrottlingMaxErrorRecords() pulumi.IntPtrOutput
Specifies maximum number of error records in a single shard. When the number of error records of a map exceeds the upper limit, the task automatically ends.
func (JobConfigPtrOutput) ThrottlingRecordDirtyData ¶
func (o JobConfigPtrOutput) ThrottlingRecordDirtyData() pulumi.BoolPtrOutput
Specifies whether to write dirty data.
func (JobConfigPtrOutput) ToJobConfigPtrOutput ¶
func (o JobConfigPtrOutput) ToJobConfigPtrOutput() JobConfigPtrOutput
func (JobConfigPtrOutput) ToJobConfigPtrOutputWithContext ¶
func (o JobConfigPtrOutput) ToJobConfigPtrOutputWithContext(ctx context.Context) JobConfigPtrOutput
type JobMap ¶
func (JobMap) ElementType ¶
func (JobMap) ToJobMapOutput ¶
func (i JobMap) ToJobMapOutput() JobMapOutput
func (JobMap) ToJobMapOutputWithContext ¶
func (i JobMap) ToJobMapOutputWithContext(ctx context.Context) JobMapOutput
type JobMapInput ¶
type JobMapInput interface { pulumi.Input ToJobMapOutput() JobMapOutput ToJobMapOutputWithContext(context.Context) JobMapOutput }
JobMapInput is an input type that accepts JobMap and JobMapOutput values. You can construct a concrete instance of `JobMapInput` via:
JobMap{ "key": JobArgs{...} }
type JobMapOutput ¶
type JobMapOutput struct{ *pulumi.OutputState }
func (JobMapOutput) ElementType ¶
func (JobMapOutput) ElementType() reflect.Type
func (JobMapOutput) MapIndex ¶
func (o JobMapOutput) MapIndex(k pulumi.StringInput) JobOutput
func (JobMapOutput) ToJobMapOutput ¶
func (o JobMapOutput) ToJobMapOutput() JobMapOutput
func (JobMapOutput) ToJobMapOutputWithContext ¶
func (o JobMapOutput) ToJobMapOutputWithContext(ctx context.Context) JobMapOutput
type JobOutput ¶
type JobOutput struct{ *pulumi.OutputState }
func (JobOutput) ClusterId ¶
func (o JobOutput) ClusterId() pulumi.StringOutput
Specifies the ID of CDM cluster which this job run in. Changing this parameter will create a new resource.
func (JobOutput) Config ¶
func (o JobOutput) Config() JobConfigPtrOutput
Specifies the job configuration. Structure is documented below.
func (JobOutput) DestinationConnector ¶
func (o JobOutput) DestinationConnector() pulumi.StringOutput
Specifies the connector name of destination link. Changing this parameter will create a new resource.
func (JobOutput) DestinationJobConfig ¶
func (o JobOutput) DestinationJobConfig() pulumi.StringMapOutput
Specifies the destination job configuration parameters. Each type of the data source to be connected has different configuration parameters, please refer to the document link below.
func (JobOutput) DestinationLinkName ¶
func (o JobOutput) DestinationLinkName() pulumi.StringOutput
Specifies the destination link name. Changing this parameter will create a new resource.
func (JobOutput) ElementType ¶
func (JobOutput) JobType ¶
func (o JobOutput) JobType() pulumi.StringOutput
Specifies type of job. Changing this parameter will create a new resource. The options are as follows:
func (JobOutput) Name ¶
func (o JobOutput) Name() pulumi.StringOutput
Specifies job name, which can contains of 1 to 240 characters, starting with a letter. Only letters, digits, hyphens (-), and underscores (_) are allowed.
func (JobOutput) Region ¶
func (o JobOutput) Region() pulumi.StringOutput
The region in which to create the job resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
func (JobOutput) SourceConnector ¶
func (o JobOutput) SourceConnector() pulumi.StringOutput
Specifies the connector name of source link. Changing this parameter will create a new resource.
func (JobOutput) SourceJobConfig ¶
func (o JobOutput) SourceJobConfig() pulumi.StringMapOutput
Specifies the source job configuration parameters. Each type of the data source to be connected has different configuration parameters, please refer to the document link below.
func (JobOutput) SourceLinkName ¶
func (o JobOutput) SourceLinkName() pulumi.StringOutput
Specifies the source link name. Changing this parameter will create a new resource.
func (JobOutput) Status ¶
func (o JobOutput) Status() pulumi.StringOutput
Job status. The options are as follows:
func (JobOutput) ToJobOutput ¶
type JobState ¶
type JobState struct { // Specifies the ID of CDM cluster which this job run in. // Changing this parameter will create a new resource. ClusterId pulumi.StringPtrInput // Specifies the job configuration. Structure is documented below. Config JobConfigPtrInput // Specifies the connector name of destination link. // Changing this parameter will create a new resource. DestinationConnector pulumi.StringPtrInput // Specifies the destination job configuration parameters. Each type of the // data source to be connected has different configuration parameters, please refer to the document link below. DestinationJobConfig pulumi.StringMapInput // Specifies the destination link name. // Changing this parameter will create a new resource. DestinationLinkName pulumi.StringPtrInput // Specifies type of job. Changing this parameter will create a new resource. // The options are as follows: JobType pulumi.StringPtrInput // Specifies job name, which can contains of 1 to 240 characters, starting with a // letter. Only letters, digits, hyphens (-), and underscores (_) are allowed. Name pulumi.StringPtrInput // The region in which to create the job resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringPtrInput // Specifies the connector name of source link. // Changing this parameter will create a new resource. SourceConnector pulumi.StringPtrInput // Specifies the source job configuration parameters. Each type of the data source // to be connected has different configuration parameters, please refer to the document link below. SourceJobConfig pulumi.StringMapInput // Specifies the source link name. // Changing this parameter will create a new resource. SourceLinkName pulumi.StringPtrInput // Job status. The options are as follows: Status pulumi.StringPtrInput }
func (JobState) ElementType ¶
type Link ¶
type Link struct { pulumi.CustomResourceState // Specifies access key for accessing the data sources. AccessKey pulumi.StringPtrOutput `pulumi:"accessKey"` // Specifies the id of CDM cluster which this link belongs to. // Changing this parameter will create a new resource. ClusterId pulumi.StringOutput `pulumi:"clusterId"` // Specifies the link configuration parameters. Each type of the data source to be connected // has different configuration parameters, please refer to the document link below. Config pulumi.StringMapOutput `pulumi:"config"` // Specifies the connector that is classified based on the type of the data // source to be connected. Changing this parameter will create a new resource. The options are as follows: Connector pulumi.StringOutput `pulumi:"connector"` // Specifies whether to enable the link. The default value is `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // Specifies the name of the link. Name pulumi.StringOutput `pulumi:"name"` // Specifies the password for accessing the data sources. Password pulumi.StringPtrOutput `pulumi:"password"` // The region in which to create the resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringOutput `pulumi:"region"` // Specifies security key for accessing the data sources. SecretKey pulumi.StringPtrOutput `pulumi:"secretKey"` }
Manages a link resource within HuaweiCloud. A link enables the CDM cluster to read data from and write data to
a data source.
## Example Usage ### Link to MySql
```go package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Cdm" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { cfg := config.New(ctx, "") mysqlLinkName := cfg.RequireObject("mysqlLinkName") cdmClusterId := cfg.RequireObject("cdmClusterId") mysqlHost := cfg.RequireObject("mysqlHost") dbName := cfg.RequireObject("dbName") dbPassword := cfg.RequireObject("dbPassword") _, err := Cdm.NewLink(ctx, "mysqlLink", &Cdm.LinkArgs{ Connector: pulumi.String("generic-jdbc-connector"), ClusterId: pulumi.Any(cdmClusterId), Config: pulumi.StringMap{ "databaseType": pulumi.String("MYSQL"), "host": pulumi.Any(mysqlHost), "port": pulumi.String("3306"), "database": pulumi.Any(dbName), "username": pulumi.Any(_var.Username), }, Password: pulumi.Any(dbPassword), }) if err != nil { return err } return nil }) }
```
## Import
The link can be imported by `id`, It is composed of the ID of CDM cluster and the name of job, separated by a slash.
For example, bash ¶
```sh
$ pulumi import huaweicloud:Cdm/link:Link test b11b407c-e604-4e8d-8bc4-92398320b847/linkName
```
Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`password` and `secret_key`. It is generally recommended running `terraform plan` after importing an instance. You can then decide if changes should be applied to the instance, or the resource definition should be updated to align with the instance. Also you can ignore changes as below. hcl resource "huaweicloud_cdm_link" "test" { ... lifecycle { ignore_changes = [ password, secret_key, ] } }
func GetLink ¶
func GetLink(ctx *pulumi.Context, name string, id pulumi.IDInput, state *LinkState, opts ...pulumi.ResourceOption) (*Link, error)
GetLink gets an existing Link resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewLink ¶
func NewLink(ctx *pulumi.Context, name string, args *LinkArgs, opts ...pulumi.ResourceOption) (*Link, error)
NewLink registers a new resource with the given unique name, arguments, and options.
func (*Link) ElementType ¶
func (*Link) ToLinkOutput ¶
func (i *Link) ToLinkOutput() LinkOutput
func (*Link) ToLinkOutputWithContext ¶
func (i *Link) ToLinkOutputWithContext(ctx context.Context) LinkOutput
type LinkArgs ¶
type LinkArgs struct { // Specifies access key for accessing the data sources. AccessKey pulumi.StringPtrInput // Specifies the id of CDM cluster which this link belongs to. // Changing this parameter will create a new resource. ClusterId pulumi.StringInput // Specifies the link configuration parameters. Each type of the data source to be connected // has different configuration parameters, please refer to the document link below. Config pulumi.StringMapInput // Specifies the connector that is classified based on the type of the data // source to be connected. Changing this parameter will create a new resource. The options are as follows: Connector pulumi.StringInput // Specifies whether to enable the link. The default value is `true`. Enabled pulumi.BoolPtrInput // Specifies the name of the link. Name pulumi.StringPtrInput // Specifies the password for accessing the data sources. Password pulumi.StringPtrInput // The region in which to create the resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringPtrInput // Specifies security key for accessing the data sources. SecretKey pulumi.StringPtrInput }
The set of arguments for constructing a Link resource.
func (LinkArgs) ElementType ¶
type LinkArray ¶
type LinkArray []LinkInput
func (LinkArray) ElementType ¶
func (LinkArray) ToLinkArrayOutput ¶
func (i LinkArray) ToLinkArrayOutput() LinkArrayOutput
func (LinkArray) ToLinkArrayOutputWithContext ¶
func (i LinkArray) ToLinkArrayOutputWithContext(ctx context.Context) LinkArrayOutput
type LinkArrayInput ¶
type LinkArrayInput interface { pulumi.Input ToLinkArrayOutput() LinkArrayOutput ToLinkArrayOutputWithContext(context.Context) LinkArrayOutput }
LinkArrayInput is an input type that accepts LinkArray and LinkArrayOutput values. You can construct a concrete instance of `LinkArrayInput` via:
LinkArray{ LinkArgs{...} }
type LinkArrayOutput ¶
type LinkArrayOutput struct{ *pulumi.OutputState }
func (LinkArrayOutput) ElementType ¶
func (LinkArrayOutput) ElementType() reflect.Type
func (LinkArrayOutput) Index ¶
func (o LinkArrayOutput) Index(i pulumi.IntInput) LinkOutput
func (LinkArrayOutput) ToLinkArrayOutput ¶
func (o LinkArrayOutput) ToLinkArrayOutput() LinkArrayOutput
func (LinkArrayOutput) ToLinkArrayOutputWithContext ¶
func (o LinkArrayOutput) ToLinkArrayOutputWithContext(ctx context.Context) LinkArrayOutput
type LinkInput ¶
type LinkInput interface { pulumi.Input ToLinkOutput() LinkOutput ToLinkOutputWithContext(ctx context.Context) LinkOutput }
type LinkMap ¶
func (LinkMap) ElementType ¶
func (LinkMap) ToLinkMapOutput ¶
func (i LinkMap) ToLinkMapOutput() LinkMapOutput
func (LinkMap) ToLinkMapOutputWithContext ¶
func (i LinkMap) ToLinkMapOutputWithContext(ctx context.Context) LinkMapOutput
type LinkMapInput ¶
type LinkMapInput interface { pulumi.Input ToLinkMapOutput() LinkMapOutput ToLinkMapOutputWithContext(context.Context) LinkMapOutput }
LinkMapInput is an input type that accepts LinkMap and LinkMapOutput values. You can construct a concrete instance of `LinkMapInput` via:
LinkMap{ "key": LinkArgs{...} }
type LinkMapOutput ¶
type LinkMapOutput struct{ *pulumi.OutputState }
func (LinkMapOutput) ElementType ¶
func (LinkMapOutput) ElementType() reflect.Type
func (LinkMapOutput) MapIndex ¶
func (o LinkMapOutput) MapIndex(k pulumi.StringInput) LinkOutput
func (LinkMapOutput) ToLinkMapOutput ¶
func (o LinkMapOutput) ToLinkMapOutput() LinkMapOutput
func (LinkMapOutput) ToLinkMapOutputWithContext ¶
func (o LinkMapOutput) ToLinkMapOutputWithContext(ctx context.Context) LinkMapOutput
type LinkOutput ¶
type LinkOutput struct{ *pulumi.OutputState }
func (LinkOutput) AccessKey ¶
func (o LinkOutput) AccessKey() pulumi.StringPtrOutput
Specifies access key for accessing the data sources.
func (LinkOutput) ClusterId ¶
func (o LinkOutput) ClusterId() pulumi.StringOutput
Specifies the id of CDM cluster which this link belongs to. Changing this parameter will create a new resource.
func (LinkOutput) Config ¶
func (o LinkOutput) Config() pulumi.StringMapOutput
Specifies the link configuration parameters. Each type of the data source to be connected has different configuration parameters, please refer to the document link below.
func (LinkOutput) Connector ¶
func (o LinkOutput) Connector() pulumi.StringOutput
Specifies the connector that is classified based on the type of the data source to be connected. Changing this parameter will create a new resource. The options are as follows:
func (LinkOutput) ElementType ¶
func (LinkOutput) ElementType() reflect.Type
func (LinkOutput) Enabled ¶
func (o LinkOutput) Enabled() pulumi.BoolPtrOutput
Specifies whether to enable the link. The default value is `true`.
func (LinkOutput) Name ¶
func (o LinkOutput) Name() pulumi.StringOutput
Specifies the name of the link.
func (LinkOutput) Password ¶
func (o LinkOutput) Password() pulumi.StringPtrOutput
Specifies the password for accessing the data sources.
func (LinkOutput) Region ¶
func (o LinkOutput) Region() pulumi.StringOutput
The region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
func (LinkOutput) SecretKey ¶
func (o LinkOutput) SecretKey() pulumi.StringPtrOutput
Specifies security key for accessing the data sources.
func (LinkOutput) ToLinkOutput ¶
func (o LinkOutput) ToLinkOutput() LinkOutput
func (LinkOutput) ToLinkOutputWithContext ¶
func (o LinkOutput) ToLinkOutputWithContext(ctx context.Context) LinkOutput
type LinkState ¶
type LinkState struct { // Specifies access key for accessing the data sources. AccessKey pulumi.StringPtrInput // Specifies the id of CDM cluster which this link belongs to. // Changing this parameter will create a new resource. ClusterId pulumi.StringPtrInput // Specifies the link configuration parameters. Each type of the data source to be connected // has different configuration parameters, please refer to the document link below. Config pulumi.StringMapInput // Specifies the connector that is classified based on the type of the data // source to be connected. Changing this parameter will create a new resource. The options are as follows: Connector pulumi.StringPtrInput // Specifies whether to enable the link. The default value is `true`. Enabled pulumi.BoolPtrInput // Specifies the name of the link. Name pulumi.StringPtrInput // Specifies the password for accessing the data sources. Password pulumi.StringPtrInput // The region in which to create the resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringPtrInput // Specifies security key for accessing the data sources. SecretKey pulumi.StringPtrInput }