Documentation
¶
Index ¶
- func PkgVersion() (semver.Version, error)
- type GetGroupsArgs
- type GetGroupsOutputArgs
- type GetGroupsResult
- type GetGroupsResultOutput
- func (GetGroupsResultOutput) ElementType() reflect.Type
- func (o GetGroupsResultOutput) Id() pulumi.StringOutput
- func (o GetGroupsResultOutput) Name() pulumi.StringPtrOutput
- func (o GetGroupsResultOutput) ProjectId() pulumi.IntPtrOutput
- func (o GetGroupsResultOutput) ResultOutputFile() pulumi.StringPtrOutput
- func (o GetGroupsResultOutput) SecurityGroupId() pulumi.StringPtrOutput
- func (o GetGroupsResultOutput) SecurityGroups() GetGroupsSecurityGroupArrayOutput
- func (o GetGroupsResultOutput) Tags() pulumi.MapOutput
- func (o GetGroupsResultOutput) ToGetGroupsResultOutput() GetGroupsResultOutput
- func (o GetGroupsResultOutput) ToGetGroupsResultOutputWithContext(ctx context.Context) GetGroupsResultOutput
- type GetGroupsSecurityGroup
- type GetGroupsSecurityGroupArgs
- type GetGroupsSecurityGroupArray
- func (GetGroupsSecurityGroupArray) ElementType() reflect.Type
- func (i GetGroupsSecurityGroupArray) ToGetGroupsSecurityGroupArrayOutput() GetGroupsSecurityGroupArrayOutput
- func (i GetGroupsSecurityGroupArray) ToGetGroupsSecurityGroupArrayOutputWithContext(ctx context.Context) GetGroupsSecurityGroupArrayOutput
- type GetGroupsSecurityGroupArrayInput
- type GetGroupsSecurityGroupArrayOutput
- func (GetGroupsSecurityGroupArrayOutput) ElementType() reflect.Type
- func (o GetGroupsSecurityGroupArrayOutput) Index(i pulumi.IntInput) GetGroupsSecurityGroupOutput
- func (o GetGroupsSecurityGroupArrayOutput) ToGetGroupsSecurityGroupArrayOutput() GetGroupsSecurityGroupArrayOutput
- func (o GetGroupsSecurityGroupArrayOutput) ToGetGroupsSecurityGroupArrayOutputWithContext(ctx context.Context) GetGroupsSecurityGroupArrayOutput
- type GetGroupsSecurityGroupInput
- type GetGroupsSecurityGroupOutput
- func (o GetGroupsSecurityGroupOutput) BeAssociateCount() pulumi.IntOutput
- func (o GetGroupsSecurityGroupOutput) CreateTime() pulumi.StringOutput
- func (o GetGroupsSecurityGroupOutput) Description() pulumi.StringOutput
- func (o GetGroupsSecurityGroupOutput) Egresses() pulumi.StringArrayOutput
- func (GetGroupsSecurityGroupOutput) ElementType() reflect.Type
- func (o GetGroupsSecurityGroupOutput) Ingresses() pulumi.StringArrayOutput
- func (o GetGroupsSecurityGroupOutput) Name() pulumi.StringOutput
- func (o GetGroupsSecurityGroupOutput) ProjectId() pulumi.IntOutput
- func (o GetGroupsSecurityGroupOutput) SecurityGroupId() pulumi.StringOutput
- func (o GetGroupsSecurityGroupOutput) Tags() pulumi.MapOutput
- func (o GetGroupsSecurityGroupOutput) ToGetGroupsSecurityGroupOutput() GetGroupsSecurityGroupOutput
- func (o GetGroupsSecurityGroupOutput) ToGetGroupsSecurityGroupOutputWithContext(ctx context.Context) GetGroupsSecurityGroupOutput
- type Group
- type GroupArgs
- type GroupArray
- type GroupArrayInput
- type GroupArrayOutput
- type GroupInput
- type GroupLiteRule
- type GroupLiteRuleArgs
- type GroupLiteRuleArray
- type GroupLiteRuleArrayInput
- type GroupLiteRuleArrayOutput
- func (GroupLiteRuleArrayOutput) ElementType() reflect.Type
- func (o GroupLiteRuleArrayOutput) Index(i pulumi.IntInput) GroupLiteRuleOutput
- func (o GroupLiteRuleArrayOutput) ToGroupLiteRuleArrayOutput() GroupLiteRuleArrayOutput
- func (o GroupLiteRuleArrayOutput) ToGroupLiteRuleArrayOutputWithContext(ctx context.Context) GroupLiteRuleArrayOutput
- type GroupLiteRuleInput
- type GroupLiteRuleMap
- type GroupLiteRuleMapInput
- type GroupLiteRuleMapOutput
- func (GroupLiteRuleMapOutput) ElementType() reflect.Type
- func (o GroupLiteRuleMapOutput) MapIndex(k pulumi.StringInput) GroupLiteRuleOutput
- func (o GroupLiteRuleMapOutput) ToGroupLiteRuleMapOutput() GroupLiteRuleMapOutput
- func (o GroupLiteRuleMapOutput) ToGroupLiteRuleMapOutputWithContext(ctx context.Context) GroupLiteRuleMapOutput
- type GroupLiteRuleOutput
- func (o GroupLiteRuleOutput) Egresses() pulumi.StringArrayOutput
- func (GroupLiteRuleOutput) ElementType() reflect.Type
- func (o GroupLiteRuleOutput) Ingresses() pulumi.StringArrayOutput
- func (o GroupLiteRuleOutput) SecurityGroupId() pulumi.StringOutput
- func (o GroupLiteRuleOutput) ToGroupLiteRuleOutput() GroupLiteRuleOutput
- func (o GroupLiteRuleOutput) ToGroupLiteRuleOutputWithContext(ctx context.Context) GroupLiteRuleOutput
- type GroupLiteRuleState
- type GroupMap
- type GroupMapInput
- type GroupMapOutput
- type GroupOutput
- func (o GroupOutput) Description() pulumi.StringPtrOutput
- func (GroupOutput) ElementType() reflect.Type
- func (o GroupOutput) Name() pulumi.StringOutput
- func (o GroupOutput) ProjectId() pulumi.IntOutput
- func (o GroupOutput) Tags() pulumi.MapOutput
- func (o GroupOutput) ToGroupOutput() GroupOutput
- func (o GroupOutput) ToGroupOutputWithContext(ctx context.Context) GroupOutput
- type GroupRule
- type GroupRuleAddressTemplate
- type GroupRuleAddressTemplateArgs
- func (GroupRuleAddressTemplateArgs) ElementType() reflect.Type
- func (i GroupRuleAddressTemplateArgs) ToGroupRuleAddressTemplateOutput() GroupRuleAddressTemplateOutput
- func (i GroupRuleAddressTemplateArgs) ToGroupRuleAddressTemplateOutputWithContext(ctx context.Context) GroupRuleAddressTemplateOutput
- func (i GroupRuleAddressTemplateArgs) ToGroupRuleAddressTemplatePtrOutput() GroupRuleAddressTemplatePtrOutput
- func (i GroupRuleAddressTemplateArgs) ToGroupRuleAddressTemplatePtrOutputWithContext(ctx context.Context) GroupRuleAddressTemplatePtrOutput
- type GroupRuleAddressTemplateInput
- type GroupRuleAddressTemplateOutput
- func (GroupRuleAddressTemplateOutput) ElementType() reflect.Type
- func (o GroupRuleAddressTemplateOutput) GroupId() pulumi.StringPtrOutput
- func (o GroupRuleAddressTemplateOutput) TemplateId() pulumi.StringPtrOutput
- func (o GroupRuleAddressTemplateOutput) ToGroupRuleAddressTemplateOutput() GroupRuleAddressTemplateOutput
- func (o GroupRuleAddressTemplateOutput) ToGroupRuleAddressTemplateOutputWithContext(ctx context.Context) GroupRuleAddressTemplateOutput
- func (o GroupRuleAddressTemplateOutput) ToGroupRuleAddressTemplatePtrOutput() GroupRuleAddressTemplatePtrOutput
- func (o GroupRuleAddressTemplateOutput) ToGroupRuleAddressTemplatePtrOutputWithContext(ctx context.Context) GroupRuleAddressTemplatePtrOutput
- type GroupRuleAddressTemplatePtrInput
- type GroupRuleAddressTemplatePtrOutput
- func (o GroupRuleAddressTemplatePtrOutput) Elem() GroupRuleAddressTemplateOutput
- func (GroupRuleAddressTemplatePtrOutput) ElementType() reflect.Type
- func (o GroupRuleAddressTemplatePtrOutput) GroupId() pulumi.StringPtrOutput
- func (o GroupRuleAddressTemplatePtrOutput) TemplateId() pulumi.StringPtrOutput
- func (o GroupRuleAddressTemplatePtrOutput) ToGroupRuleAddressTemplatePtrOutput() GroupRuleAddressTemplatePtrOutput
- func (o GroupRuleAddressTemplatePtrOutput) ToGroupRuleAddressTemplatePtrOutputWithContext(ctx context.Context) GroupRuleAddressTemplatePtrOutput
- type GroupRuleArgs
- type GroupRuleArray
- type GroupRuleArrayInput
- type GroupRuleArrayOutput
- func (GroupRuleArrayOutput) ElementType() reflect.Type
- func (o GroupRuleArrayOutput) Index(i pulumi.IntInput) GroupRuleOutput
- func (o GroupRuleArrayOutput) ToGroupRuleArrayOutput() GroupRuleArrayOutput
- func (o GroupRuleArrayOutput) ToGroupRuleArrayOutputWithContext(ctx context.Context) GroupRuleArrayOutput
- type GroupRuleInput
- type GroupRuleMap
- type GroupRuleMapInput
- type GroupRuleMapOutput
- type GroupRuleOutput
- func (o GroupRuleOutput) AddressTemplate() GroupRuleAddressTemplateOutput
- func (o GroupRuleOutput) CidrIp() pulumi.StringPtrOutput
- func (o GroupRuleOutput) Description() pulumi.StringOutput
- func (GroupRuleOutput) ElementType() reflect.Type
- func (o GroupRuleOutput) IpProtocol() pulumi.StringOutput
- func (o GroupRuleOutput) Policy() pulumi.StringOutput
- func (o GroupRuleOutput) PortRange() pulumi.StringOutput
- func (o GroupRuleOutput) ProtocolTemplate() GroupRuleProtocolTemplateOutput
- func (o GroupRuleOutput) SecurityGroupId() pulumi.StringOutput
- func (o GroupRuleOutput) SourceSgid() pulumi.StringOutput
- func (o GroupRuleOutput) ToGroupRuleOutput() GroupRuleOutput
- func (o GroupRuleOutput) ToGroupRuleOutputWithContext(ctx context.Context) GroupRuleOutput
- func (o GroupRuleOutput) Type() pulumi.StringOutput
- type GroupRuleProtocolTemplate
- type GroupRuleProtocolTemplateArgs
- func (GroupRuleProtocolTemplateArgs) ElementType() reflect.Type
- func (i GroupRuleProtocolTemplateArgs) ToGroupRuleProtocolTemplateOutput() GroupRuleProtocolTemplateOutput
- func (i GroupRuleProtocolTemplateArgs) ToGroupRuleProtocolTemplateOutputWithContext(ctx context.Context) GroupRuleProtocolTemplateOutput
- func (i GroupRuleProtocolTemplateArgs) ToGroupRuleProtocolTemplatePtrOutput() GroupRuleProtocolTemplatePtrOutput
- func (i GroupRuleProtocolTemplateArgs) ToGroupRuleProtocolTemplatePtrOutputWithContext(ctx context.Context) GroupRuleProtocolTemplatePtrOutput
- type GroupRuleProtocolTemplateInput
- type GroupRuleProtocolTemplateOutput
- func (GroupRuleProtocolTemplateOutput) ElementType() reflect.Type
- func (o GroupRuleProtocolTemplateOutput) GroupId() pulumi.StringPtrOutput
- func (o GroupRuleProtocolTemplateOutput) TemplateId() pulumi.StringPtrOutput
- func (o GroupRuleProtocolTemplateOutput) ToGroupRuleProtocolTemplateOutput() GroupRuleProtocolTemplateOutput
- func (o GroupRuleProtocolTemplateOutput) ToGroupRuleProtocolTemplateOutputWithContext(ctx context.Context) GroupRuleProtocolTemplateOutput
- func (o GroupRuleProtocolTemplateOutput) ToGroupRuleProtocolTemplatePtrOutput() GroupRuleProtocolTemplatePtrOutput
- func (o GroupRuleProtocolTemplateOutput) ToGroupRuleProtocolTemplatePtrOutputWithContext(ctx context.Context) GroupRuleProtocolTemplatePtrOutput
- type GroupRuleProtocolTemplatePtrInput
- type GroupRuleProtocolTemplatePtrOutput
- func (o GroupRuleProtocolTemplatePtrOutput) Elem() GroupRuleProtocolTemplateOutput
- func (GroupRuleProtocolTemplatePtrOutput) ElementType() reflect.Type
- func (o GroupRuleProtocolTemplatePtrOutput) GroupId() pulumi.StringPtrOutput
- func (o GroupRuleProtocolTemplatePtrOutput) TemplateId() pulumi.StringPtrOutput
- func (o GroupRuleProtocolTemplatePtrOutput) ToGroupRuleProtocolTemplatePtrOutput() GroupRuleProtocolTemplatePtrOutput
- func (o GroupRuleProtocolTemplatePtrOutput) ToGroupRuleProtocolTemplatePtrOutputWithContext(ctx context.Context) GroupRuleProtocolTemplatePtrOutput
- type GroupRuleState
- type GroupState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PkgVersion ¶ added in v0.0.5
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 GetGroupsArgs ¶
type GetGroupsArgs struct { // Name of the security group to be queried. Conflict with `securityGroupId`. Name *string `pulumi:"name"` // Project ID of the security group to be queried. Conflict with `securityGroupId`. ProjectId *int `pulumi:"projectId"` // Used to save results. ResultOutputFile *string `pulumi:"resultOutputFile"` // ID of the security group to be queried. Conflict with `name` and `projectId`. SecurityGroupId *string `pulumi:"securityGroupId"` // Tags of the security group to be queried. Conflict with `securityGroupId`. Tags map[string]interface{} `pulumi:"tags"` }
A collection of arguments for invoking getGroups.
type GetGroupsOutputArgs ¶
type GetGroupsOutputArgs struct { // Name of the security group to be queried. Conflict with `securityGroupId`. Name pulumi.StringPtrInput `pulumi:"name"` // Project ID of the security group to be queried. Conflict with `securityGroupId`. ProjectId pulumi.IntPtrInput `pulumi:"projectId"` // Used to save results. ResultOutputFile pulumi.StringPtrInput `pulumi:"resultOutputFile"` // ID of the security group to be queried. Conflict with `name` and `projectId`. SecurityGroupId pulumi.StringPtrInput `pulumi:"securityGroupId"` // Tags of the security group to be queried. Conflict with `securityGroupId`. Tags pulumi.MapInput `pulumi:"tags"` }
A collection of arguments for invoking getGroups.
func (GetGroupsOutputArgs) ElementType ¶
func (GetGroupsOutputArgs) ElementType() reflect.Type
type GetGroupsResult ¶
type GetGroupsResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Name of the security group. Name *string `pulumi:"name"` // Project ID of the security group. ProjectId *int `pulumi:"projectId"` ResultOutputFile *string `pulumi:"resultOutputFile"` // ID of the security group. SecurityGroupId *string `pulumi:"securityGroupId"` // Information list of security group. SecurityGroups []GetGroupsSecurityGroup `pulumi:"securityGroups"` // Tags of the security group. Tags map[string]interface{} `pulumi:"tags"` }
A collection of values returned by getGroups.
func GetGroups ¶
func GetGroups(ctx *pulumi.Context, args *GetGroupsArgs, opts ...pulumi.InvokeOption) (*GetGroupsResult, error)
Use this data source to query detailed information of security groups.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-tencentcloud/sdk/go/tencentcloud/Security" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Security"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := Security.GetGroups(ctx, &security.GetGroupsArgs{ SecurityGroupId: pulumi.StringRef(tencentcloud_security_group.Sglab.Id), }, nil) if err != nil { return err } return nil }) }
```
type GetGroupsResultOutput ¶
type GetGroupsResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getGroups.
func GetGroupsOutput ¶
func GetGroupsOutput(ctx *pulumi.Context, args GetGroupsOutputArgs, opts ...pulumi.InvokeOption) GetGroupsResultOutput
func (GetGroupsResultOutput) ElementType ¶
func (GetGroupsResultOutput) ElementType() reflect.Type
func (GetGroupsResultOutput) Id ¶
func (o GetGroupsResultOutput) Id() pulumi.StringOutput
The provider-assigned unique ID for this managed resource.
func (GetGroupsResultOutput) Name ¶
func (o GetGroupsResultOutput) Name() pulumi.StringPtrOutput
Name of the security group.
func (GetGroupsResultOutput) ProjectId ¶
func (o GetGroupsResultOutput) ProjectId() pulumi.IntPtrOutput
Project ID of the security group.
func (GetGroupsResultOutput) ResultOutputFile ¶
func (o GetGroupsResultOutput) ResultOutputFile() pulumi.StringPtrOutput
func (GetGroupsResultOutput) SecurityGroupId ¶
func (o GetGroupsResultOutput) SecurityGroupId() pulumi.StringPtrOutput
ID of the security group.
func (GetGroupsResultOutput) SecurityGroups ¶
func (o GetGroupsResultOutput) SecurityGroups() GetGroupsSecurityGroupArrayOutput
Information list of security group.
func (GetGroupsResultOutput) Tags ¶
func (o GetGroupsResultOutput) Tags() pulumi.MapOutput
Tags of the security group.
func (GetGroupsResultOutput) ToGetGroupsResultOutput ¶
func (o GetGroupsResultOutput) ToGetGroupsResultOutput() GetGroupsResultOutput
func (GetGroupsResultOutput) ToGetGroupsResultOutputWithContext ¶
func (o GetGroupsResultOutput) ToGetGroupsResultOutputWithContext(ctx context.Context) GetGroupsResultOutput
type GetGroupsSecurityGroup ¶
type GetGroupsSecurityGroup struct { // Number of security group binding resources. BeAssociateCount int `pulumi:"beAssociateCount"` // Creation time of security group. CreateTime string `pulumi:"createTime"` // Description of the security group. Description string `pulumi:"description"` // Egress rules set. For items like `[action]#[cidrIp]#[port]#[protocol]`, it means a regular rule; for items like `sg-XXXX`, it means a nested security group. Egresses []string `pulumi:"egresses"` // Ingress rules set. For items like `[action]#[cidrIp]#[port]#[protocol]`, it means a regular rule; for items like `sg-XXXX`, it means a nested security group. Ingresses []string `pulumi:"ingresses"` // Name of the security group to be queried. Conflict with `securityGroupId`. Name string `pulumi:"name"` // Project ID of the security group to be queried. Conflict with `securityGroupId`. ProjectId int `pulumi:"projectId"` // ID of the security group to be queried. Conflict with `name` and `projectId`. SecurityGroupId string `pulumi:"securityGroupId"` // Tags of the security group to be queried. Conflict with `securityGroupId`. Tags map[string]interface{} `pulumi:"tags"` }
type GetGroupsSecurityGroupArgs ¶
type GetGroupsSecurityGroupArgs struct { // Number of security group binding resources. BeAssociateCount pulumi.IntInput `pulumi:"beAssociateCount"` // Creation time of security group. CreateTime pulumi.StringInput `pulumi:"createTime"` // Description of the security group. Description pulumi.StringInput `pulumi:"description"` // Egress rules set. For items like `[action]#[cidrIp]#[port]#[protocol]`, it means a regular rule; for items like `sg-XXXX`, it means a nested security group. Egresses pulumi.StringArrayInput `pulumi:"egresses"` // Ingress rules set. For items like `[action]#[cidrIp]#[port]#[protocol]`, it means a regular rule; for items like `sg-XXXX`, it means a nested security group. Ingresses pulumi.StringArrayInput `pulumi:"ingresses"` // Name of the security group to be queried. Conflict with `securityGroupId`. Name pulumi.StringInput `pulumi:"name"` // Project ID of the security group to be queried. Conflict with `securityGroupId`. ProjectId pulumi.IntInput `pulumi:"projectId"` // ID of the security group to be queried. Conflict with `name` and `projectId`. SecurityGroupId pulumi.StringInput `pulumi:"securityGroupId"` // Tags of the security group to be queried. Conflict with `securityGroupId`. Tags pulumi.MapInput `pulumi:"tags"` }
func (GetGroupsSecurityGroupArgs) ElementType ¶
func (GetGroupsSecurityGroupArgs) ElementType() reflect.Type
func (GetGroupsSecurityGroupArgs) ToGetGroupsSecurityGroupOutput ¶
func (i GetGroupsSecurityGroupArgs) ToGetGroupsSecurityGroupOutput() GetGroupsSecurityGroupOutput
func (GetGroupsSecurityGroupArgs) ToGetGroupsSecurityGroupOutputWithContext ¶
func (i GetGroupsSecurityGroupArgs) ToGetGroupsSecurityGroupOutputWithContext(ctx context.Context) GetGroupsSecurityGroupOutput
type GetGroupsSecurityGroupArray ¶
type GetGroupsSecurityGroupArray []GetGroupsSecurityGroupInput
func (GetGroupsSecurityGroupArray) ElementType ¶
func (GetGroupsSecurityGroupArray) ElementType() reflect.Type
func (GetGroupsSecurityGroupArray) ToGetGroupsSecurityGroupArrayOutput ¶
func (i GetGroupsSecurityGroupArray) ToGetGroupsSecurityGroupArrayOutput() GetGroupsSecurityGroupArrayOutput
func (GetGroupsSecurityGroupArray) ToGetGroupsSecurityGroupArrayOutputWithContext ¶
func (i GetGroupsSecurityGroupArray) ToGetGroupsSecurityGroupArrayOutputWithContext(ctx context.Context) GetGroupsSecurityGroupArrayOutput
type GetGroupsSecurityGroupArrayInput ¶
type GetGroupsSecurityGroupArrayInput interface { pulumi.Input ToGetGroupsSecurityGroupArrayOutput() GetGroupsSecurityGroupArrayOutput ToGetGroupsSecurityGroupArrayOutputWithContext(context.Context) GetGroupsSecurityGroupArrayOutput }
GetGroupsSecurityGroupArrayInput is an input type that accepts GetGroupsSecurityGroupArray and GetGroupsSecurityGroupArrayOutput values. You can construct a concrete instance of `GetGroupsSecurityGroupArrayInput` via:
GetGroupsSecurityGroupArray{ GetGroupsSecurityGroupArgs{...} }
type GetGroupsSecurityGroupArrayOutput ¶
type GetGroupsSecurityGroupArrayOutput struct{ *pulumi.OutputState }
func (GetGroupsSecurityGroupArrayOutput) ElementType ¶
func (GetGroupsSecurityGroupArrayOutput) ElementType() reflect.Type
func (GetGroupsSecurityGroupArrayOutput) Index ¶
func (o GetGroupsSecurityGroupArrayOutput) Index(i pulumi.IntInput) GetGroupsSecurityGroupOutput
func (GetGroupsSecurityGroupArrayOutput) ToGetGroupsSecurityGroupArrayOutput ¶
func (o GetGroupsSecurityGroupArrayOutput) ToGetGroupsSecurityGroupArrayOutput() GetGroupsSecurityGroupArrayOutput
func (GetGroupsSecurityGroupArrayOutput) ToGetGroupsSecurityGroupArrayOutputWithContext ¶
func (o GetGroupsSecurityGroupArrayOutput) ToGetGroupsSecurityGroupArrayOutputWithContext(ctx context.Context) GetGroupsSecurityGroupArrayOutput
type GetGroupsSecurityGroupInput ¶
type GetGroupsSecurityGroupInput interface { pulumi.Input ToGetGroupsSecurityGroupOutput() GetGroupsSecurityGroupOutput ToGetGroupsSecurityGroupOutputWithContext(context.Context) GetGroupsSecurityGroupOutput }
GetGroupsSecurityGroupInput is an input type that accepts GetGroupsSecurityGroupArgs and GetGroupsSecurityGroupOutput values. You can construct a concrete instance of `GetGroupsSecurityGroupInput` via:
GetGroupsSecurityGroupArgs{...}
type GetGroupsSecurityGroupOutput ¶
type GetGroupsSecurityGroupOutput struct{ *pulumi.OutputState }
func (GetGroupsSecurityGroupOutput) BeAssociateCount ¶
func (o GetGroupsSecurityGroupOutput) BeAssociateCount() pulumi.IntOutput
Number of security group binding resources.
func (GetGroupsSecurityGroupOutput) CreateTime ¶
func (o GetGroupsSecurityGroupOutput) CreateTime() pulumi.StringOutput
Creation time of security group.
func (GetGroupsSecurityGroupOutput) Description ¶
func (o GetGroupsSecurityGroupOutput) Description() pulumi.StringOutput
Description of the security group.
func (GetGroupsSecurityGroupOutput) Egresses ¶
func (o GetGroupsSecurityGroupOutput) Egresses() pulumi.StringArrayOutput
Egress rules set. For items like `[action]#[cidrIp]#[port]#[protocol]`, it means a regular rule; for items like `sg-XXXX`, it means a nested security group.
func (GetGroupsSecurityGroupOutput) ElementType ¶
func (GetGroupsSecurityGroupOutput) ElementType() reflect.Type
func (GetGroupsSecurityGroupOutput) Ingresses ¶
func (o GetGroupsSecurityGroupOutput) Ingresses() pulumi.StringArrayOutput
Ingress rules set. For items like `[action]#[cidrIp]#[port]#[protocol]`, it means a regular rule; for items like `sg-XXXX`, it means a nested security group.
func (GetGroupsSecurityGroupOutput) Name ¶
func (o GetGroupsSecurityGroupOutput) Name() pulumi.StringOutput
Name of the security group to be queried. Conflict with `securityGroupId`.
func (GetGroupsSecurityGroupOutput) ProjectId ¶
func (o GetGroupsSecurityGroupOutput) ProjectId() pulumi.IntOutput
Project ID of the security group to be queried. Conflict with `securityGroupId`.
func (GetGroupsSecurityGroupOutput) SecurityGroupId ¶
func (o GetGroupsSecurityGroupOutput) SecurityGroupId() pulumi.StringOutput
ID of the security group to be queried. Conflict with `name` and `projectId`.
func (GetGroupsSecurityGroupOutput) Tags ¶
func (o GetGroupsSecurityGroupOutput) Tags() pulumi.MapOutput
Tags of the security group to be queried. Conflict with `securityGroupId`.
func (GetGroupsSecurityGroupOutput) ToGetGroupsSecurityGroupOutput ¶
func (o GetGroupsSecurityGroupOutput) ToGetGroupsSecurityGroupOutput() GetGroupsSecurityGroupOutput
func (GetGroupsSecurityGroupOutput) ToGetGroupsSecurityGroupOutputWithContext ¶
func (o GetGroupsSecurityGroupOutput) ToGetGroupsSecurityGroupOutputWithContext(ctx context.Context) GetGroupsSecurityGroupOutput
type Group ¶
type Group struct { pulumi.CustomResourceState // Description of the security group. Description pulumi.StringPtrOutput `pulumi:"description"` // Name of the security group to be queried. Name pulumi.StringOutput `pulumi:"name"` // Project ID of the security group. ProjectId pulumi.IntOutput `pulumi:"projectId"` // Tags of the security group. Tags pulumi.MapOutput `pulumi:"tags"` }
Provides a resource to create security group.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Security"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := Security.NewGroup(ctx, "sglab", &Security.GroupArgs{ Description: pulumi.String("favourite sg"), ProjectId: pulumi.Int(0), }) if err != nil { return err } return nil }) }
```
## Import
Security group can be imported using the id, e.g.
```sh
$ pulumi import tencentcloud:Security/group:Group tencentcloud_security_group.sglab sg-ey3wmiz1
```
func GetGroup ¶
func GetGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *GroupState, opts ...pulumi.ResourceOption) (*Group, error)
GetGroup gets an existing Group 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 NewGroup ¶
func NewGroup(ctx *pulumi.Context, name string, args *GroupArgs, opts ...pulumi.ResourceOption) (*Group, error)
NewGroup registers a new resource with the given unique name, arguments, and options.
func (*Group) ElementType ¶
func (*Group) ToGroupOutput ¶
func (i *Group) ToGroupOutput() GroupOutput
func (*Group) ToGroupOutputWithContext ¶
func (i *Group) ToGroupOutputWithContext(ctx context.Context) GroupOutput
type GroupArgs ¶
type GroupArgs struct { // Description of the security group. Description pulumi.StringPtrInput // Name of the security group to be queried. Name pulumi.StringPtrInput // Project ID of the security group. ProjectId pulumi.IntPtrInput // Tags of the security group. Tags pulumi.MapInput }
The set of arguments for constructing a Group resource.
func (GroupArgs) ElementType ¶
type GroupArray ¶
type GroupArray []GroupInput
func (GroupArray) ElementType ¶
func (GroupArray) ElementType() reflect.Type
func (GroupArray) ToGroupArrayOutput ¶
func (i GroupArray) ToGroupArrayOutput() GroupArrayOutput
func (GroupArray) ToGroupArrayOutputWithContext ¶
func (i GroupArray) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput
type GroupArrayInput ¶
type GroupArrayInput interface { pulumi.Input ToGroupArrayOutput() GroupArrayOutput ToGroupArrayOutputWithContext(context.Context) GroupArrayOutput }
GroupArrayInput is an input type that accepts GroupArray and GroupArrayOutput values. You can construct a concrete instance of `GroupArrayInput` via:
GroupArray{ GroupArgs{...} }
type GroupArrayOutput ¶
type GroupArrayOutput struct{ *pulumi.OutputState }
func (GroupArrayOutput) ElementType ¶
func (GroupArrayOutput) ElementType() reflect.Type
func (GroupArrayOutput) Index ¶
func (o GroupArrayOutput) Index(i pulumi.IntInput) GroupOutput
func (GroupArrayOutput) ToGroupArrayOutput ¶
func (o GroupArrayOutput) ToGroupArrayOutput() GroupArrayOutput
func (GroupArrayOutput) ToGroupArrayOutputWithContext ¶
func (o GroupArrayOutput) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput
type GroupInput ¶
type GroupInput interface { pulumi.Input ToGroupOutput() GroupOutput ToGroupOutputWithContext(ctx context.Context) GroupOutput }
type GroupLiteRule ¶
type GroupLiteRule struct { pulumi.CustomResourceState // Egress rules set. A rule must match the following format: [action]#[source]#[port]#[protocol]. The available value of 'action' is `ACCEPT` and `DROP`. The 'source' can be an IP address network, segment, security group ID and Address Template ID. The 'port' valid format is `80`, `80,443`, `80-90` or `ALL`. The available value of 'protocol' is `TCP`, `UDP`, `ICMP` and `ALL`. When 'protocol' is `ICMP` or `ALL`, the 'port' must be `ALL`. Egresses pulumi.StringArrayOutput `pulumi:"egresses"` // Ingress rules set. A rule must match the following format: [action]#[source]#[port]#[protocol]. The available value of 'action' is `ACCEPT` and `DROP`. The 'source' can be an IP address network, segment, security group ID and Address Template ID. The 'port' valid format is `80`, `80,443`, `80-90` or `ALL`. The available value of 'protocol' is `TCP`, `UDP`, `ICMP` and `ALL`. When 'protocol' is `ICMP` or `ALL`, the 'port' must be `ALL`. Ingresses pulumi.StringArrayOutput `pulumi:"ingresses"` // ID of the security group. SecurityGroupId pulumi.StringOutput `pulumi:"securityGroupId"` }
Provide a resource to create security group some lite rules quickly.
> **NOTE:** It can't be used with tencentcloud_security_group_rule, and don't create multiple Security.GroupRule resources, otherwise it may cause problems.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Security"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { fooGroup, err := Security.NewGroup(ctx, "fooGroup", nil) if err != nil { return err } _, err = Security.NewGroupLiteRule(ctx, "fooGroupLiteRule", &Security.GroupLiteRuleArgs{ SecurityGroupId: fooGroup.ID(), Ingresses: pulumi.StringArray{ pulumi.String("ACCEPT#192.168.1.0/24#80#TCP"), pulumi.String("DROP#8.8.8.8#80,90#UDP"), pulumi.String("ACCEPT#0.0.0.0/0#80-90#TCP"), pulumi.String("ACCEPT#sg-7ixn3foj#80-90#TCP"), pulumi.String("ACCEPT#ipm-epjq5kn0#80-90#TCP"), pulumi.String("ACCEPT#ipmg-3loavam6#80-90#TCP"), }, Egresses: pulumi.StringArray{ pulumi.String("ACCEPT#192.168.0.0/16#ALL#TCP"), pulumi.String("ACCEPT#10.0.0.0/8#ALL#ICMP"), pulumi.String("DROP#0.0.0.0/0#ALL#ALL"), }, }) if err != nil { return err } return nil }) }
```
## Import
Security group lite rule can be imported using the id, e.g.
```sh
$ pulumi import tencentcloud:Security/groupLiteRule:GroupLiteRule tencentcloud_security_group_lite_rule.foo sg-ey3wmiz1
```
func GetGroupLiteRule ¶
func GetGroupLiteRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *GroupLiteRuleState, opts ...pulumi.ResourceOption) (*GroupLiteRule, error)
GetGroupLiteRule gets an existing GroupLiteRule 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 NewGroupLiteRule ¶
func NewGroupLiteRule(ctx *pulumi.Context, name string, args *GroupLiteRuleArgs, opts ...pulumi.ResourceOption) (*GroupLiteRule, error)
NewGroupLiteRule registers a new resource with the given unique name, arguments, and options.
func (*GroupLiteRule) ElementType ¶
func (*GroupLiteRule) ElementType() reflect.Type
func (*GroupLiteRule) ToGroupLiteRuleOutput ¶
func (i *GroupLiteRule) ToGroupLiteRuleOutput() GroupLiteRuleOutput
func (*GroupLiteRule) ToGroupLiteRuleOutputWithContext ¶
func (i *GroupLiteRule) ToGroupLiteRuleOutputWithContext(ctx context.Context) GroupLiteRuleOutput
type GroupLiteRuleArgs ¶
type GroupLiteRuleArgs struct { // Egress rules set. A rule must match the following format: [action]#[source]#[port]#[protocol]. The available value of 'action' is `ACCEPT` and `DROP`. The 'source' can be an IP address network, segment, security group ID and Address Template ID. The 'port' valid format is `80`, `80,443`, `80-90` or `ALL`. The available value of 'protocol' is `TCP`, `UDP`, `ICMP` and `ALL`. When 'protocol' is `ICMP` or `ALL`, the 'port' must be `ALL`. Egresses pulumi.StringArrayInput // Ingress rules set. A rule must match the following format: [action]#[source]#[port]#[protocol]. The available value of 'action' is `ACCEPT` and `DROP`. The 'source' can be an IP address network, segment, security group ID and Address Template ID. The 'port' valid format is `80`, `80,443`, `80-90` or `ALL`. The available value of 'protocol' is `TCP`, `UDP`, `ICMP` and `ALL`. When 'protocol' is `ICMP` or `ALL`, the 'port' must be `ALL`. Ingresses pulumi.StringArrayInput // ID of the security group. SecurityGroupId pulumi.StringInput }
The set of arguments for constructing a GroupLiteRule resource.
func (GroupLiteRuleArgs) ElementType ¶
func (GroupLiteRuleArgs) ElementType() reflect.Type
type GroupLiteRuleArray ¶
type GroupLiteRuleArray []GroupLiteRuleInput
func (GroupLiteRuleArray) ElementType ¶
func (GroupLiteRuleArray) ElementType() reflect.Type
func (GroupLiteRuleArray) ToGroupLiteRuleArrayOutput ¶
func (i GroupLiteRuleArray) ToGroupLiteRuleArrayOutput() GroupLiteRuleArrayOutput
func (GroupLiteRuleArray) ToGroupLiteRuleArrayOutputWithContext ¶
func (i GroupLiteRuleArray) ToGroupLiteRuleArrayOutputWithContext(ctx context.Context) GroupLiteRuleArrayOutput
type GroupLiteRuleArrayInput ¶
type GroupLiteRuleArrayInput interface { pulumi.Input ToGroupLiteRuleArrayOutput() GroupLiteRuleArrayOutput ToGroupLiteRuleArrayOutputWithContext(context.Context) GroupLiteRuleArrayOutput }
GroupLiteRuleArrayInput is an input type that accepts GroupLiteRuleArray and GroupLiteRuleArrayOutput values. You can construct a concrete instance of `GroupLiteRuleArrayInput` via:
GroupLiteRuleArray{ GroupLiteRuleArgs{...} }
type GroupLiteRuleArrayOutput ¶
type GroupLiteRuleArrayOutput struct{ *pulumi.OutputState }
func (GroupLiteRuleArrayOutput) ElementType ¶
func (GroupLiteRuleArrayOutput) ElementType() reflect.Type
func (GroupLiteRuleArrayOutput) Index ¶
func (o GroupLiteRuleArrayOutput) Index(i pulumi.IntInput) GroupLiteRuleOutput
func (GroupLiteRuleArrayOutput) ToGroupLiteRuleArrayOutput ¶
func (o GroupLiteRuleArrayOutput) ToGroupLiteRuleArrayOutput() GroupLiteRuleArrayOutput
func (GroupLiteRuleArrayOutput) ToGroupLiteRuleArrayOutputWithContext ¶
func (o GroupLiteRuleArrayOutput) ToGroupLiteRuleArrayOutputWithContext(ctx context.Context) GroupLiteRuleArrayOutput
type GroupLiteRuleInput ¶
type GroupLiteRuleInput interface { pulumi.Input ToGroupLiteRuleOutput() GroupLiteRuleOutput ToGroupLiteRuleOutputWithContext(ctx context.Context) GroupLiteRuleOutput }
type GroupLiteRuleMap ¶
type GroupLiteRuleMap map[string]GroupLiteRuleInput
func (GroupLiteRuleMap) ElementType ¶
func (GroupLiteRuleMap) ElementType() reflect.Type
func (GroupLiteRuleMap) ToGroupLiteRuleMapOutput ¶
func (i GroupLiteRuleMap) ToGroupLiteRuleMapOutput() GroupLiteRuleMapOutput
func (GroupLiteRuleMap) ToGroupLiteRuleMapOutputWithContext ¶
func (i GroupLiteRuleMap) ToGroupLiteRuleMapOutputWithContext(ctx context.Context) GroupLiteRuleMapOutput
type GroupLiteRuleMapInput ¶
type GroupLiteRuleMapInput interface { pulumi.Input ToGroupLiteRuleMapOutput() GroupLiteRuleMapOutput ToGroupLiteRuleMapOutputWithContext(context.Context) GroupLiteRuleMapOutput }
GroupLiteRuleMapInput is an input type that accepts GroupLiteRuleMap and GroupLiteRuleMapOutput values. You can construct a concrete instance of `GroupLiteRuleMapInput` via:
GroupLiteRuleMap{ "key": GroupLiteRuleArgs{...} }
type GroupLiteRuleMapOutput ¶
type GroupLiteRuleMapOutput struct{ *pulumi.OutputState }
func (GroupLiteRuleMapOutput) ElementType ¶
func (GroupLiteRuleMapOutput) ElementType() reflect.Type
func (GroupLiteRuleMapOutput) MapIndex ¶
func (o GroupLiteRuleMapOutput) MapIndex(k pulumi.StringInput) GroupLiteRuleOutput
func (GroupLiteRuleMapOutput) ToGroupLiteRuleMapOutput ¶
func (o GroupLiteRuleMapOutput) ToGroupLiteRuleMapOutput() GroupLiteRuleMapOutput
func (GroupLiteRuleMapOutput) ToGroupLiteRuleMapOutputWithContext ¶
func (o GroupLiteRuleMapOutput) ToGroupLiteRuleMapOutputWithContext(ctx context.Context) GroupLiteRuleMapOutput
type GroupLiteRuleOutput ¶
type GroupLiteRuleOutput struct{ *pulumi.OutputState }
func (GroupLiteRuleOutput) Egresses ¶
func (o GroupLiteRuleOutput) Egresses() pulumi.StringArrayOutput
Egress rules set. A rule must match the following format: [action]#[source]#[port]#[protocol]. The available value of 'action' is `ACCEPT` and `DROP`. The 'source' can be an IP address network, segment, security group ID and Address Template ID. The 'port' valid format is `80`, `80,443`, `80-90` or `ALL`. The available value of 'protocol' is `TCP`, `UDP`, `ICMP` and `ALL`. When 'protocol' is `ICMP` or `ALL`, the 'port' must be `ALL`.
func (GroupLiteRuleOutput) ElementType ¶
func (GroupLiteRuleOutput) ElementType() reflect.Type
func (GroupLiteRuleOutput) Ingresses ¶
func (o GroupLiteRuleOutput) Ingresses() pulumi.StringArrayOutput
Ingress rules set. A rule must match the following format: [action]#[source]#[port]#[protocol]. The available value of 'action' is `ACCEPT` and `DROP`. The 'source' can be an IP address network, segment, security group ID and Address Template ID. The 'port' valid format is `80`, `80,443`, `80-90` or `ALL`. The available value of 'protocol' is `TCP`, `UDP`, `ICMP` and `ALL`. When 'protocol' is `ICMP` or `ALL`, the 'port' must be `ALL`.
func (GroupLiteRuleOutput) SecurityGroupId ¶
func (o GroupLiteRuleOutput) SecurityGroupId() pulumi.StringOutput
ID of the security group.
func (GroupLiteRuleOutput) ToGroupLiteRuleOutput ¶
func (o GroupLiteRuleOutput) ToGroupLiteRuleOutput() GroupLiteRuleOutput
func (GroupLiteRuleOutput) ToGroupLiteRuleOutputWithContext ¶
func (o GroupLiteRuleOutput) ToGroupLiteRuleOutputWithContext(ctx context.Context) GroupLiteRuleOutput
type GroupLiteRuleState ¶
type GroupLiteRuleState struct { // Egress rules set. A rule must match the following format: [action]#[source]#[port]#[protocol]. The available value of 'action' is `ACCEPT` and `DROP`. The 'source' can be an IP address network, segment, security group ID and Address Template ID. The 'port' valid format is `80`, `80,443`, `80-90` or `ALL`. The available value of 'protocol' is `TCP`, `UDP`, `ICMP` and `ALL`. When 'protocol' is `ICMP` or `ALL`, the 'port' must be `ALL`. Egresses pulumi.StringArrayInput // Ingress rules set. A rule must match the following format: [action]#[source]#[port]#[protocol]. The available value of 'action' is `ACCEPT` and `DROP`. The 'source' can be an IP address network, segment, security group ID and Address Template ID. The 'port' valid format is `80`, `80,443`, `80-90` or `ALL`. The available value of 'protocol' is `TCP`, `UDP`, `ICMP` and `ALL`. When 'protocol' is `ICMP` or `ALL`, the 'port' must be `ALL`. Ingresses pulumi.StringArrayInput // ID of the security group. SecurityGroupId pulumi.StringPtrInput }
func (GroupLiteRuleState) ElementType ¶
func (GroupLiteRuleState) ElementType() reflect.Type
type GroupMap ¶
type GroupMap map[string]GroupInput
func (GroupMap) ElementType ¶
func (GroupMap) ToGroupMapOutput ¶
func (i GroupMap) ToGroupMapOutput() GroupMapOutput
func (GroupMap) ToGroupMapOutputWithContext ¶
func (i GroupMap) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput
type GroupMapInput ¶
type GroupMapInput interface { pulumi.Input ToGroupMapOutput() GroupMapOutput ToGroupMapOutputWithContext(context.Context) GroupMapOutput }
GroupMapInput is an input type that accepts GroupMap and GroupMapOutput values. You can construct a concrete instance of `GroupMapInput` via:
GroupMap{ "key": GroupArgs{...} }
type GroupMapOutput ¶
type GroupMapOutput struct{ *pulumi.OutputState }
func (GroupMapOutput) ElementType ¶
func (GroupMapOutput) ElementType() reflect.Type
func (GroupMapOutput) MapIndex ¶
func (o GroupMapOutput) MapIndex(k pulumi.StringInput) GroupOutput
func (GroupMapOutput) ToGroupMapOutput ¶
func (o GroupMapOutput) ToGroupMapOutput() GroupMapOutput
func (GroupMapOutput) ToGroupMapOutputWithContext ¶
func (o GroupMapOutput) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput
type GroupOutput ¶
type GroupOutput struct{ *pulumi.OutputState }
func (GroupOutput) Description ¶
func (o GroupOutput) Description() pulumi.StringPtrOutput
Description of the security group.
func (GroupOutput) ElementType ¶
func (GroupOutput) ElementType() reflect.Type
func (GroupOutput) Name ¶
func (o GroupOutput) Name() pulumi.StringOutput
Name of the security group to be queried.
func (GroupOutput) ProjectId ¶
func (o GroupOutput) ProjectId() pulumi.IntOutput
Project ID of the security group.
func (GroupOutput) ToGroupOutput ¶
func (o GroupOutput) ToGroupOutput() GroupOutput
func (GroupOutput) ToGroupOutputWithContext ¶
func (o GroupOutput) ToGroupOutputWithContext(ctx context.Context) GroupOutput
type GroupRule ¶
type GroupRule struct { pulumi.CustomResourceState // ID of the address template, and confilicts with `sourceSgid` and `cidrIp`. AddressTemplate GroupRuleAddressTemplateOutput `pulumi:"addressTemplate"` // An IP address network or segment, and conflict with `sourceSgid` and `addressTemplate`. CidrIp pulumi.StringPtrOutput `pulumi:"cidrIp"` // Description of the security group rule. Description pulumi.StringOutput `pulumi:"description"` // Type of IP protocol. Valid values: `TCP`, `UDP` and `ICMP`. Default to all types protocol, and conflicts with `protocolTemplate`. IpProtocol pulumi.StringOutput `pulumi:"ipProtocol"` // Rule policy of security group. Valid values: `ACCEPT` and `DROP`. Policy pulumi.StringOutput `pulumi:"policy"` // Range of the port. The available value can be one, multiple or one segment. E.g. `80`, `80,90` and `80-90`. Default to all ports, and confilicts with `protocolTemplate`. PortRange pulumi.StringOutput `pulumi:"portRange"` // ID of the address template, and conflict with `ipProtocol`, `portRange`. ProtocolTemplate GroupRuleProtocolTemplateOutput `pulumi:"protocolTemplate"` // ID of the security group to be queried. SecurityGroupId pulumi.StringOutput `pulumi:"securityGroupId"` // ID of the nested security group, and conflicts with `cidrIp` and `addressTemplate`. SourceSgid pulumi.StringOutput `pulumi:"sourceSgid"` // Type of the security group rule. Valid values: `ingress` and `egress`. Type pulumi.StringOutput `pulumi:"type"` }
Provides a resource to create security group rule.
## Example Usage
Source is CIDR ip ¶
```go package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Security"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { sglab1Group, err := Security.NewGroup(ctx, "sglab1Group", &Security.GroupArgs{ Description: pulumi.String("favourite sg_1"), ProjectId: pulumi.Int(0), }) if err != nil { return err } _, err = Security.NewGroupRule(ctx, "sglab1GroupRule", &Security.GroupRuleArgs{ SecurityGroupId: sglab1Group.ID(), Type: pulumi.String("ingress"), CidrIp: pulumi.String("10.0.0.0/16"), IpProtocol: pulumi.String("TCP"), PortRange: pulumi.String("80"), Policy: pulumi.String("ACCEPT"), Description: pulumi.String("favourite sg rule_1"), }) if err != nil { return err } return nil }) }
```
Source is a security group id ¶
```go package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Security"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { sglab2Group, err := Security.NewGroup(ctx, "sglab2Group", &Security.GroupArgs{ Description: pulumi.String("favourite sg_2"), ProjectId: pulumi.Int(0), }) if err != nil { return err } sglab3, err := Security.NewGroup(ctx, "sglab3", &Security.GroupArgs{ Description: pulumi.String("favourite sg_3"), ProjectId: pulumi.Int(0), }) if err != nil { return err } _, err = Security.NewGroupRule(ctx, "sglab2GroupRule", &Security.GroupRuleArgs{ SecurityGroupId: sglab2Group.ID(), Type: pulumi.String("ingress"), IpProtocol: pulumi.String("TCP"), PortRange: pulumi.String("80"), Policy: pulumi.String("ACCEPT"), SourceSgid: sglab3.ID(), Description: pulumi.String("favourite sg rule_2"), }) if err != nil { return err } return nil }) }
```
func GetGroupRule ¶
func GetGroupRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *GroupRuleState, opts ...pulumi.ResourceOption) (*GroupRule, error)
GetGroupRule gets an existing GroupRule 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 NewGroupRule ¶
func NewGroupRule(ctx *pulumi.Context, name string, args *GroupRuleArgs, opts ...pulumi.ResourceOption) (*GroupRule, error)
NewGroupRule registers a new resource with the given unique name, arguments, and options.
func (*GroupRule) ElementType ¶
func (*GroupRule) ToGroupRuleOutput ¶
func (i *GroupRule) ToGroupRuleOutput() GroupRuleOutput
func (*GroupRule) ToGroupRuleOutputWithContext ¶
func (i *GroupRule) ToGroupRuleOutputWithContext(ctx context.Context) GroupRuleOutput
type GroupRuleAddressTemplateArgs ¶
type GroupRuleAddressTemplateArgs struct { // Address template group ID, conflicts with `templateId`. GroupId pulumi.StringPtrInput `pulumi:"groupId"` // Address template ID, conflicts with `groupId`. TemplateId pulumi.StringPtrInput `pulumi:"templateId"` }
func (GroupRuleAddressTemplateArgs) ElementType ¶
func (GroupRuleAddressTemplateArgs) ElementType() reflect.Type
func (GroupRuleAddressTemplateArgs) ToGroupRuleAddressTemplateOutput ¶
func (i GroupRuleAddressTemplateArgs) ToGroupRuleAddressTemplateOutput() GroupRuleAddressTemplateOutput
func (GroupRuleAddressTemplateArgs) ToGroupRuleAddressTemplateOutputWithContext ¶
func (i GroupRuleAddressTemplateArgs) ToGroupRuleAddressTemplateOutputWithContext(ctx context.Context) GroupRuleAddressTemplateOutput
func (GroupRuleAddressTemplateArgs) ToGroupRuleAddressTemplatePtrOutput ¶
func (i GroupRuleAddressTemplateArgs) ToGroupRuleAddressTemplatePtrOutput() GroupRuleAddressTemplatePtrOutput
func (GroupRuleAddressTemplateArgs) ToGroupRuleAddressTemplatePtrOutputWithContext ¶
func (i GroupRuleAddressTemplateArgs) ToGroupRuleAddressTemplatePtrOutputWithContext(ctx context.Context) GroupRuleAddressTemplatePtrOutput
type GroupRuleAddressTemplateInput ¶
type GroupRuleAddressTemplateInput interface { pulumi.Input ToGroupRuleAddressTemplateOutput() GroupRuleAddressTemplateOutput ToGroupRuleAddressTemplateOutputWithContext(context.Context) GroupRuleAddressTemplateOutput }
GroupRuleAddressTemplateInput is an input type that accepts GroupRuleAddressTemplateArgs and GroupRuleAddressTemplateOutput values. You can construct a concrete instance of `GroupRuleAddressTemplateInput` via:
GroupRuleAddressTemplateArgs{...}
type GroupRuleAddressTemplateOutput ¶
type GroupRuleAddressTemplateOutput struct{ *pulumi.OutputState }
func (GroupRuleAddressTemplateOutput) ElementType ¶
func (GroupRuleAddressTemplateOutput) ElementType() reflect.Type
func (GroupRuleAddressTemplateOutput) GroupId ¶
func (o GroupRuleAddressTemplateOutput) GroupId() pulumi.StringPtrOutput
Address template group ID, conflicts with `templateId`.
func (GroupRuleAddressTemplateOutput) TemplateId ¶
func (o GroupRuleAddressTemplateOutput) TemplateId() pulumi.StringPtrOutput
Address template ID, conflicts with `groupId`.
func (GroupRuleAddressTemplateOutput) ToGroupRuleAddressTemplateOutput ¶
func (o GroupRuleAddressTemplateOutput) ToGroupRuleAddressTemplateOutput() GroupRuleAddressTemplateOutput
func (GroupRuleAddressTemplateOutput) ToGroupRuleAddressTemplateOutputWithContext ¶
func (o GroupRuleAddressTemplateOutput) ToGroupRuleAddressTemplateOutputWithContext(ctx context.Context) GroupRuleAddressTemplateOutput
func (GroupRuleAddressTemplateOutput) ToGroupRuleAddressTemplatePtrOutput ¶
func (o GroupRuleAddressTemplateOutput) ToGroupRuleAddressTemplatePtrOutput() GroupRuleAddressTemplatePtrOutput
func (GroupRuleAddressTemplateOutput) ToGroupRuleAddressTemplatePtrOutputWithContext ¶
func (o GroupRuleAddressTemplateOutput) ToGroupRuleAddressTemplatePtrOutputWithContext(ctx context.Context) GroupRuleAddressTemplatePtrOutput
type GroupRuleAddressTemplatePtrInput ¶
type GroupRuleAddressTemplatePtrInput interface { pulumi.Input ToGroupRuleAddressTemplatePtrOutput() GroupRuleAddressTemplatePtrOutput ToGroupRuleAddressTemplatePtrOutputWithContext(context.Context) GroupRuleAddressTemplatePtrOutput }
GroupRuleAddressTemplatePtrInput is an input type that accepts GroupRuleAddressTemplateArgs, GroupRuleAddressTemplatePtr and GroupRuleAddressTemplatePtrOutput values. You can construct a concrete instance of `GroupRuleAddressTemplatePtrInput` via:
GroupRuleAddressTemplateArgs{...} or: nil
func GroupRuleAddressTemplatePtr ¶
func GroupRuleAddressTemplatePtr(v *GroupRuleAddressTemplateArgs) GroupRuleAddressTemplatePtrInput
type GroupRuleAddressTemplatePtrOutput ¶
type GroupRuleAddressTemplatePtrOutput struct{ *pulumi.OutputState }
func (GroupRuleAddressTemplatePtrOutput) Elem ¶
func (o GroupRuleAddressTemplatePtrOutput) Elem() GroupRuleAddressTemplateOutput
func (GroupRuleAddressTemplatePtrOutput) ElementType ¶
func (GroupRuleAddressTemplatePtrOutput) ElementType() reflect.Type
func (GroupRuleAddressTemplatePtrOutput) GroupId ¶
func (o GroupRuleAddressTemplatePtrOutput) GroupId() pulumi.StringPtrOutput
Address template group ID, conflicts with `templateId`.
func (GroupRuleAddressTemplatePtrOutput) TemplateId ¶
func (o GroupRuleAddressTemplatePtrOutput) TemplateId() pulumi.StringPtrOutput
Address template ID, conflicts with `groupId`.
func (GroupRuleAddressTemplatePtrOutput) ToGroupRuleAddressTemplatePtrOutput ¶
func (o GroupRuleAddressTemplatePtrOutput) ToGroupRuleAddressTemplatePtrOutput() GroupRuleAddressTemplatePtrOutput
func (GroupRuleAddressTemplatePtrOutput) ToGroupRuleAddressTemplatePtrOutputWithContext ¶
func (o GroupRuleAddressTemplatePtrOutput) ToGroupRuleAddressTemplatePtrOutputWithContext(ctx context.Context) GroupRuleAddressTemplatePtrOutput
type GroupRuleArgs ¶
type GroupRuleArgs struct { // ID of the address template, and confilicts with `sourceSgid` and `cidrIp`. AddressTemplate GroupRuleAddressTemplatePtrInput // An IP address network or segment, and conflict with `sourceSgid` and `addressTemplate`. CidrIp pulumi.StringPtrInput // Description of the security group rule. Description pulumi.StringPtrInput // Type of IP protocol. Valid values: `TCP`, `UDP` and `ICMP`. Default to all types protocol, and conflicts with `protocolTemplate`. IpProtocol pulumi.StringPtrInput // Rule policy of security group. Valid values: `ACCEPT` and `DROP`. Policy pulumi.StringInput // Range of the port. The available value can be one, multiple or one segment. E.g. `80`, `80,90` and `80-90`. Default to all ports, and confilicts with `protocolTemplate`. PortRange pulumi.StringPtrInput // ID of the address template, and conflict with `ipProtocol`, `portRange`. ProtocolTemplate GroupRuleProtocolTemplatePtrInput // ID of the security group to be queried. SecurityGroupId pulumi.StringInput // ID of the nested security group, and conflicts with `cidrIp` and `addressTemplate`. SourceSgid pulumi.StringPtrInput // Type of the security group rule. Valid values: `ingress` and `egress`. Type pulumi.StringInput }
The set of arguments for constructing a GroupRule resource.
func (GroupRuleArgs) ElementType ¶
func (GroupRuleArgs) ElementType() reflect.Type
type GroupRuleArray ¶
type GroupRuleArray []GroupRuleInput
func (GroupRuleArray) ElementType ¶
func (GroupRuleArray) ElementType() reflect.Type
func (GroupRuleArray) ToGroupRuleArrayOutput ¶
func (i GroupRuleArray) ToGroupRuleArrayOutput() GroupRuleArrayOutput
func (GroupRuleArray) ToGroupRuleArrayOutputWithContext ¶
func (i GroupRuleArray) ToGroupRuleArrayOutputWithContext(ctx context.Context) GroupRuleArrayOutput
type GroupRuleArrayInput ¶
type GroupRuleArrayInput interface { pulumi.Input ToGroupRuleArrayOutput() GroupRuleArrayOutput ToGroupRuleArrayOutputWithContext(context.Context) GroupRuleArrayOutput }
GroupRuleArrayInput is an input type that accepts GroupRuleArray and GroupRuleArrayOutput values. You can construct a concrete instance of `GroupRuleArrayInput` via:
GroupRuleArray{ GroupRuleArgs{...} }
type GroupRuleArrayOutput ¶
type GroupRuleArrayOutput struct{ *pulumi.OutputState }
func (GroupRuleArrayOutput) ElementType ¶
func (GroupRuleArrayOutput) ElementType() reflect.Type
func (GroupRuleArrayOutput) Index ¶
func (o GroupRuleArrayOutput) Index(i pulumi.IntInput) GroupRuleOutput
func (GroupRuleArrayOutput) ToGroupRuleArrayOutput ¶
func (o GroupRuleArrayOutput) ToGroupRuleArrayOutput() GroupRuleArrayOutput
func (GroupRuleArrayOutput) ToGroupRuleArrayOutputWithContext ¶
func (o GroupRuleArrayOutput) ToGroupRuleArrayOutputWithContext(ctx context.Context) GroupRuleArrayOutput
type GroupRuleInput ¶
type GroupRuleInput interface { pulumi.Input ToGroupRuleOutput() GroupRuleOutput ToGroupRuleOutputWithContext(ctx context.Context) GroupRuleOutput }
type GroupRuleMap ¶
type GroupRuleMap map[string]GroupRuleInput
func (GroupRuleMap) ElementType ¶
func (GroupRuleMap) ElementType() reflect.Type
func (GroupRuleMap) ToGroupRuleMapOutput ¶
func (i GroupRuleMap) ToGroupRuleMapOutput() GroupRuleMapOutput
func (GroupRuleMap) ToGroupRuleMapOutputWithContext ¶
func (i GroupRuleMap) ToGroupRuleMapOutputWithContext(ctx context.Context) GroupRuleMapOutput
type GroupRuleMapInput ¶
type GroupRuleMapInput interface { pulumi.Input ToGroupRuleMapOutput() GroupRuleMapOutput ToGroupRuleMapOutputWithContext(context.Context) GroupRuleMapOutput }
GroupRuleMapInput is an input type that accepts GroupRuleMap and GroupRuleMapOutput values. You can construct a concrete instance of `GroupRuleMapInput` via:
GroupRuleMap{ "key": GroupRuleArgs{...} }
type GroupRuleMapOutput ¶
type GroupRuleMapOutput struct{ *pulumi.OutputState }
func (GroupRuleMapOutput) ElementType ¶
func (GroupRuleMapOutput) ElementType() reflect.Type
func (GroupRuleMapOutput) MapIndex ¶
func (o GroupRuleMapOutput) MapIndex(k pulumi.StringInput) GroupRuleOutput
func (GroupRuleMapOutput) ToGroupRuleMapOutput ¶
func (o GroupRuleMapOutput) ToGroupRuleMapOutput() GroupRuleMapOutput
func (GroupRuleMapOutput) ToGroupRuleMapOutputWithContext ¶
func (o GroupRuleMapOutput) ToGroupRuleMapOutputWithContext(ctx context.Context) GroupRuleMapOutput
type GroupRuleOutput ¶
type GroupRuleOutput struct{ *pulumi.OutputState }
func (GroupRuleOutput) AddressTemplate ¶
func (o GroupRuleOutput) AddressTemplate() GroupRuleAddressTemplateOutput
ID of the address template, and confilicts with `sourceSgid` and `cidrIp`.
func (GroupRuleOutput) CidrIp ¶
func (o GroupRuleOutput) CidrIp() pulumi.StringPtrOutput
An IP address network or segment, and conflict with `sourceSgid` and `addressTemplate`.
func (GroupRuleOutput) Description ¶
func (o GroupRuleOutput) Description() pulumi.StringOutput
Description of the security group rule.
func (GroupRuleOutput) ElementType ¶
func (GroupRuleOutput) ElementType() reflect.Type
func (GroupRuleOutput) IpProtocol ¶
func (o GroupRuleOutput) IpProtocol() pulumi.StringOutput
Type of IP protocol. Valid values: `TCP`, `UDP` and `ICMP`. Default to all types protocol, and conflicts with `protocolTemplate`.
func (GroupRuleOutput) Policy ¶
func (o GroupRuleOutput) Policy() pulumi.StringOutput
Rule policy of security group. Valid values: `ACCEPT` and `DROP`.
func (GroupRuleOutput) PortRange ¶
func (o GroupRuleOutput) PortRange() pulumi.StringOutput
Range of the port. The available value can be one, multiple or one segment. E.g. `80`, `80,90` and `80-90`. Default to all ports, and confilicts with `protocolTemplate`.
func (GroupRuleOutput) ProtocolTemplate ¶
func (o GroupRuleOutput) ProtocolTemplate() GroupRuleProtocolTemplateOutput
ID of the address template, and conflict with `ipProtocol`, `portRange`.
func (GroupRuleOutput) SecurityGroupId ¶
func (o GroupRuleOutput) SecurityGroupId() pulumi.StringOutput
ID of the security group to be queried.
func (GroupRuleOutput) SourceSgid ¶
func (o GroupRuleOutput) SourceSgid() pulumi.StringOutput
ID of the nested security group, and conflicts with `cidrIp` and `addressTemplate`.
func (GroupRuleOutput) ToGroupRuleOutput ¶
func (o GroupRuleOutput) ToGroupRuleOutput() GroupRuleOutput
func (GroupRuleOutput) ToGroupRuleOutputWithContext ¶
func (o GroupRuleOutput) ToGroupRuleOutputWithContext(ctx context.Context) GroupRuleOutput
func (GroupRuleOutput) Type ¶
func (o GroupRuleOutput) Type() pulumi.StringOutput
Type of the security group rule. Valid values: `ingress` and `egress`.
type GroupRuleProtocolTemplateArgs ¶
type GroupRuleProtocolTemplateArgs struct { // Address template group ID, conflicts with `templateId`. GroupId pulumi.StringPtrInput `pulumi:"groupId"` // Address template ID, conflicts with `groupId`. TemplateId pulumi.StringPtrInput `pulumi:"templateId"` }
func (GroupRuleProtocolTemplateArgs) ElementType ¶
func (GroupRuleProtocolTemplateArgs) ElementType() reflect.Type
func (GroupRuleProtocolTemplateArgs) ToGroupRuleProtocolTemplateOutput ¶
func (i GroupRuleProtocolTemplateArgs) ToGroupRuleProtocolTemplateOutput() GroupRuleProtocolTemplateOutput
func (GroupRuleProtocolTemplateArgs) ToGroupRuleProtocolTemplateOutputWithContext ¶
func (i GroupRuleProtocolTemplateArgs) ToGroupRuleProtocolTemplateOutputWithContext(ctx context.Context) GroupRuleProtocolTemplateOutput
func (GroupRuleProtocolTemplateArgs) ToGroupRuleProtocolTemplatePtrOutput ¶
func (i GroupRuleProtocolTemplateArgs) ToGroupRuleProtocolTemplatePtrOutput() GroupRuleProtocolTemplatePtrOutput
func (GroupRuleProtocolTemplateArgs) ToGroupRuleProtocolTemplatePtrOutputWithContext ¶
func (i GroupRuleProtocolTemplateArgs) ToGroupRuleProtocolTemplatePtrOutputWithContext(ctx context.Context) GroupRuleProtocolTemplatePtrOutput
type GroupRuleProtocolTemplateInput ¶
type GroupRuleProtocolTemplateInput interface { pulumi.Input ToGroupRuleProtocolTemplateOutput() GroupRuleProtocolTemplateOutput ToGroupRuleProtocolTemplateOutputWithContext(context.Context) GroupRuleProtocolTemplateOutput }
GroupRuleProtocolTemplateInput is an input type that accepts GroupRuleProtocolTemplateArgs and GroupRuleProtocolTemplateOutput values. You can construct a concrete instance of `GroupRuleProtocolTemplateInput` via:
GroupRuleProtocolTemplateArgs{...}
type GroupRuleProtocolTemplateOutput ¶
type GroupRuleProtocolTemplateOutput struct{ *pulumi.OutputState }
func (GroupRuleProtocolTemplateOutput) ElementType ¶
func (GroupRuleProtocolTemplateOutput) ElementType() reflect.Type
func (GroupRuleProtocolTemplateOutput) GroupId ¶
func (o GroupRuleProtocolTemplateOutput) GroupId() pulumi.StringPtrOutput
Address template group ID, conflicts with `templateId`.
func (GroupRuleProtocolTemplateOutput) TemplateId ¶
func (o GroupRuleProtocolTemplateOutput) TemplateId() pulumi.StringPtrOutput
Address template ID, conflicts with `groupId`.
func (GroupRuleProtocolTemplateOutput) ToGroupRuleProtocolTemplateOutput ¶
func (o GroupRuleProtocolTemplateOutput) ToGroupRuleProtocolTemplateOutput() GroupRuleProtocolTemplateOutput
func (GroupRuleProtocolTemplateOutput) ToGroupRuleProtocolTemplateOutputWithContext ¶
func (o GroupRuleProtocolTemplateOutput) ToGroupRuleProtocolTemplateOutputWithContext(ctx context.Context) GroupRuleProtocolTemplateOutput
func (GroupRuleProtocolTemplateOutput) ToGroupRuleProtocolTemplatePtrOutput ¶
func (o GroupRuleProtocolTemplateOutput) ToGroupRuleProtocolTemplatePtrOutput() GroupRuleProtocolTemplatePtrOutput
func (GroupRuleProtocolTemplateOutput) ToGroupRuleProtocolTemplatePtrOutputWithContext ¶
func (o GroupRuleProtocolTemplateOutput) ToGroupRuleProtocolTemplatePtrOutputWithContext(ctx context.Context) GroupRuleProtocolTemplatePtrOutput
type GroupRuleProtocolTemplatePtrInput ¶
type GroupRuleProtocolTemplatePtrInput interface { pulumi.Input ToGroupRuleProtocolTemplatePtrOutput() GroupRuleProtocolTemplatePtrOutput ToGroupRuleProtocolTemplatePtrOutputWithContext(context.Context) GroupRuleProtocolTemplatePtrOutput }
GroupRuleProtocolTemplatePtrInput is an input type that accepts GroupRuleProtocolTemplateArgs, GroupRuleProtocolTemplatePtr and GroupRuleProtocolTemplatePtrOutput values. You can construct a concrete instance of `GroupRuleProtocolTemplatePtrInput` via:
GroupRuleProtocolTemplateArgs{...} or: nil
func GroupRuleProtocolTemplatePtr ¶
func GroupRuleProtocolTemplatePtr(v *GroupRuleProtocolTemplateArgs) GroupRuleProtocolTemplatePtrInput
type GroupRuleProtocolTemplatePtrOutput ¶
type GroupRuleProtocolTemplatePtrOutput struct{ *pulumi.OutputState }
func (GroupRuleProtocolTemplatePtrOutput) Elem ¶
func (o GroupRuleProtocolTemplatePtrOutput) Elem() GroupRuleProtocolTemplateOutput
func (GroupRuleProtocolTemplatePtrOutput) ElementType ¶
func (GroupRuleProtocolTemplatePtrOutput) ElementType() reflect.Type
func (GroupRuleProtocolTemplatePtrOutput) GroupId ¶
func (o GroupRuleProtocolTemplatePtrOutput) GroupId() pulumi.StringPtrOutput
Address template group ID, conflicts with `templateId`.
func (GroupRuleProtocolTemplatePtrOutput) TemplateId ¶
func (o GroupRuleProtocolTemplatePtrOutput) TemplateId() pulumi.StringPtrOutput
Address template ID, conflicts with `groupId`.
func (GroupRuleProtocolTemplatePtrOutput) ToGroupRuleProtocolTemplatePtrOutput ¶
func (o GroupRuleProtocolTemplatePtrOutput) ToGroupRuleProtocolTemplatePtrOutput() GroupRuleProtocolTemplatePtrOutput
func (GroupRuleProtocolTemplatePtrOutput) ToGroupRuleProtocolTemplatePtrOutputWithContext ¶
func (o GroupRuleProtocolTemplatePtrOutput) ToGroupRuleProtocolTemplatePtrOutputWithContext(ctx context.Context) GroupRuleProtocolTemplatePtrOutput
type GroupRuleState ¶
type GroupRuleState struct { // ID of the address template, and confilicts with `sourceSgid` and `cidrIp`. AddressTemplate GroupRuleAddressTemplatePtrInput // An IP address network or segment, and conflict with `sourceSgid` and `addressTemplate`. CidrIp pulumi.StringPtrInput // Description of the security group rule. Description pulumi.StringPtrInput // Type of IP protocol. Valid values: `TCP`, `UDP` and `ICMP`. Default to all types protocol, and conflicts with `protocolTemplate`. IpProtocol pulumi.StringPtrInput // Rule policy of security group. Valid values: `ACCEPT` and `DROP`. Policy pulumi.StringPtrInput // Range of the port. The available value can be one, multiple or one segment. E.g. `80`, `80,90` and `80-90`. Default to all ports, and confilicts with `protocolTemplate`. PortRange pulumi.StringPtrInput // ID of the address template, and conflict with `ipProtocol`, `portRange`. ProtocolTemplate GroupRuleProtocolTemplatePtrInput // ID of the security group to be queried. SecurityGroupId pulumi.StringPtrInput // ID of the nested security group, and conflicts with `cidrIp` and `addressTemplate`. SourceSgid pulumi.StringPtrInput // Type of the security group rule. Valid values: `ingress` and `egress`. Type pulumi.StringPtrInput }
func (GroupRuleState) ElementType ¶
func (GroupRuleState) ElementType() reflect.Type
type GroupState ¶
type GroupState struct { // Description of the security group. Description pulumi.StringPtrInput // Name of the security group to be queried. Name pulumi.StringPtrInput // Project ID of the security group. ProjectId pulumi.IntPtrInput // Tags of the security group. Tags pulumi.MapInput }
func (GroupState) ElementType ¶
func (GroupState) ElementType() reflect.Type