-
Notifications
You must be signed in to change notification settings - Fork 51
/
storeFirewallRule.go
134 lines (120 loc) · 5.22 KB
/
storeFirewallRule.go
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package datalake
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Manages a Azure Data Lake Store Firewall Rule.
//
// > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/data_lake_store_firewall_rule.html.markdown.
type StoreFirewallRule struct {
s *pulumi.ResourceState
}
// NewStoreFirewallRule registers a new resource with the given unique name, arguments, and options.
func NewStoreFirewallRule(ctx *pulumi.Context,
name string, args *StoreFirewallRuleArgs, opts ...pulumi.ResourceOpt) (*StoreFirewallRule, error) {
if args == nil || args.AccountName == nil {
return nil, errors.New("missing required argument 'AccountName'")
}
if args == nil || args.EndIpAddress == nil {
return nil, errors.New("missing required argument 'EndIpAddress'")
}
if args == nil || args.ResourceGroupName == nil {
return nil, errors.New("missing required argument 'ResourceGroupName'")
}
if args == nil || args.StartIpAddress == nil {
return nil, errors.New("missing required argument 'StartIpAddress'")
}
inputs := make(map[string]interface{})
if args == nil {
inputs["accountName"] = nil
inputs["endIpAddress"] = nil
inputs["name"] = nil
inputs["resourceGroupName"] = nil
inputs["startIpAddress"] = nil
} else {
inputs["accountName"] = args.AccountName
inputs["endIpAddress"] = args.EndIpAddress
inputs["name"] = args.Name
inputs["resourceGroupName"] = args.ResourceGroupName
inputs["startIpAddress"] = args.StartIpAddress
}
s, err := ctx.RegisterResource("azure:datalake/storeFirewallRule:StoreFirewallRule", name, true, inputs, opts...)
if err != nil {
return nil, err
}
return &StoreFirewallRule{s: s}, nil
}
// GetStoreFirewallRule gets an existing StoreFirewallRule 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 GetStoreFirewallRule(ctx *pulumi.Context,
name string, id pulumi.ID, state *StoreFirewallRuleState, opts ...pulumi.ResourceOpt) (*StoreFirewallRule, error) {
inputs := make(map[string]interface{})
if state != nil {
inputs["accountName"] = state.AccountName
inputs["endIpAddress"] = state.EndIpAddress
inputs["name"] = state.Name
inputs["resourceGroupName"] = state.ResourceGroupName
inputs["startIpAddress"] = state.StartIpAddress
}
s, err := ctx.ReadResource("azure:datalake/storeFirewallRule:StoreFirewallRule", name, id, inputs, opts...)
if err != nil {
return nil, err
}
return &StoreFirewallRule{s: s}, nil
}
// URN is this resource's unique name assigned by Pulumi.
func (r *StoreFirewallRule) URN() pulumi.URNOutput {
return r.s.URN()
}
// ID is this resource's unique identifier assigned by its provider.
func (r *StoreFirewallRule) ID() pulumi.IDOutput {
return r.s.ID()
}
// Specifies the name of the Data Lake Store for which the Firewall Rule should take effect.
func (r *StoreFirewallRule) AccountName() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["accountName"])
}
// The End IP Address for the firewall rule.
func (r *StoreFirewallRule) EndIpAddress() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["endIpAddress"])
}
// Specifies the name of the Data Lake Store. Changing this forces a new resource to be created. Has to be between 3 to 24 characters.
func (r *StoreFirewallRule) Name() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["name"])
}
// The name of the resource group in which to create the Data Lake Store.
func (r *StoreFirewallRule) ResourceGroupName() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["resourceGroupName"])
}
// The Start IP address for the firewall rule.
func (r *StoreFirewallRule) StartIpAddress() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["startIpAddress"])
}
// Input properties used for looking up and filtering StoreFirewallRule resources.
type StoreFirewallRuleState struct {
// Specifies the name of the Data Lake Store for which the Firewall Rule should take effect.
AccountName interface{}
// The End IP Address for the firewall rule.
EndIpAddress interface{}
// Specifies the name of the Data Lake Store. Changing this forces a new resource to be created. Has to be between 3 to 24 characters.
Name interface{}
// The name of the resource group in which to create the Data Lake Store.
ResourceGroupName interface{}
// The Start IP address for the firewall rule.
StartIpAddress interface{}
}
// The set of arguments for constructing a StoreFirewallRule resource.
type StoreFirewallRuleArgs struct {
// Specifies the name of the Data Lake Store for which the Firewall Rule should take effect.
AccountName interface{}
// The End IP Address for the firewall rule.
EndIpAddress interface{}
// Specifies the name of the Data Lake Store. Changing this forces a new resource to be created. Has to be between 3 to 24 characters.
Name interface{}
// The name of the resource group in which to create the Data Lake Store.
ResourceGroupName interface{}
// The Start IP address for the firewall rule.
StartIpAddress interface{}
}