Manages security for any private port attached to a Virtual Instance.
Create PortSecurity Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PortSecurity(name: string, args: PortSecurityArgs, opts?: CustomResourceOptions);@overload
def PortSecurity(resource_name: str,
args: PortSecurityArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PortSecurity(resource_name: str,
opts: Optional[ResourceOptions] = None,
port_id: Optional[str] = None,
enable_port_security: Optional[bool] = None,
port_security_id: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
region_id: Optional[float] = None,
region_name: Optional[str] = None)func NewPortSecurity(ctx *Context, name string, args PortSecurityArgs, opts ...ResourceOption) (*PortSecurity, error)public PortSecurity(string name, PortSecurityArgs args, CustomResourceOptions? opts = null)
public PortSecurity(String name, PortSecurityArgs args)
public PortSecurity(String name, PortSecurityArgs args, CustomResourceOptions options)
type: gcore:PortSecurity
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 PortSecurityArgs
- 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 PortSecurityArgs
- 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 PortSecurityArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PortSecurityArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PortSecurityArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var portSecurityResource = new Gcore.PortSecurity("portSecurityResource", new()
{
PortId = "string",
EnablePortSecurity = false,
PortSecurityId = "string",
ProjectId = 0,
ProjectName = "string",
RegionId = 0,
RegionName = "string",
});
example, err := gcore.NewPortSecurity(ctx, "portSecurityResource", &gcore.PortSecurityArgs{
PortId: pulumi.String("string"),
EnablePortSecurity: pulumi.Bool(false),
PortSecurityId: pulumi.String("string"),
ProjectId: pulumi.Float64(0),
ProjectName: pulumi.String("string"),
RegionId: pulumi.Float64(0),
RegionName: pulumi.String("string"),
})
var portSecurityResource = new PortSecurity("portSecurityResource", PortSecurityArgs.builder()
.portId("string")
.enablePortSecurity(false)
.portSecurityId("string")
.projectId(0.0)
.projectName("string")
.regionId(0.0)
.regionName("string")
.build());
port_security_resource = gcore.PortSecurity("portSecurityResource",
port_id="string",
enable_port_security=False,
port_security_id="string",
project_id=0,
project_name="string",
region_id=0,
region_name="string")
const portSecurityResource = new gcore.PortSecurity("portSecurityResource", {
portId: "string",
enablePortSecurity: false,
portSecurityId: "string",
projectId: 0,
projectName: "string",
regionId: 0,
regionName: "string",
});
type: gcore:PortSecurity
properties:
enablePortSecurity: false
portId: string
portSecurityId: string
projectId: 0
projectName: string
regionId: 0
regionName: string
PortSecurity 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 PortSecurity resource accepts the following input properties:
- Port
Id string - ID of the port where allowed address pairs will be managed.
- Enable
Port boolSecurity - Enable port security for the port.
- Port
Security stringId - The ID of this resource.
- Project
Id double - Project ID in which the port exists.
- Project
Name string - Project name in which the port exists.
- Region
Id double - Region ID where the port is located.
- Region
Name string - Region name where the port is located.
- Port
Id string - ID of the port where allowed address pairs will be managed.
- Enable
Port boolSecurity - Enable port security for the port.
- Port
Security stringId - The ID of this resource.
- Project
Id float64 - Project ID in which the port exists.
- Project
Name string - Project name in which the port exists.
- Region
Id float64 - Region ID where the port is located.
- Region
Name string - Region name where the port is located.
- port
Id String - ID of the port where allowed address pairs will be managed.
- enable
Port BooleanSecurity - Enable port security for the port.
- port
Security StringId - The ID of this resource.
- project
Id Double - Project ID in which the port exists.
- project
Name String - Project name in which the port exists.
- region
Id Double - Region ID where the port is located.
- region
Name String - Region name where the port is located.
- port
Id string - ID of the port where allowed address pairs will be managed.
- enable
Port booleanSecurity - Enable port security for the port.
- port
Security stringId - The ID of this resource.
- project
Id number - Project ID in which the port exists.
- project
Name string - Project name in which the port exists.
- region
Id number - Region ID where the port is located.
- region
Name string - Region name where the port is located.
- port_
id str - ID of the port where allowed address pairs will be managed.
- enable_
port_ boolsecurity - Enable port security for the port.
- port_
security_ strid - The ID of this resource.
- project_
id float - Project ID in which the port exists.
- project_
name str - Project name in which the port exists.
- region_
id float - Region ID where the port is located.
- region_
name str - Region name where the port is located.
- port
Id String - ID of the port where allowed address pairs will be managed.
- enable
Port BooleanSecurity - Enable port security for the port.
- port
Security StringId - The ID of this resource.
- project
Id Number - Project ID in which the port exists.
- project
Name String - Project name in which the port exists.
- region
Id Number - Region ID where the port is located.
- region
Name String - Region name where the port is located.
Outputs
All input properties are implicitly available as output properties. Additionally, the PortSecurity 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 PortSecurity Resource
Get an existing PortSecurity 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?: PortSecurityState, opts?: CustomResourceOptions): PortSecurity@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
enable_port_security: Optional[bool] = None,
port_id: Optional[str] = None,
port_security_id: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
region_id: Optional[float] = None,
region_name: Optional[str] = None) -> PortSecurityfunc GetPortSecurity(ctx *Context, name string, id IDInput, state *PortSecurityState, opts ...ResourceOption) (*PortSecurity, error)public static PortSecurity Get(string name, Input<string> id, PortSecurityState? state, CustomResourceOptions? opts = null)public static PortSecurity get(String name, Output<String> id, PortSecurityState state, CustomResourceOptions options)resources: _: type: gcore:PortSecurity 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.
- Enable
Port boolSecurity - Enable port security for the port.
- Port
Id string - ID of the port where allowed address pairs will be managed.
- Port
Security stringId - The ID of this resource.
- Project
Id double - Project ID in which the port exists.
- Project
Name string - Project name in which the port exists.
- Region
Id double - Region ID where the port is located.
- Region
Name string - Region name where the port is located.
- Enable
Port boolSecurity - Enable port security for the port.
- Port
Id string - ID of the port where allowed address pairs will be managed.
- Port
Security stringId - The ID of this resource.
- Project
Id float64 - Project ID in which the port exists.
- Project
Name string - Project name in which the port exists.
- Region
Id float64 - Region ID where the port is located.
- Region
Name string - Region name where the port is located.
- enable
Port BooleanSecurity - Enable port security for the port.
- port
Id String - ID of the port where allowed address pairs will be managed.
- port
Security StringId - The ID of this resource.
- project
Id Double - Project ID in which the port exists.
- project
Name String - Project name in which the port exists.
- region
Id Double - Region ID where the port is located.
- region
Name String - Region name where the port is located.
- enable
Port booleanSecurity - Enable port security for the port.
- port
Id string - ID of the port where allowed address pairs will be managed.
- port
Security stringId - The ID of this resource.
- project
Id number - Project ID in which the port exists.
- project
Name string - Project name in which the port exists.
- region
Id number - Region ID where the port is located.
- region
Name string - Region name where the port is located.
- enable_
port_ boolsecurity - Enable port security for the port.
- port_
id str - ID of the port where allowed address pairs will be managed.
- port_
security_ strid - The ID of this resource.
- project_
id float - Project ID in which the port exists.
- project_
name str - Project name in which the port exists.
- region_
id float - Region ID where the port is located.
- region_
name str - Region name where the port is located.
- enable
Port BooleanSecurity - Enable port security for the port.
- port
Id String - ID of the port where allowed address pairs will be managed.
- port
Security StringId - The ID of this resource.
- project
Id Number - Project ID in which the port exists.
- project
Name String - Project name in which the port exists.
- region
Id Number - Region ID where the port is located.
- region
Name String - Region name where the port is located.
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcoreTerraform Provider.
