title: "Secgroup" title_tag: "huaweicloud.Vpc.Secgroup" meta_desc: "Documentation for the huaweicloud.Vpc.Secgroup resource with examples, input properties, output properties, lookup functions, and supporting types." layout: api no_edit_this_page: true
Import
Security Groups can be imported using the id
, e.g.
$ pulumi import huaweicloud:Vpc/secgroup:Secgroup secgroup_1 38809219-5e8a-4852-9139-6f461c90e8bc
Create Secgroup Resource {#create}
new Secgroup(name: string, args?: SecgroupArgs, opts?: CustomResourceOptions);
@overload
def Secgroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
delete_default_rules: Optional[bool] = None,
description: Optional[str] = None,
enterprise_project_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None)
@overload
def Secgroup(resource_name: str,
args: Optional[SecgroupArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewSecgroup(ctx *Context, name string, args *SecgroupArgs, opts ...ResourceOption) (*Secgroup, error)
public Secgroup(string name, SecgroupArgs? args = null, CustomResourceOptions? opts = null)
public Secgroup(String name, SecgroupArgs args)
public Secgroup(String name, SecgroupArgs args, CustomResourceOptions options)
type: huaweicloud:Vpc:Secgroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecgroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SecgroupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SecgroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecgroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecgroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Secgroup Resource Properties {#properties}
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Secgroup resource accepts the following input properties:
-
Delete
Default boolRules Specifies whether or not to delete the default security rules. This is
false
by default.- Description string
Specifies the description for the security group.
-
Enterprise
Project stringId Specifies the enterprise project id of the security group. Changing this creates a new security group.
- Name string
Specifies a unique name for the security group.
- Region string
The region in which to create the security group resource. If omitted, the provider-level region will be used. Changing this creates a new security group resource.
-
Delete
Default boolRules Specifies whether or not to delete the default security rules. This is
false
by default.- Description string
Specifies the description for the security group.
-
Enterprise
Project stringId Specifies the enterprise project id of the security group. Changing this creates a new security group.
- Name string
Specifies a unique name for the security group.
- Region string
The region in which to create the security group resource. If omitted, the provider-level region will be used. Changing this creates a new security group resource.
-
delete
Default BooleanRules Specifies whether or not to delete the default security rules. This is
false
by default.- description String
Specifies the description for the security group.
-
enterprise
Project StringId Specifies the enterprise project id of the security group. Changing this creates a new security group.
- name String
Specifies a unique name for the security group.
- region String
The region in which to create the security group resource. If omitted, the provider-level region will be used. Changing this creates a new security group resource.
-
delete
Default booleanRules Specifies whether or not to delete the default security rules. This is
false
by default.- description string
Specifies the description for the security group.
-
enterprise
Project stringId Specifies the enterprise project id of the security group. Changing this creates a new security group.
- name string
Specifies a unique name for the security group.
- region string
The region in which to create the security group resource. If omitted, the provider-level region will be used. Changing this creates a new security group resource.
-
delete_
default_ boolrules Specifies whether or not to delete the default security rules. This is
false
by default.- description str
Specifies the description for the security group.
-
enterprise_
project_ strid Specifies the enterprise project id of the security group. Changing this creates a new security group.
- name str
Specifies a unique name for the security group.
- region str
The region in which to create the security group resource. If omitted, the provider-level region will be used. Changing this creates a new security group resource.
-
delete
Default BooleanRules Specifies whether or not to delete the default security rules. This is
false
by default.- description String
Specifies the description for the security group.
-
enterprise
Project StringId Specifies the enterprise project id of the security group. Changing this creates a new security group.
- name String
Specifies a unique name for the security group.
- region String
The region in which to create the security group resource. If omitted, the provider-level region will be used. Changing this creates a new security group resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Secgroup resource produces the following output properties:
-
Created
At string The creation time, in UTC format.
- Id string
The provider-assigned unique ID for this managed resource.
-
Rules
List<Secgroup
Rule> The array of security group rules associating with the security group. The rule object is documented below.
-
Updated
At string The last update time, in UTC format.
-
Created
At string The creation time, in UTC format.
- Id string
The provider-assigned unique ID for this managed resource.
-
Rules
[]Secgroup
Rule Type The array of security group rules associating with the security group. The rule object is documented below.
-
Updated
At string The last update time, in UTC format.
-
created
At String The creation time, in UTC format.
- id String
The provider-assigned unique ID for this managed resource.
-
rules
List<Secgroup
Rule> The array of security group rules associating with the security group. The rule object is documented below.
-
updated
At String The last update time, in UTC format.
-
created
At string The creation time, in UTC format.
- id string
The provider-assigned unique ID for this managed resource.
-
rules
Secgroup
Rule[] The array of security group rules associating with the security group. The rule object is documented below.
-
updated
At string The last update time, in UTC format.
-
created_
at str The creation time, in UTC format.
- id str
The provider-assigned unique ID for this managed resource.
-
rules
Secgroup
Rule] The array of security group rules associating with the security group. The rule object is documented below.
-
updated_
at str The last update time, in UTC format.
-
created
At String The creation time, in UTC format.
- id String
The provider-assigned unique ID for this managed resource.
- rules List<Property Map>
The array of security group rules associating with the security group. The rule object is documented below.
-
updated
At String The last update time, in UTC format.
Look up Existing Secgroup Resource {#look-up}
Get an existing Secgroup resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SecgroupState, opts?: CustomResourceOptions): Secgroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
delete_default_rules: Optional[bool] = None,
description: Optional[str] = None,
enterprise_project_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
rules: Optional[Sequence[_vpc.SecgroupRuleArgs]] = None,
updated_at: Optional[str] = None) -> Secgroup
func GetSecgroup(ctx *Context, name string, id IDInput, state *SecgroupState, opts ...ResourceOption) (*Secgroup, error)
public static Secgroup Get(string name, Input<string> id, SecgroupState? state, CustomResourceOptions? opts = null)
public static Secgroup get(String name, Output<String> id, SecgroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
-
Created
At string The creation time, in UTC format.
-
Delete
Default boolRules Specifies whether or not to delete the default security rules. This is
false
by default.- Description string
Specifies the description for the security group.
-
Enterprise
Project stringId Specifies the enterprise project id of the security group. Changing this creates a new security group.
- Name string
Specifies a unique name for the security group.
- Region string
The region in which to create the security group resource. If omitted, the provider-level region will be used. Changing this creates a new security group resource.
-
Rules
List<Secgroup
Rule Args> The array of security group rules associating with the security group. The rule object is documented below.
-
Updated
At string The last update time, in UTC format.
-
Created
At string The creation time, in UTC format.
-
Delete
Default boolRules Specifies whether or not to delete the default security rules. This is
false
by default.- Description string
Specifies the description for the security group.
-
Enterprise
Project stringId Specifies the enterprise project id of the security group. Changing this creates a new security group.
- Name string
Specifies a unique name for the security group.
- Region string
The region in which to create the security group resource. If omitted, the provider-level region will be used. Changing this creates a new security group resource.
-
Rules
[]Secgroup
Rule Type Args The array of security group rules associating with the security group. The rule object is documented below.
-
Updated
At string The last update time, in UTC format.
-
created
At String The creation time, in UTC format.
-
delete
Default BooleanRules Specifies whether or not to delete the default security rules. This is
false
by default.- description String
Specifies the description for the security group.
-
enterprise
Project StringId Specifies the enterprise project id of the security group. Changing this creates a new security group.
- name String
Specifies a unique name for the security group.
- region String
The region in which to create the security group resource. If omitted, the provider-level region will be used. Changing this creates a new security group resource.
-
rules
List<Secgroup
Rule Args> The array of security group rules associating with the security group. The rule object is documented below.
-
updated
At String The last update time, in UTC format.
-
created
At string The creation time, in UTC format.
-
delete
Default booleanRules Specifies whether or not to delete the default security rules. This is
false
by default.- description string
Specifies the description for the security group.
-
enterprise
Project stringId Specifies the enterprise project id of the security group. Changing this creates a new security group.
- name string
Specifies a unique name for the security group.
- region string
The region in which to create the security group resource. If omitted, the provider-level region will be used. Changing this creates a new security group resource.
-
rules
Secgroup
Rule Args[] The array of security group rules associating with the security group. The rule object is documented below.
-
updated
At string The last update time, in UTC format.
-
created_
at str The creation time, in UTC format.
-
delete_
default_ boolrules Specifies whether or not to delete the default security rules. This is
false
by default.- description str
Specifies the description for the security group.
-
enterprise_
project_ strid Specifies the enterprise project id of the security group. Changing this creates a new security group.
- name str
Specifies a unique name for the security group.
- region str
The region in which to create the security group resource. If omitted, the provider-level region will be used. Changing this creates a new security group resource.
-
rules
Secgroup
Rule Args] The array of security group rules associating with the security group. The rule object is documented below.
-
updated_
at str The last update time, in UTC format.
-
created
At String The creation time, in UTC format.
-
delete
Default BooleanRules Specifies whether or not to delete the default security rules. This is
false
by default.- description String
Specifies the description for the security group.
-
enterprise
Project StringId Specifies the enterprise project id of the security group. Changing this creates a new security group.
- name String
Specifies a unique name for the security group.
- region String
The region in which to create the security group resource. If omitted, the provider-level region will be used. Changing this creates a new security group resource.
- rules List<Property Map>
The array of security group rules associating with the security group. The rule object is documented below.
-
updated
At String The last update time, in UTC format.
Supporting Types
SecgroupRule
- Action string
The effective policy.
- Description string
Specifies the description for the security group.
- Direction string
The direction of the rule. The value can be egress or ingress.
- Ethertype string
The IP protocol version. The value can be IPv4 or IPv6.
- Id string
The security group rule ID.
-
Port
Range intMax -
Port
Range intMin - Ports string
The port value range.
- Priority int
The priority number.
- Protocol string
The protocol type.
-
Remote
Address stringGroup Id The ID of the remote address group.
-
Remote
Group stringId The ID of the peer security group.
-
Remote
Ip stringPrefix The remote IP address. The value can be in the CIDR format or IP addresses.
- Action string
The effective policy.
- Description string
Specifies the description for the security group.
- Direction string
The direction of the rule. The value can be egress or ingress.
- Ethertype string
The IP protocol version. The value can be IPv4 or IPv6.
- Id string
The security group rule ID.
-
Port
Range intMax -
Port
Range intMin - Ports string
The port value range.
- Priority int
The priority number.
- Protocol string
The protocol type.
-
Remote
Address stringGroup Id The ID of the remote address group.
-
Remote
Group stringId The ID of the peer security group.
-
Remote
Ip stringPrefix The remote IP address. The value can be in the CIDR format or IP addresses.
- action String
The effective policy.
- description String
Specifies the description for the security group.
- direction String
The direction of the rule. The value can be egress or ingress.
- ethertype String
The IP protocol version. The value can be IPv4 or IPv6.
- id String
The security group rule ID.
-
port
Range IntegerMax -
port
Range IntegerMin - ports String
The port value range.
- priority Integer
The priority number.
- protocol String
The protocol type.
-
remote
Address StringGroup Id The ID of the remote address group.
-
remote
Group StringId The ID of the peer security group.
-
remote
Ip StringPrefix The remote IP address. The value can be in the CIDR format or IP addresses.
- action string
The effective policy.
- description string
Specifies the description for the security group.
- direction string
The direction of the rule. The value can be egress or ingress.
- ethertype string
The IP protocol version. The value can be IPv4 or IPv6.
- id string
The security group rule ID.
-
port
Range numberMax -
port
Range numberMin - ports string
The port value range.
- priority number
The priority number.
- protocol string
The protocol type.
-
remote
Address stringGroup Id The ID of the remote address group.
-
remote
Group stringId The ID of the peer security group.
-
remote
Ip stringPrefix The remote IP address. The value can be in the CIDR format or IP addresses.
- action str
The effective policy.
- description str
Specifies the description for the security group.
- direction str
The direction of the rule. The value can be egress or ingress.
- ethertype str
The IP protocol version. The value can be IPv4 or IPv6.
- id str
The security group rule ID.
-
port_
range_ intmax -
port_
range_ intmin - ports str
The port value range.
- priority int
The priority number.
- protocol str
The protocol type.
-
remote_
address_ strgroup_ id The ID of the remote address group.
-
remote_
group_ strid The ID of the peer security group.
-
remote_
ip_ strprefix The remote IP address. The value can be in the CIDR format or IP addresses.
- action String
The effective policy.
- description String
Specifies the description for the security group.
- direction String
The direction of the rule. The value can be egress or ingress.
- ethertype String
The IP protocol version. The value can be IPv4 or IPv6.
- id String
The security group rule ID.
-
port
Range NumberMax -
port
Range NumberMin - ports String
The port value range.
- priority Number
The priority number.
- protocol String
The protocol type.
-
remote
Address StringGroup Id The ID of the remote address group.
-
remote
Group StringId The ID of the peer security group.
-
remote
Ip StringPrefix The remote IP address. The value can be in the CIDR format or IP addresses.
Package Details
- Repository
- https://github.com/huaweicloud/pulumi-huaweicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
huaweicloud
Terraform Provider.