Class Policy.Builder
- java.lang.Object
-
- com.oracle.bmc.identity.model.Policy.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Policy
build()
Policy.Builder
compartmentId(String compartmentId)
The OCID of the compartment containing the policy (either the tenancy or another compartment).Policy.Builder
copy(Policy model)
Policy.Builder
definedTags(Map<String,Map<String,Object>> definedTags)
Defined tags for this resource.Policy.Builder
description(String description)
The description you assign to the policy.Policy.Builder
freeformTags(Map<String,String> freeformTags)
Free-form tags for this resource.Policy.Builder
id(String id)
The OCID of the policy.Policy.Builder
inactiveStatus(Long inactiveStatus)
The detailed status of INACTIVE lifecycleState.Policy.Builder
lifecycleState(Policy.LifecycleState lifecycleState)
The policy’s current state.Policy.Builder
name(String name)
The name you assign to the policy during creation.Policy.Builder
statements(List<String> statements)
An array of one or more policy statements written in the policy language.Policy.Builder
timeCreated(Date timeCreated)
Date and time the policy was created, in the format defined by RFC3339.Policy.Builder
versionDate(Date versionDate)
The version of the policy.
-
-
-
Method Detail
-
id
public Policy.Builder id(String id)
The OCID of the policy.- Parameters:
id
- the value to set- Returns:
- this builder
-
compartmentId
public Policy.Builder compartmentId(String compartmentId)
The OCID of the compartment containing the policy (either the tenancy or another compartment).- Parameters:
compartmentId
- the value to set- Returns:
- this builder
-
name
public Policy.Builder name(String name)
The name you assign to the policy during creation.The name must be unique across all policies in the tenancy and cannot be changed.
- Parameters:
name
- the value to set- Returns:
- this builder
-
statements
public Policy.Builder statements(List<String> statements)
An array of one or more policy statements written in the policy language.- Parameters:
statements
- the value to set- Returns:
- this builder
-
description
public Policy.Builder description(String description)
The description you assign to the policy.Does not have to be unique, and it’s changeable.
- Parameters:
description
- the value to set- Returns:
- this builder
-
timeCreated
public Policy.Builder timeCreated(Date timeCreated)
Date and time the policy was created, in the format defined by RFC3339.Example: 2016-08-25T21:10:29.600Z
- Parameters:
timeCreated
- the value to set- Returns:
- this builder
-
lifecycleState
public Policy.Builder lifecycleState(Policy.LifecycleState lifecycleState)
The policy’s current state.After creating a policy, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
- Parameters:
lifecycleState
- the value to set- Returns:
- this builder
-
inactiveStatus
public Policy.Builder inactiveStatus(Long inactiveStatus)
The detailed status of INACTIVE lifecycleState.- Parameters:
inactiveStatus
- the value to set- Returns:
- this builder
-
versionDate
public Policy.Builder versionDate(Date versionDate)
The version of the policy.If null or set to an empty string, when a request comes in for authorization, the policy will be evaluated according to the current behavior of the services at that moment. If set to a particular date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date.
- Parameters:
versionDate
- the value to set- Returns:
- this builder
-
freeformTags
public Policy.Builder freeformTags(Map<String,String> freeformTags)
Free-form tags for this resource.Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {“Department”: “Finance”}
- Parameters:
freeformTags
- the value to set- Returns:
- this builder
-
definedTags
public Policy.Builder definedTags(Map<String,Map<String,Object>> definedTags)
Defined tags for this resource.Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {“Operations”: {“CostCenter”: “42”}}
- Parameters:
definedTags
- the value to set- Returns:
- this builder
-
build
public Policy build()
-
copy
public Policy.Builder copy(Policy model)
-
-