in alicloud/resource_alicloud_dcdn_er.go [14:1012]
func resourceAlicloudDcdnEr() *schema.Resource {
return &schema.Resource{
Create: resourceAliCloudDcdnErCreate,
Read: resourceAliCloudDcdnErRead,
Update: resourceAliCloudDcdnErUpdate,
Delete: resourceAliCloudDcdnErDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(5 * time.Minute),
Update: schema.DefaultTimeout(5 * time.Minute),
Delete: schema.DefaultTimeout(5 * time.Minute),
},
Schema: map[string]*schema.Schema{
"er_name": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"description": {
Type: schema.TypeString,
Optional: true,
},
"env_conf": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"staging": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"production": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_anhui": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_beijing": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_chongqing": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_fujian": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_gansu": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_guangdong": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_guangxi": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_guizhou": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_hainan": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_hebei": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_heilongjiang": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_henan": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_hong_kong": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_hubei": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_hunan": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_jiangsu": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_jiangxi": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_jilin": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_liaoning": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_macau": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_neimenggu": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_ningxia": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_qinghai": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_shaanxi": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_shandong": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_shanghai": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_shanxi": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_sichuan": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_taiwan": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_tianjin": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_xinjiang": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_xizang": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_yunnan": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_zhejiang": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
"preset_canary_overseas": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"spec_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"5ms", "50ms", "100ms"}, false),
},
"code_rev": {
Type: schema.TypeString,
Optional: true,
},
"allowed_hosts": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
},
},
},
},
},
},
},
}
}