tencentcloud.CfsAccessRule
Explore with Pulumi AI
Provides a resource to create a CFS access rule.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const foo = new tencentcloud.CfsAccessRule("foo", {
accessGroupId: "pgroup-7nx89k7l",
authClientIp: "10.10.1.0/24",
priority: 1,
rwPermission: "RO",
userPermission: "root_squash",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
foo = tencentcloud.CfsAccessRule("foo",
access_group_id="pgroup-7nx89k7l",
auth_client_ip="10.10.1.0/24",
priority=1,
rw_permission="RO",
user_permission="root_squash")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewCfsAccessRule(ctx, "foo", &tencentcloud.CfsAccessRuleArgs{
AccessGroupId: pulumi.String("pgroup-7nx89k7l"),
AuthClientIp: pulumi.String("10.10.1.0/24"),
Priority: pulumi.Float64(1),
RwPermission: pulumi.String("RO"),
UserPermission: pulumi.String("root_squash"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var foo = new Tencentcloud.CfsAccessRule("foo", new()
{
AccessGroupId = "pgroup-7nx89k7l",
AuthClientIp = "10.10.1.0/24",
Priority = 1,
RwPermission = "RO",
UserPermission = "root_squash",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CfsAccessRule;
import com.pulumi.tencentcloud.CfsAccessRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new CfsAccessRule("foo", CfsAccessRuleArgs.builder()
.accessGroupId("pgroup-7nx89k7l")
.authClientIp("10.10.1.0/24")
.priority(1)
.rwPermission("RO")
.userPermission("root_squash")
.build());
}
}
resources:
foo:
type: tencentcloud:CfsAccessRule
properties:
accessGroupId: pgroup-7nx89k7l
authClientIp: 10.10.1.0/24
priority: 1
rwPermission: RO
userPermission: root_squash
Create CfsAccessRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CfsAccessRule(name: string, args: CfsAccessRuleArgs, opts?: CustomResourceOptions);
@overload
def CfsAccessRule(resource_name: str,
args: CfsAccessRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CfsAccessRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_group_id: Optional[str] = None,
auth_client_ip: Optional[str] = None,
priority: Optional[float] = None,
cfs_access_rule_id: Optional[str] = None,
rw_permission: Optional[str] = None,
user_permission: Optional[str] = None)
func NewCfsAccessRule(ctx *Context, name string, args CfsAccessRuleArgs, opts ...ResourceOption) (*CfsAccessRule, error)
public CfsAccessRule(string name, CfsAccessRuleArgs args, CustomResourceOptions? opts = null)
public CfsAccessRule(String name, CfsAccessRuleArgs args)
public CfsAccessRule(String name, CfsAccessRuleArgs args, CustomResourceOptions options)
type: tencentcloud:CfsAccessRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CfsAccessRuleArgs
- 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 CfsAccessRuleArgs
- 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 CfsAccessRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CfsAccessRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CfsAccessRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CfsAccessRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CfsAccessRule resource accepts the following input properties:
- Access
Group stringId - ID of a access group.
- Auth
Client stringIp - A single IP or a single IP address range such as 10.1.10.11 or 10.10.1.0/24 indicates that all IPs are allowed. Please note that the IP entered should be CVM's private IP.
- Priority double
- The priority level of rule. Valid value ranges: (1~100).
1
indicates the highest priority. - Cfs
Access stringRule Id - ID of the resource.
- Rw
Permission string - Read and write permissions. Valid values are
RO
andRW
. and default isRO
. - User
Permission string - The permissions of accessing users. Valid values are
all_squash
,no_all_squash
,root_squash
andno_root_squash
. and default isroot_squash
.all_squash
indicates that all access users are mapped as anonymous users or user groups;no_all_squash
indicates that access users will match local users first and be mapped to anonymous users or user groups after matching failed;root_squash
indicates that map access root users to anonymous users or user groups;no_root_squash
indicates that access root users keep root account permission.
- Access
Group stringId - ID of a access group.
- Auth
Client stringIp - A single IP or a single IP address range such as 10.1.10.11 or 10.10.1.0/24 indicates that all IPs are allowed. Please note that the IP entered should be CVM's private IP.
- Priority float64
- The priority level of rule. Valid value ranges: (1~100).
1
indicates the highest priority. - Cfs
Access stringRule Id - ID of the resource.
- Rw
Permission string - Read and write permissions. Valid values are
RO
andRW
. and default isRO
. - User
Permission string - The permissions of accessing users. Valid values are
all_squash
,no_all_squash
,root_squash
andno_root_squash
. and default isroot_squash
.all_squash
indicates that all access users are mapped as anonymous users or user groups;no_all_squash
indicates that access users will match local users first and be mapped to anonymous users or user groups after matching failed;root_squash
indicates that map access root users to anonymous users or user groups;no_root_squash
indicates that access root users keep root account permission.
- access
Group StringId - ID of a access group.
- auth
Client StringIp - A single IP or a single IP address range such as 10.1.10.11 or 10.10.1.0/24 indicates that all IPs are allowed. Please note that the IP entered should be CVM's private IP.
- priority Double
- The priority level of rule. Valid value ranges: (1~100).
1
indicates the highest priority. - cfs
Access StringRule Id - ID of the resource.
- rw
Permission String - Read and write permissions. Valid values are
RO
andRW
. and default isRO
. - user
Permission String - The permissions of accessing users. Valid values are
all_squash
,no_all_squash
,root_squash
andno_root_squash
. and default isroot_squash
.all_squash
indicates that all access users are mapped as anonymous users or user groups;no_all_squash
indicates that access users will match local users first and be mapped to anonymous users or user groups after matching failed;root_squash
indicates that map access root users to anonymous users or user groups;no_root_squash
indicates that access root users keep root account permission.
- access
Group stringId - ID of a access group.
- auth
Client stringIp - A single IP or a single IP address range such as 10.1.10.11 or 10.10.1.0/24 indicates that all IPs are allowed. Please note that the IP entered should be CVM's private IP.
- priority number
- The priority level of rule. Valid value ranges: (1~100).
1
indicates the highest priority. - cfs
Access stringRule Id - ID of the resource.
- rw
Permission string - Read and write permissions. Valid values are
RO
andRW
. and default isRO
. - user
Permission string - The permissions of accessing users. Valid values are
all_squash
,no_all_squash
,root_squash
andno_root_squash
. and default isroot_squash
.all_squash
indicates that all access users are mapped as anonymous users or user groups;no_all_squash
indicates that access users will match local users first and be mapped to anonymous users or user groups after matching failed;root_squash
indicates that map access root users to anonymous users or user groups;no_root_squash
indicates that access root users keep root account permission.
- access_
group_ strid - ID of a access group.
- auth_
client_ strip - A single IP or a single IP address range such as 10.1.10.11 or 10.10.1.0/24 indicates that all IPs are allowed. Please note that the IP entered should be CVM's private IP.
- priority float
- The priority level of rule. Valid value ranges: (1~100).
1
indicates the highest priority. - cfs_
access_ strrule_ id - ID of the resource.
- rw_
permission str - Read and write permissions. Valid values are
RO
andRW
. and default isRO
. - user_
permission str - The permissions of accessing users. Valid values are
all_squash
,no_all_squash
,root_squash
andno_root_squash
. and default isroot_squash
.all_squash
indicates that all access users are mapped as anonymous users or user groups;no_all_squash
indicates that access users will match local users first and be mapped to anonymous users or user groups after matching failed;root_squash
indicates that map access root users to anonymous users or user groups;no_root_squash
indicates that access root users keep root account permission.
- access
Group StringId - ID of a access group.
- auth
Client StringIp - A single IP or a single IP address range such as 10.1.10.11 or 10.10.1.0/24 indicates that all IPs are allowed. Please note that the IP entered should be CVM's private IP.
- priority Number
- The priority level of rule. Valid value ranges: (1~100).
1
indicates the highest priority. - cfs
Access StringRule Id - ID of the resource.
- rw
Permission String - Read and write permissions. Valid values are
RO
andRW
. and default isRO
. - user
Permission String - The permissions of accessing users. Valid values are
all_squash
,no_all_squash
,root_squash
andno_root_squash
. and default isroot_squash
.all_squash
indicates that all access users are mapped as anonymous users or user groups;no_all_squash
indicates that access users will match local users first and be mapped to anonymous users or user groups after matching failed;root_squash
indicates that map access root users to anonymous users or user groups;no_root_squash
indicates that access root users keep root account permission.
Outputs
All input properties are implicitly available as output properties. Additionally, the CfsAccessRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing CfsAccessRule Resource
Get an existing CfsAccessRule 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?: CfsAccessRuleState, opts?: CustomResourceOptions): CfsAccessRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_group_id: Optional[str] = None,
auth_client_ip: Optional[str] = None,
cfs_access_rule_id: Optional[str] = None,
priority: Optional[float] = None,
rw_permission: Optional[str] = None,
user_permission: Optional[str] = None) -> CfsAccessRule
func GetCfsAccessRule(ctx *Context, name string, id IDInput, state *CfsAccessRuleState, opts ...ResourceOption) (*CfsAccessRule, error)
public static CfsAccessRule Get(string name, Input<string> id, CfsAccessRuleState? state, CustomResourceOptions? opts = null)
public static CfsAccessRule get(String name, Output<String> id, CfsAccessRuleState state, CustomResourceOptions options)
resources: _: type: tencentcloud:CfsAccessRule get: id: ${id}
- 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.
- Access
Group stringId - ID of a access group.
- Auth
Client stringIp - A single IP or a single IP address range such as 10.1.10.11 or 10.10.1.0/24 indicates that all IPs are allowed. Please note that the IP entered should be CVM's private IP.
- Cfs
Access stringRule Id - ID of the resource.
- Priority double
- The priority level of rule. Valid value ranges: (1~100).
1
indicates the highest priority. - Rw
Permission string - Read and write permissions. Valid values are
RO
andRW
. and default isRO
. - User
Permission string - The permissions of accessing users. Valid values are
all_squash
,no_all_squash
,root_squash
andno_root_squash
. and default isroot_squash
.all_squash
indicates that all access users are mapped as anonymous users or user groups;no_all_squash
indicates that access users will match local users first and be mapped to anonymous users or user groups after matching failed;root_squash
indicates that map access root users to anonymous users or user groups;no_root_squash
indicates that access root users keep root account permission.
- Access
Group stringId - ID of a access group.
- Auth
Client stringIp - A single IP or a single IP address range such as 10.1.10.11 or 10.10.1.0/24 indicates that all IPs are allowed. Please note that the IP entered should be CVM's private IP.
- Cfs
Access stringRule Id - ID of the resource.
- Priority float64
- The priority level of rule. Valid value ranges: (1~100).
1
indicates the highest priority. - Rw
Permission string - Read and write permissions. Valid values are
RO
andRW
. and default isRO
. - User
Permission string - The permissions of accessing users. Valid values are
all_squash
,no_all_squash
,root_squash
andno_root_squash
. and default isroot_squash
.all_squash
indicates that all access users are mapped as anonymous users or user groups;no_all_squash
indicates that access users will match local users first and be mapped to anonymous users or user groups after matching failed;root_squash
indicates that map access root users to anonymous users or user groups;no_root_squash
indicates that access root users keep root account permission.
- access
Group StringId - ID of a access group.
- auth
Client StringIp - A single IP or a single IP address range such as 10.1.10.11 or 10.10.1.0/24 indicates that all IPs are allowed. Please note that the IP entered should be CVM's private IP.
- cfs
Access StringRule Id - ID of the resource.
- priority Double
- The priority level of rule. Valid value ranges: (1~100).
1
indicates the highest priority. - rw
Permission String - Read and write permissions. Valid values are
RO
andRW
. and default isRO
. - user
Permission String - The permissions of accessing users. Valid values are
all_squash
,no_all_squash
,root_squash
andno_root_squash
. and default isroot_squash
.all_squash
indicates that all access users are mapped as anonymous users or user groups;no_all_squash
indicates that access users will match local users first and be mapped to anonymous users or user groups after matching failed;root_squash
indicates that map access root users to anonymous users or user groups;no_root_squash
indicates that access root users keep root account permission.
- access
Group stringId - ID of a access group.
- auth
Client stringIp - A single IP or a single IP address range such as 10.1.10.11 or 10.10.1.0/24 indicates that all IPs are allowed. Please note that the IP entered should be CVM's private IP.
- cfs
Access stringRule Id - ID of the resource.
- priority number
- The priority level of rule. Valid value ranges: (1~100).
1
indicates the highest priority. - rw
Permission string - Read and write permissions. Valid values are
RO
andRW
. and default isRO
. - user
Permission string - The permissions of accessing users. Valid values are
all_squash
,no_all_squash
,root_squash
andno_root_squash
. and default isroot_squash
.all_squash
indicates that all access users are mapped as anonymous users or user groups;no_all_squash
indicates that access users will match local users first and be mapped to anonymous users or user groups after matching failed;root_squash
indicates that map access root users to anonymous users or user groups;no_root_squash
indicates that access root users keep root account permission.
- access_
group_ strid - ID of a access group.
- auth_
client_ strip - A single IP or a single IP address range such as 10.1.10.11 or 10.10.1.0/24 indicates that all IPs are allowed. Please note that the IP entered should be CVM's private IP.
- cfs_
access_ strrule_ id - ID of the resource.
- priority float
- The priority level of rule. Valid value ranges: (1~100).
1
indicates the highest priority. - rw_
permission str - Read and write permissions. Valid values are
RO
andRW
. and default isRO
. - user_
permission str - The permissions of accessing users. Valid values are
all_squash
,no_all_squash
,root_squash
andno_root_squash
. and default isroot_squash
.all_squash
indicates that all access users are mapped as anonymous users or user groups;no_all_squash
indicates that access users will match local users first and be mapped to anonymous users or user groups after matching failed;root_squash
indicates that map access root users to anonymous users or user groups;no_root_squash
indicates that access root users keep root account permission.
- access
Group StringId - ID of a access group.
- auth
Client StringIp - A single IP or a single IP address range such as 10.1.10.11 or 10.10.1.0/24 indicates that all IPs are allowed. Please note that the IP entered should be CVM's private IP.
- cfs
Access StringRule Id - ID of the resource.
- priority Number
- The priority level of rule. Valid value ranges: (1~100).
1
indicates the highest priority. - rw
Permission String - Read and write permissions. Valid values are
RO
andRW
. and default isRO
. - user
Permission String - The permissions of accessing users. Valid values are
all_squash
,no_all_squash
,root_squash
andno_root_squash
. and default isroot_squash
.all_squash
indicates that all access users are mapped as anonymous users or user groups;no_all_squash
indicates that access users will match local users first and be mapped to anonymous users or user groups after matching failed;root_squash
indicates that map access root users to anonymous users or user groups;no_root_squash
indicates that access root users keep root account permission.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.