Skip to main content

security_actions

Creates, updates, deletes, gets or lists a security_actions resource.

Overview

Namesecurity_actions
TypeResource
Idgoogle.apigee.security_actions

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringImmutable. This field is ignored during creation as per AIP-133. Please set the security_action_id field in the CreateSecurityActionRequest when creating a new SecurityAction. Format: organizations/{org}/environments/{env}/securityActions/{security_action}
allowobjectAllow a request through if it matches this SecurityAction. (id: GoogleCloudApigeeV1SecurityActionAllow)
apiProxiesarrayOptional. If unset, this would apply to all proxies in the environment. If set, this action is enforced only if at least one proxy in the repeated list is deployed at the time of enforcement. If set, several restrictions are enforced on SecurityActions. There can be at most 100 enabled actions with proxies set in an env. Several other restrictions apply on conditions and are detailed later.
conditionConfigobjectRequired. A valid SecurityAction must contain at least one condition. (id: GoogleCloudApigeeV1SecurityActionConditionConfig)
createTimestring (google-datetime)Output only. The create time for this SecurityAction.
denyobjectDeny a request through if it matches this SecurityAction. (id: GoogleCloudApigeeV1SecurityActionDeny)
descriptionstringOptional. An optional user provided description of the SecurityAction.
expireTimestring (google-datetime)The expiration for this SecurityAction.
flagobjectFlag a request through if it matches this SecurityAction. (id: GoogleCloudApigeeV1SecurityActionFlag)
statestringRequired. Only an ENABLED SecurityAction is enforced. An ENABLED SecurityAction past its expiration time will not be enforced.
ttlstring (google-duration)Input only. The TTL for this SecurityAction.
updateTimestring (google-datetime)Output only. The update time for this SecurityAction. This reflects when this SecurityAction changed states.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_environments_security_actions_getselectorganizationsId, environmentsId, securityActionsIdGet a SecurityAction by name.
organizations_environments_security_actions_listselectorganizationsId, environmentsIdpageSize, pageToken, filterReturns a list of SecurityActions. This returns both enabled and disabled actions.
organizations_environments_security_actions_createinsertorganizationsId, environmentsIdsecurityActionIdCreateSecurityAction creates a SecurityAction.
organizations_environments_security_actions_patchupdateorganizationsId, environmentsId, securityActionsIdupdateMaskUpdate a SecurityAction.
organizations_environments_security_actions_deletedeleteorganizationsId, environmentsId, securityActionsIdDelete a SecurityAction.
organizations_environments_security_actions_enableexecorganizationsId, environmentsId, securityActionsIdEnable a SecurityAction. The state of the SecurityAction after enabling is ENABLED. EnableSecurityAction can be called on SecurityActions in the state DISABLED; SecurityActions in a different state (including `ENABLED) return an error.
organizations_environments_security_actions_disableexecorganizationsId, environmentsId, securityActionsIdDisable a SecurityAction. The state of the SecurityAction after disabling is DISABLED. DisableSecurityAction can be called on SecurityActions in the state ENABLED; SecurityActions in a different state (including DISABLED) return an error.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
environmentsIdstring
organizationsIdstring
securityActionsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
securityActionIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Get a SecurityAction by name.

SELECT
name,
allow,
apiProxies,
conditionConfig,
createTime,
deny,
description,
expireTime,
flag,
state,
ttl,
updateTime
FROM google.apigee.security_actions
WHERE organizationsId = '{{ organizationsId }}' -- required
AND environmentsId = '{{ environmentsId }}' -- required
AND securityActionsId = '{{ securityActionsId }}' -- required;

INSERT examples

CreateSecurityAction creates a SecurityAction.

INSERT INTO google.apigee.security_actions (
data__name,
data__description,
data__state,
data__allow,
data__deny,
data__flag,
data__expireTime,
data__ttl,
data__apiProxies,
data__conditionConfig,
organizationsId,
environmentsId,
securityActionId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ state }}',
'{{ allow }}',
'{{ deny }}',
'{{ flag }}',
'{{ expireTime }}',
'{{ ttl }}',
'{{ apiProxies }}',
'{{ conditionConfig }}',
'{{ organizationsId }}',
'{{ environmentsId }}',
'{{ securityActionId }}'
RETURNING
name,
allow,
apiProxies,
conditionConfig,
createTime,
deny,
description,
expireTime,
flag,
state,
ttl,
updateTime
;

UPDATE examples

Update a SecurityAction.

UPDATE google.apigee.security_actions
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__state = '{{ state }}',
data__allow = '{{ allow }}',
data__deny = '{{ deny }}',
data__flag = '{{ flag }}',
data__expireTime = '{{ expireTime }}',
data__ttl = '{{ ttl }}',
data__apiProxies = '{{ apiProxies }}',
data__conditionConfig = '{{ conditionConfig }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND securityActionsId = '{{ securityActionsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
allow,
apiProxies,
conditionConfig,
createTime,
deny,
description,
expireTime,
flag,
state,
ttl,
updateTime;

DELETE examples

Delete a SecurityAction.

DELETE FROM google.apigee.security_actions
WHERE organizationsId = '{{ organizationsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND securityActionsId = '{{ securityActionsId }}' --required;

Lifecycle Methods

Enable a SecurityAction. The state of the SecurityAction after enabling is ENABLED. EnableSecurityAction can be called on SecurityActions in the state DISABLED; SecurityActions in a different state (including `ENABLED) return an error.

EXEC google.apigee.security_actions.organizations_environments_security_actions_enable 
@organizationsId='{{ organizationsId }}' --required,
@environmentsId='{{ environmentsId }}' --required,
@securityActionsId='{{ securityActionsId }}' --required;