-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathNew-CloudflareITGlueFlexAssetType.ps1
More file actions
94 lines (92 loc) · 4.01 KB
/
New-CloudflareITGlueFlexAssetType.ps1
File metadata and controls
94 lines (92 loc) · 4.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
function New-CloudflareITGlueFlexAssetType {
param(
[string]$Name = 'Cloudflare DNS'
)
$Body = @{
Data = @{
type = 'flexible_asset_types'
attributes = @{
name = $Name
description = 'DNS Zones from Cloudflare.'
icon = 'cloud'
enabled = $true
show_in_menu = $false
}
relationships = @{
flexible_asset_fields = @{
data = @(
@{
type = 'flexible_asset_fields'
attributes = @{
order = 1
name = 'Name'
kind = 'Text'
hint = 'Name of the DNS Zone'
required = $true
show_in_list = $true
use_for_title = $true
}
},
@{
type = 'flexible_asset_fields'
attributes = @{
order = 2
name = 'Last Sync'
kind = 'Text'
hint = 'When zone last synced (UTC)'
required = $true
show_in_list = $false
}
},
@{
type = 'flexible_asset_fields'
attributes = @{
order = 3
name = 'Nameservers'
kind = 'Textbox'
hint = 'Cloudflare provided nameservers for this zone'
required = $true
show_in_list = $false
}
},
@{
type = 'flexible_asset_fields'
attributes = @{
order = 4
name = 'Status'
kind = 'Text'
hint = 'Status of the Cloudflare Zone'
required = $false
show_in_list = $true
}
},
@{
type = 'flexible_asset_fields'
attributes = @{
order = 5
name = 'Zone File'
kind = 'Upload'
hint = 'Exported zone file in BIND format. You can upload this to Cloudflare.'
required = $false
show_in_list = $false
}
},
@{
type = 'flexible_asset_fields'
attributes = @{
order = 6
name = 'DNS Records'
kind = 'Textbox'
hint = 'Table of DNS records in the zone'
required = $true
show_in_list = $false
}
}
)
}
}
}
}
$Body = $Body | ConvertTo-Json -Depth 6
New-ITGlueWebRequest -Endpoint 'flexible_asset_types' -Method 'POST' -Body $Body
}