iampolicymanagementv1

package
v0.71.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 22

Documentation

Overview

Package iampolicymanagementv1 : Operations and models for the IamPolicyManagementV1 service

Index

Constants

View Source
const (
	CreateV2PolicyOptionsTypeAccessConst        = "access"
	CreateV2PolicyOptionsTypeAuthorizationConst = "authorization"
)

Constants associated with the CreateV2PolicyOptions.Type property. The policy type; either 'access' or 'authorization'.

View Source
const (
	ErrorObjectCodeInsufficentPermissionsConst        = "insufficent_permissions"
	ErrorObjectCodeInvalidBodyConst                   = "invalid_body"
	ErrorObjectCodeInvalidTokenConst                  = "invalid_token"
	ErrorObjectCodeMissingRequiredQueryParameterConst = "missing_required_query_parameter"
	ErrorObjectCodeNotFoundConst                      = "not_found"
	ErrorObjectCodePolicyAssignmentConflictErrorConst = "policy_assignment_conflict_error"
	ErrorObjectCodePolicyAssignmentNotFoundConst      = "policy_assignment_not_found"
	ErrorObjectCodePolicyConflictErrorConst           = "policy_conflict_error"
	ErrorObjectCodePolicyNotFoundConst                = "policy_not_found"
	ErrorObjectCodePolicyTemplateConflictErrorConst   = "policy_template_conflict_error"
	ErrorObjectCodePolicyTemplateNotFoundConst        = "policy_template_not_found"
	ErrorObjectCodeRequestNotProcessedConst           = "request_not_processed"
	ErrorObjectCodeRoleConflictErrorConst             = "role_conflict_error"
	ErrorObjectCodeRoleNotFoundConst                  = "role_not_found"
	ErrorObjectCodeTooManyRequestsConst               = "too_many_requests"
	ErrorObjectCodeUnableToProcessConst               = "unable_to_process"
	ErrorObjectCodeUnsupportedContentTypeConst        = "unsupported_content_type"
)

Constants associated with the ErrorObject.Code property. The API error code for the error.

View Source
const (
	GetPolicyAssignmentResponseStatusFailedConst            = "failed"
	GetPolicyAssignmentResponseStatusInProgressConst        = "in_progress"
	GetPolicyAssignmentResponseStatusSucceedWithErrorsConst = "succeed_with_errors"
	GetPolicyAssignmentResponseStatusSucceededConst         = "succeeded"
)

Constants associated with the GetPolicyAssignmentResponse.Status property. The policy assignment status.

View Source
const (
	GetPolicyAssignmentResponseTargetTypeAccountConst      = "Account"
	GetPolicyAssignmentResponseTargetTypeAccountgroupConst = "AccountGroup"
	GetPolicyAssignmentResponseTargetTypeEnterpriseConst   = "Enterprise"
)

Constants associated with the GetPolicyAssignmentResponse.TargetType property. Assignment target type.

View Source
const (
	GetPolicyAssignmentResponsePolicyAssignmentV1SubjectTypeAccessGroupIDConst = "access_group_id"
	GetPolicyAssignmentResponsePolicyAssignmentV1SubjectTypeIamIDConst         = "iam_id"
)

Constants associated with the GetPolicyAssignmentResponsePolicyAssignmentV1Subject.Type property.

View Source
const (
	GetPolicyAssignmentResponseSubjectTypeAccessGroupIDConst = "access_group_id"
	GetPolicyAssignmentResponseSubjectTypeIamIDConst         = "iam_id"
)

Constants associated with the GetPolicyAssignmentResponseSubject.Type property.

View Source
const (
	GetPolicyTemplateOptionsStateActiveConst  = "active"
	GetPolicyTemplateOptionsStateDeletedConst = "deleted"
)

Constants associated with the GetPolicyTemplateOptions.State property. The policy template state.

View Source
const (
	GetV2PolicyOptionsFormatDisplayConst           = "display"
	GetV2PolicyOptionsFormatIncludeLastPermitConst = "include_last_permit"
)

Constants associated with the GetV2PolicyOptions.Format property. Include additional data for policy returned * `include_last_permit` - returns details of when the policy last granted a permit decision and the number of times it has done so * `display` - returns the list of all actions included in each of the policy roles and translations for all relevant fields.

View Source
const (
	ListPoliciesOptionsTypeAccessConst        = "access"
	ListPoliciesOptionsTypeAuthorizationConst = "authorization"
)

Constants associated with the ListPoliciesOptions.Type property. Optional type of policy.

View Source
const (
	ListPoliciesOptionsServiceTypePlatformServiceConst = "platform_service"
	ListPoliciesOptionsServiceTypeServiceConst         = "service"
)

Constants associated with the ListPoliciesOptions.ServiceType property. Optional type of service.

View Source
const (
	ListPoliciesOptionsSortCreatedAtConst        = "created_at"
	ListPoliciesOptionsSortCreatedByIDConst      = "created_by_id"
	ListPoliciesOptionsSortHrefConst             = "href"
	ListPoliciesOptionsSortIDConst               = "id"
	ListPoliciesOptionsSortLastModifiedAtConst   = "last_modified_at"
	ListPoliciesOptionsSortLastModifiedByIDConst = "last_modified_by_id"
	ListPoliciesOptionsSortStateConst            = "state"
	ListPoliciesOptionsSortTypeConst             = "type"
)

Constants associated with the ListPoliciesOptions.Sort property. Optional top level policy field to sort results. Ascending sort is default. Descending sort available by prepending '-' to field. Example '-last_modified_at'.

View Source
const (
	ListPoliciesOptionsFormatDisplayConst           = "display"
	ListPoliciesOptionsFormatIncludeLastPermitConst = "include_last_permit"
)

Constants associated with the ListPoliciesOptions.Format property. Include additional data per policy returned * `include_last_permit` - returns details of when the policy last granted a permit decision and the number of times it has done so * `display` - returns the list of all actions included in each of the policy roles.

View Source
const (
	ListPoliciesOptionsStateActiveConst  = "active"
	ListPoliciesOptionsStateDeletedConst = "deleted"
)

Constants associated with the ListPoliciesOptions.State property. The state of the policy. * `active` - returns active policies * `deleted` - returns non-active policies.

View Source
const (
	ListPolicyTemplateVersionsOptionsStateActiveConst  = "active"
	ListPolicyTemplateVersionsOptionsStateDeletedConst = "deleted"
)

Constants associated with the ListPolicyTemplateVersionsOptions.State property. The policy template state.

View Source
const (
	ListPolicyTemplatesOptionsStateActiveConst  = "active"
	ListPolicyTemplatesOptionsStateDeletedConst = "deleted"
)

Constants associated with the ListPolicyTemplatesOptions.State property. The policy template state.

View Source
const (
	ListPolicyTemplatesOptionsPolicyServiceTypePlatformServiceConst = "platform_service"
	ListPolicyTemplatesOptionsPolicyServiceTypeServiceConst         = "service"
)

Constants associated with the ListPolicyTemplatesOptions.PolicyServiceType property. Service type, Optional.

View Source
const (
	ListPolicyTemplatesOptionsPolicyTypeAccessConst        = "access"
	ListPolicyTemplatesOptionsPolicyTypeAuthorizationConst = "authorization"
)

Constants associated with the ListPolicyTemplatesOptions.PolicyType property. Policy type, Optional.

View Source
const (
	ListV2PoliciesOptionsTypeAccessConst        = "access"
	ListV2PoliciesOptionsTypeAuthorizationConst = "authorization"
)

Constants associated with the ListV2PoliciesOptions.Type property. Optional type of policy.

View Source
const (
	ListV2PoliciesOptionsServiceTypePlatformServiceConst = "platform_service"
	ListV2PoliciesOptionsServiceTypeServiceConst         = "service"
)

Constants associated with the ListV2PoliciesOptions.ServiceType property. Optional type of service.

View Source
const (
	ListV2PoliciesOptionsFormatDisplayConst           = "display"
	ListV2PoliciesOptionsFormatIncludeLastPermitConst = "include_last_permit"
)

Constants associated with the ListV2PoliciesOptions.Format property. Include additional data per policy returned * `include_last_permit` - returns details of when the policy last granted a permit decision and the number of times it has done so * `display` - returns the list of all actions included in each of the policy roles and translations for all relevant fields.

View Source
const (
	ListV2PoliciesOptionsStateActiveConst  = "active"
	ListV2PoliciesOptionsStateDeletedConst = "deleted"
)

Constants associated with the ListV2PoliciesOptions.State property. The state of the policy. * `active` - returns active policies * `deleted` - returns non-active policies.

View Source
const (
	NestedConditionOperatorDategreaterthanConst             = "dateGreaterThan"
	NestedConditionOperatorDategreaterthanorequalsConst     = "dateGreaterThanOrEquals"
	NestedConditionOperatorDatelessthanConst                = "dateLessThan"
	NestedConditionOperatorDatelessthanorequalsConst        = "dateLessThanOrEquals"
	NestedConditionOperatorDatetimegreaterthanConst         = "dateTimeGreaterThan"
	NestedConditionOperatorDatetimegreaterthanorequalsConst = "dateTimeGreaterThanOrEquals"
	NestedConditionOperatorDatetimelessthanConst            = "dateTimeLessThan"
	NestedConditionOperatorDatetimelessthanorequalsConst    = "dateTimeLessThanOrEquals"
	NestedConditionOperatorDayofweekanyofConst              = "dayOfWeekAnyOf"
	NestedConditionOperatorDayofweekequalsConst             = "dayOfWeekEquals"
	NestedConditionOperatorStringequalsConst                = "stringEquals"
	NestedConditionOperatorStringequalsanyofConst           = "stringEqualsAnyOf"
	NestedConditionOperatorStringexistsConst                = "stringExists"
	NestedConditionOperatorStringmatchConst                 = "stringMatch"
	NestedConditionOperatorStringmatchanyofConst            = "stringMatchAnyOf"
	NestedConditionOperatorTimegreaterthanConst             = "timeGreaterThan"
	NestedConditionOperatorTimegreaterthanorequalsConst     = "timeGreaterThanOrEquals"
	NestedConditionOperatorTimelessthanConst                = "timeLessThan"
	NestedConditionOperatorTimelessthanorequalsConst        = "timeLessThanOrEquals"
)

Constants associated with the NestedCondition.Operator property. The operator of an attribute.

View Source
const (
	PolicyStateActiveConst  = "active"
	PolicyStateDeletedConst = "deleted"
)

Constants associated with the Policy.State property. The policy state.

View Source
const (
	PolicyAssignmentV1StatusFailedConst            = "failed"
	PolicyAssignmentV1StatusInProgressConst        = "in_progress"
	PolicyAssignmentV1StatusSucceedWithErrorsConst = "succeed_with_errors"
	PolicyAssignmentV1StatusSucceededConst         = "succeeded"
)

Constants associated with the PolicyAssignmentV1.Status property. The policy assignment status.

View Source
const (
	PolicyAssignmentV1SubjectTypeAccessGroupIDConst = "access_group_id"
	PolicyAssignmentV1SubjectTypeIamIDConst         = "iam_id"
)

Constants associated with the PolicyAssignmentV1Subject.Type property.

View Source
const (
	PolicyTemplateStateActiveConst  = "active"
	PolicyTemplateStateDeletedConst = "deleted"
)

Constants associated with the PolicyTemplate.State property. State of policy template.

View Source
const (
	PolicyTemplateAssignmentItemsStatusFailedConst            = "failed"
	PolicyTemplateAssignmentItemsStatusInProgressConst        = "in_progress"
	PolicyTemplateAssignmentItemsStatusSucceedWithErrorsConst = "succeed_with_errors"
	PolicyTemplateAssignmentItemsStatusSucceededConst         = "succeeded"
)

Constants associated with the PolicyTemplateAssignmentItems.Status property. The policy assignment status.

View Source
const (
	PolicyTemplateAssignmentItemsTargetTypeAccountConst      = "Account"
	PolicyTemplateAssignmentItemsTargetTypeAccountgroupConst = "AccountGroup"
	PolicyTemplateAssignmentItemsTargetTypeEnterpriseConst   = "Enterprise"
)

Constants associated with the PolicyTemplateAssignmentItems.TargetType property. Assignment target type.

View Source
const (
	PolicyTemplateLimitDataStateActiveConst  = "active"
	PolicyTemplateLimitDataStateDeletedConst = "deleted"
)

Constants associated with the PolicyTemplateLimitData.State property. State of policy template.

View Source
const (
	PolicyTemplateMetaDataStateActiveConst  = "active"
	PolicyTemplateMetaDataStateDeletedConst = "deleted"
)

Constants associated with the PolicyTemplateMetaData.State property. The policy state.

View Source
const (
	ReplaceV2PolicyOptionsTypeAccessConst        = "access"
	ReplaceV2PolicyOptionsTypeAuthorizationConst = "authorization"
)

Constants associated with the ReplaceV2PolicyOptions.Type property. The policy type; either 'access' or 'authorization'.

View Source
const (
	RuleAttributeOperatorDategreaterthanConst             = "dateGreaterThan"
	RuleAttributeOperatorDategreaterthanorequalsConst     = "dateGreaterThanOrEquals"
	RuleAttributeOperatorDatelessthanConst                = "dateLessThan"
	RuleAttributeOperatorDatelessthanorequalsConst        = "dateLessThanOrEquals"
	RuleAttributeOperatorDatetimegreaterthanConst         = "dateTimeGreaterThan"
	RuleAttributeOperatorDatetimegreaterthanorequalsConst = "dateTimeGreaterThanOrEquals"
	RuleAttributeOperatorDatetimelessthanConst            = "dateTimeLessThan"
	RuleAttributeOperatorDatetimelessthanorequalsConst    = "dateTimeLessThanOrEquals"
	RuleAttributeOperatorDayofweekanyofConst              = "dayOfWeekAnyOf"
	RuleAttributeOperatorDayofweekequalsConst             = "dayOfWeekEquals"
	RuleAttributeOperatorStringequalsConst                = "stringEquals"
	RuleAttributeOperatorStringequalsanyofConst           = "stringEqualsAnyOf"
	RuleAttributeOperatorStringexistsConst                = "stringExists"
	RuleAttributeOperatorStringmatchConst                 = "stringMatch"
	RuleAttributeOperatorStringmatchanyofConst            = "stringMatchAnyOf"
	RuleAttributeOperatorTimegreaterthanConst             = "timeGreaterThan"
	RuleAttributeOperatorTimegreaterthanorequalsConst     = "timeGreaterThanOrEquals"
	RuleAttributeOperatorTimelessthanConst                = "timeLessThan"
	RuleAttributeOperatorTimelessthanorequalsConst        = "timeLessThanOrEquals"
)

Constants associated with the RuleAttribute.Operator property. The operator of an attribute.

View Source
const (
	TemplatePolicyTypeAccessConst        = "access"
	TemplatePolicyTypeAuthorizationConst = "authorization"
)

Constants associated with the TemplatePolicy.Type property. The policy type; either 'access' or 'authorization'.

View Source
const (
	UpdatePolicyStateOptionsStateActiveConst  = "active"
	UpdatePolicyStateOptionsStateDeletedConst = "deleted"
)

Constants associated with the UpdatePolicyStateOptions.State property. The policy state.

View Source
const (
	V2PolicyTypeAccessConst        = "access"
	V2PolicyTypeAuthorizationConst = "authorization"
)

Constants associated with the V2Policy.Type property. The policy type; either 'access' or 'authorization'.

View Source
const (
	V2PolicyStateActiveConst  = "active"
	V2PolicyStateDeletedConst = "deleted"
)

Constants associated with the V2Policy.State property. The policy state, either 'deleted' or 'active'.

View Source
const (
	V2PolicyResourceAttributeOperatorStringequalsConst      = "stringEquals"
	V2PolicyResourceAttributeOperatorStringequalsanyofConst = "stringEqualsAnyOf"
	V2PolicyResourceAttributeOperatorStringexistsConst      = "stringExists"
	V2PolicyResourceAttributeOperatorStringmatchConst       = "stringMatch"
	V2PolicyResourceAttributeOperatorStringmatchanyofConst  = "stringMatchAnyOf"
)

Constants associated with the V2PolicyResourceAttribute.Operator property. The operator of an attribute.

View Source
const (
	V2PolicyResourceTagOperatorStringequalsConst = "stringEquals"
	V2PolicyResourceTagOperatorStringmatchConst  = "stringMatch"
)

Constants associated with the V2PolicyResourceTag.Operator property. The operator of an access management tag.

View Source
const (
	V2PolicyRuleOperatorDategreaterthanConst             = "dateGreaterThan"
	V2PolicyRuleOperatorDategreaterthanorequalsConst     = "dateGreaterThanOrEquals"
	V2PolicyRuleOperatorDatelessthanConst                = "dateLessThan"
	V2PolicyRuleOperatorDatelessthanorequalsConst        = "dateLessThanOrEquals"
	V2PolicyRuleOperatorDatetimegreaterthanConst         = "dateTimeGreaterThan"
	V2PolicyRuleOperatorDatetimegreaterthanorequalsConst = "dateTimeGreaterThanOrEquals"
	V2PolicyRuleOperatorDatetimelessthanConst            = "dateTimeLessThan"
	V2PolicyRuleOperatorDatetimelessthanorequalsConst    = "dateTimeLessThanOrEquals"
	V2PolicyRuleOperatorDayofweekanyofConst              = "dayOfWeekAnyOf"
	V2PolicyRuleOperatorDayofweekequalsConst             = "dayOfWeekEquals"
	V2PolicyRuleOperatorStringequalsConst                = "stringEquals"
	V2PolicyRuleOperatorStringequalsanyofConst           = "stringEqualsAnyOf"
	V2PolicyRuleOperatorStringexistsConst                = "stringExists"
	V2PolicyRuleOperatorStringmatchConst                 = "stringMatch"
	V2PolicyRuleOperatorStringmatchanyofConst            = "stringMatchAnyOf"
	V2PolicyRuleOperatorTimegreaterthanConst             = "timeGreaterThan"
	V2PolicyRuleOperatorTimegreaterthanorequalsConst     = "timeGreaterThanOrEquals"
	V2PolicyRuleOperatorTimelessthanConst                = "timeLessThan"
	V2PolicyRuleOperatorTimelessthanorequalsConst        = "timeLessThanOrEquals"
)

Constants associated with the V2PolicyRule.Operator property. The operator of an attribute.

View Source
const (
	V2PolicySubjectAttributeOperatorStringequalsConst = "stringEquals"
	V2PolicySubjectAttributeOperatorStringexistsConst = "stringExists"
)

Constants associated with the V2PolicySubjectAttribute.Operator property. The operator of an attribute.

View Source
const (
	V2PolicyTemplateMetaDataTypeAccessConst        = "access"
	V2PolicyTemplateMetaDataTypeAuthorizationConst = "authorization"
)

Constants associated with the V2PolicyTemplateMetaData.Type property. The policy type; either 'access' or 'authorization'.

View Source
const (
	V2PolicyTemplateMetaDataStateActiveConst  = "active"
	V2PolicyTemplateMetaDataStateDeletedConst = "deleted"
)

Constants associated with the V2PolicyTemplateMetaData.State property. The policy state, either 'deleted' or 'active'.

View Source
const (
	GetPolicyAssignmentResponsePolicyAssignmentTargetTypeAccountConst      = "Account"
	GetPolicyAssignmentResponsePolicyAssignmentTargetTypeAccountgroupConst = "AccountGroup"
	GetPolicyAssignmentResponsePolicyAssignmentTargetTypeEnterpriseConst   = "Enterprise"
)

Constants associated with the GetPolicyAssignmentResponsePolicyAssignment.TargetType property. Assignment target type.

View Source
const (
	GetPolicyAssignmentResponsePolicyAssignmentStatusFailedConst            = "failed"
	GetPolicyAssignmentResponsePolicyAssignmentStatusInProgressConst        = "in_progress"
	GetPolicyAssignmentResponsePolicyAssignmentStatusSucceedWithErrorsConst = "succeed_with_errors"
	GetPolicyAssignmentResponsePolicyAssignmentStatusSucceededConst         = "succeeded"
)

Constants associated with the GetPolicyAssignmentResponsePolicyAssignment.Status property. The policy assignment status.

View Source
const (
	GetPolicyAssignmentResponsePolicyAssignmentV1StatusFailedConst            = "failed"
	GetPolicyAssignmentResponsePolicyAssignmentV1StatusInProgressConst        = "in_progress"
	GetPolicyAssignmentResponsePolicyAssignmentV1StatusSucceedWithErrorsConst = "succeed_with_errors"
	GetPolicyAssignmentResponsePolicyAssignmentV1StatusSucceededConst         = "succeeded"
)

Constants associated with the GetPolicyAssignmentResponsePolicyAssignmentV1.Status property. The policy assignment status.

View Source
const (
	NestedConditionRuleAttributeOperatorDategreaterthanConst             = "dateGreaterThan"
	NestedConditionRuleAttributeOperatorDategreaterthanorequalsConst     = "dateGreaterThanOrEquals"
	NestedConditionRuleAttributeOperatorDatelessthanConst                = "dateLessThan"
	NestedConditionRuleAttributeOperatorDatelessthanorequalsConst        = "dateLessThanOrEquals"
	NestedConditionRuleAttributeOperatorDatetimegreaterthanConst         = "dateTimeGreaterThan"
	NestedConditionRuleAttributeOperatorDatetimegreaterthanorequalsConst = "dateTimeGreaterThanOrEquals"
	NestedConditionRuleAttributeOperatorDatetimelessthanConst            = "dateTimeLessThan"
	NestedConditionRuleAttributeOperatorDatetimelessthanorequalsConst    = "dateTimeLessThanOrEquals"
	NestedConditionRuleAttributeOperatorDayofweekanyofConst              = "dayOfWeekAnyOf"
	NestedConditionRuleAttributeOperatorDayofweekequalsConst             = "dayOfWeekEquals"
	NestedConditionRuleAttributeOperatorStringequalsConst                = "stringEquals"
	NestedConditionRuleAttributeOperatorStringequalsanyofConst           = "stringEqualsAnyOf"
	NestedConditionRuleAttributeOperatorStringexistsConst                = "stringExists"
	NestedConditionRuleAttributeOperatorStringmatchConst                 = "stringMatch"
	NestedConditionRuleAttributeOperatorStringmatchanyofConst            = "stringMatchAnyOf"
	NestedConditionRuleAttributeOperatorTimegreaterthanConst             = "timeGreaterThan"
	NestedConditionRuleAttributeOperatorTimegreaterthanorequalsConst     = "timeGreaterThanOrEquals"
	NestedConditionRuleAttributeOperatorTimelessthanConst                = "timeLessThan"
	NestedConditionRuleAttributeOperatorTimelessthanorequalsConst        = "timeLessThanOrEquals"
)

Constants associated with the NestedConditionRuleAttribute.Operator property. The operator of an attribute.

View Source
const (
	NestedConditionRuleWithConditionsOperatorAndConst = "and"
	NestedConditionRuleWithConditionsOperatorOrConst  = "or"
)

Constants associated with the NestedConditionRuleWithConditions.Operator property. Operator to evaluate conditions.

View Source
const (
	PolicyTemplateAssignmentItemsPolicyAssignmentTargetTypeAccountConst      = "Account"
	PolicyTemplateAssignmentItemsPolicyAssignmentTargetTypeAccountgroupConst = "AccountGroup"
	PolicyTemplateAssignmentItemsPolicyAssignmentTargetTypeEnterpriseConst   = "Enterprise"
)

Constants associated with the PolicyTemplateAssignmentItemsPolicyAssignment.TargetType property. Assignment target type.

View Source
const (
	PolicyTemplateAssignmentItemsPolicyAssignmentStatusFailedConst            = "failed"
	PolicyTemplateAssignmentItemsPolicyAssignmentStatusInProgressConst        = "in_progress"
	PolicyTemplateAssignmentItemsPolicyAssignmentStatusSucceedWithErrorsConst = "succeed_with_errors"
	PolicyTemplateAssignmentItemsPolicyAssignmentStatusSucceededConst         = "succeeded"
)

Constants associated with the PolicyTemplateAssignmentItemsPolicyAssignment.Status property. The policy assignment status.

View Source
const (
	PolicyTemplateAssignmentItemsPolicyAssignmentV1StatusFailedConst            = "failed"
	PolicyTemplateAssignmentItemsPolicyAssignmentV1StatusInProgressConst        = "in_progress"
	PolicyTemplateAssignmentItemsPolicyAssignmentV1StatusSucceedWithErrorsConst = "succeed_with_errors"
	PolicyTemplateAssignmentItemsPolicyAssignmentV1StatusSucceededConst         = "succeeded"
)

Constants associated with the PolicyTemplateAssignmentItemsPolicyAssignmentV1.Status property. The policy assignment status.

View Source
const (
	V2PolicyRuleRuleAttributeOperatorDategreaterthanConst             = "dateGreaterThan"
	V2PolicyRuleRuleAttributeOperatorDategreaterthanorequalsConst     = "dateGreaterThanOrEquals"
	V2PolicyRuleRuleAttributeOperatorDatelessthanConst                = "dateLessThan"
	V2PolicyRuleRuleAttributeOperatorDatelessthanorequalsConst        = "dateLessThanOrEquals"
	V2PolicyRuleRuleAttributeOperatorDatetimegreaterthanConst         = "dateTimeGreaterThan"
	V2PolicyRuleRuleAttributeOperatorDatetimegreaterthanorequalsConst = "dateTimeGreaterThanOrEquals"
	V2PolicyRuleRuleAttributeOperatorDatetimelessthanConst            = "dateTimeLessThan"
	V2PolicyRuleRuleAttributeOperatorDatetimelessthanorequalsConst    = "dateTimeLessThanOrEquals"
	V2PolicyRuleRuleAttributeOperatorDayofweekanyofConst              = "dayOfWeekAnyOf"
	V2PolicyRuleRuleAttributeOperatorDayofweekequalsConst             = "dayOfWeekEquals"
	V2PolicyRuleRuleAttributeOperatorStringequalsConst                = "stringEquals"
	V2PolicyRuleRuleAttributeOperatorStringequalsanyofConst           = "stringEqualsAnyOf"
	V2PolicyRuleRuleAttributeOperatorStringexistsConst                = "stringExists"
	V2PolicyRuleRuleAttributeOperatorStringmatchConst                 = "stringMatch"
	V2PolicyRuleRuleAttributeOperatorStringmatchanyofConst            = "stringMatchAnyOf"
	V2PolicyRuleRuleAttributeOperatorTimegreaterthanConst             = "timeGreaterThan"
	V2PolicyRuleRuleAttributeOperatorTimegreaterthanorequalsConst     = "timeGreaterThanOrEquals"
	V2PolicyRuleRuleAttributeOperatorTimelessthanConst                = "timeLessThan"
	V2PolicyRuleRuleAttributeOperatorTimelessthanorequalsConst        = "timeLessThanOrEquals"
)

Constants associated with the V2PolicyRuleRuleAttribute.Operator property. The operator of an attribute.

View Source
const (
	V2PolicyRuleRuleWithNestedConditionsOperatorAndConst = "and"
	V2PolicyRuleRuleWithNestedConditionsOperatorOrConst  = "or"
)

Constants associated with the V2PolicyRuleRuleWithNestedConditions.Operator property. Operator to evaluate conditions.

View Source
const (
	AssignmentTargetDetailsTypeAccountConst = "Account"
)

Constants associated with the AssignmentTargetDetails.Type property. Assignment target type.

View Source
const DefaultServiceName = "iam_policy_management"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://iam.cloud.ibm.com"

DefaultServiceURL is the default URL to make service requests to.

Variables

This section is empty.

Functions

func GetServiceURLForRegion added in v0.17.2

func GetServiceURLForRegion(region string) (string, error)

GetServiceURLForRegion returns the service URL to be used for the specified region

func UnmarshalAssignmentResourceCreated added in v0.43.0

func UnmarshalAssignmentResourceCreated(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAssignmentResourceCreated unmarshals an instance of AssignmentResourceCreated from the specified map of raw messages.

func UnmarshalAssignmentTargetDetails added in v0.62.4

func UnmarshalAssignmentTargetDetails(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAssignmentTargetDetails unmarshals an instance of AssignmentTargetDetails from the specified map of raw messages.

func UnmarshalAssignmentTemplateDetails added in v0.62.4

func UnmarshalAssignmentTemplateDetails(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAssignmentTemplateDetails unmarshals an instance of AssignmentTemplateDetails from the specified map of raw messages.

func UnmarshalConflictsWith added in v0.43.0

func UnmarshalConflictsWith(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalConflictsWith unmarshals an instance of ConflictsWith from the specified map of raw messages.

func UnmarshalControl added in v0.31.4

func UnmarshalControl(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalControl unmarshals an instance of Control from the specified map of raw messages.

func UnmarshalControlResponse added in v0.31.4

func UnmarshalControlResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalControlResponse unmarshals an instance of ControlResponse from the specified map of raw messages.

func UnmarshalControlResponseControl added in v0.31.4

func UnmarshalControlResponseControl(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalControlResponseControl unmarshals an instance of ControlResponseControl from the specified map of raw messages.

func UnmarshalControlResponseControlWithEnrichedRoles added in v0.31.5

func UnmarshalControlResponseControlWithEnrichedRoles(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalControlResponseControlWithEnrichedRoles unmarshals an instance of ControlResponseControlWithEnrichedRoles from the specified map of raw messages.

func UnmarshalCustomRole

func UnmarshalCustomRole(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCustomRole unmarshals an instance of CustomRole from the specified map of raw messages.

func UnmarshalEnrichedRoles added in v0.31.5

func UnmarshalEnrichedRoles(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalEnrichedRoles unmarshals an instance of EnrichedRoles from the specified map of raw messages.

func UnmarshalErrorDetails added in v0.43.0

func UnmarshalErrorDetails(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalErrorDetails unmarshals an instance of ErrorDetails from the specified map of raw messages.

func UnmarshalErrorObject added in v0.43.0

func UnmarshalErrorObject(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalErrorObject unmarshals an instance of ErrorObject from the specified map of raw messages.

func UnmarshalErrorResponse added in v0.43.0

func UnmarshalErrorResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalErrorResponse unmarshals an instance of ErrorResponse from the specified map of raw messages.

func UnmarshalGetPolicyAssignmentResponse added in v0.62.4

func UnmarshalGetPolicyAssignmentResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGetPolicyAssignmentResponse unmarshals an instance of GetPolicyAssignmentResponse from the specified map of raw messages.

func UnmarshalGetPolicyAssignmentResponsePolicyAssignment added in v0.62.4

func UnmarshalGetPolicyAssignmentResponsePolicyAssignment(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGetPolicyAssignmentResponsePolicyAssignment unmarshals an instance of GetPolicyAssignmentResponsePolicyAssignment from the specified map of raw messages.

func UnmarshalGetPolicyAssignmentResponsePolicyAssignmentV1 added in v0.62.4

func UnmarshalGetPolicyAssignmentResponsePolicyAssignmentV1(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGetPolicyAssignmentResponsePolicyAssignmentV1 unmarshals an instance of GetPolicyAssignmentResponsePolicyAssignmentV1 from the specified map of raw messages.

func UnmarshalGetPolicyAssignmentResponsePolicyAssignmentV1Subject added in v0.62.4

func UnmarshalGetPolicyAssignmentResponsePolicyAssignmentV1Subject(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGetPolicyAssignmentResponsePolicyAssignmentV1Subject unmarshals an instance of GetPolicyAssignmentResponsePolicyAssignmentV1Subject from the specified map of raw messages.

func UnmarshalGetPolicyAssignmentResponseSubject added in v0.62.4

func UnmarshalGetPolicyAssignmentResponseSubject(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGetPolicyAssignmentResponseSubject unmarshals an instance of GetPolicyAssignmentResponseSubject from the specified map of raw messages.

func UnmarshalGrant added in v0.31.5

func UnmarshalGrant(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGrant unmarshals an instance of Grant from the specified map of raw messages.

func UnmarshalGrantWithEnrichedRoles added in v0.31.5

func UnmarshalGrantWithEnrichedRoles(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalGrantWithEnrichedRoles unmarshals an instance of GrantWithEnrichedRoles from the specified map of raw messages.

func UnmarshalLimitData added in v0.52.1

func UnmarshalLimitData(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalLimitData unmarshals an instance of LimitData from the specified map of raw messages.

func UnmarshalNestedCondition added in v0.53.1

func UnmarshalNestedCondition(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalNestedCondition unmarshals an instance of NestedCondition from the specified map of raw messages.

func UnmarshalNestedConditionRuleAttribute added in v0.53.1

func UnmarshalNestedConditionRuleAttribute(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalNestedConditionRuleAttribute unmarshals an instance of NestedConditionRuleAttribute from the specified map of raw messages.

func UnmarshalNestedConditionRuleWithConditions added in v0.53.1

func UnmarshalNestedConditionRuleWithConditions(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalNestedConditionRuleWithConditions unmarshals an instance of NestedConditionRuleWithConditions from the specified map of raw messages.

func UnmarshalPolicy

func UnmarshalPolicy(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicy unmarshals an instance of Policy from the specified map of raw messages.

func UnmarshalPolicyAssignmentResourcePolicy added in v0.47.0

func UnmarshalPolicyAssignmentResourcePolicy(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyAssignmentResourcePolicy unmarshals an instance of PolicyAssignmentResourcePolicy from the specified map of raw messages.

func UnmarshalPolicyAssignmentResources added in v0.43.0

func UnmarshalPolicyAssignmentResources(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyAssignmentResources unmarshals an instance of PolicyAssignmentResources from the specified map of raw messages.

func UnmarshalPolicyAssignmentV1 added in v0.62.4

func UnmarshalPolicyAssignmentV1(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyAssignmentV1 unmarshals an instance of PolicyAssignmentV1 from the specified map of raw messages.

func UnmarshalPolicyAssignmentV1Collection added in v0.62.4

func UnmarshalPolicyAssignmentV1Collection(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyAssignmentV1Collection unmarshals an instance of PolicyAssignmentV1Collection from the specified map of raw messages.

func UnmarshalPolicyAssignmentV1Resources added in v0.62.4

func UnmarshalPolicyAssignmentV1Resources(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyAssignmentV1Resources unmarshals an instance of PolicyAssignmentV1Resources from the specified map of raw messages.

func UnmarshalPolicyAssignmentV1Subject added in v0.62.4

func UnmarshalPolicyAssignmentV1Subject(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyAssignmentV1Subject unmarshals an instance of PolicyAssignmentV1Subject from the specified map of raw messages.

func UnmarshalPolicyCollection added in v0.43.0

func UnmarshalPolicyCollection(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyCollection unmarshals an instance of PolicyCollection from the specified map of raw messages.

func UnmarshalPolicyResource

func UnmarshalPolicyResource(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyResource unmarshals an instance of PolicyResource from the specified map of raw messages.

func UnmarshalPolicyRole

func UnmarshalPolicyRole(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyRole unmarshals an instance of PolicyRole from the specified map of raw messages.

func UnmarshalPolicySubject

func UnmarshalPolicySubject(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicySubject unmarshals an instance of PolicySubject from the specified map of raw messages.

func UnmarshalPolicyTemplate added in v0.43.0

func UnmarshalPolicyTemplate(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyTemplate unmarshals an instance of PolicyTemplate from the specified map of raw messages.

func UnmarshalPolicyTemplateAssignmentCollection added in v0.43.0

func UnmarshalPolicyTemplateAssignmentCollection(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyTemplateAssignmentCollection unmarshals an instance of PolicyTemplateAssignmentCollection from the specified map of raw messages.

func UnmarshalPolicyTemplateAssignmentItems added in v0.62.4

func UnmarshalPolicyTemplateAssignmentItems(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyTemplateAssignmentItems unmarshals an instance of PolicyTemplateAssignmentItems from the specified map of raw messages.

func UnmarshalPolicyTemplateAssignmentItemsPolicyAssignment added in v0.62.4

func UnmarshalPolicyTemplateAssignmentItemsPolicyAssignment(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyTemplateAssignmentItemsPolicyAssignment unmarshals an instance of PolicyTemplateAssignmentItemsPolicyAssignment from the specified map of raw messages.

func UnmarshalPolicyTemplateAssignmentItemsPolicyAssignmentV1 added in v0.62.4

func UnmarshalPolicyTemplateAssignmentItemsPolicyAssignmentV1(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyTemplateAssignmentItemsPolicyAssignmentV1 unmarshals an instance of PolicyTemplateAssignmentItemsPolicyAssignmentV1 from the specified map of raw messages.

func UnmarshalPolicyTemplateCollection added in v0.43.0

func UnmarshalPolicyTemplateCollection(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyTemplateCollection unmarshals an instance of PolicyTemplateCollection from the specified map of raw messages.

func UnmarshalPolicyTemplateLimitData added in v0.52.1

func UnmarshalPolicyTemplateLimitData(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyTemplateLimitData unmarshals an instance of PolicyTemplateLimitData from the specified map of raw messages.

func UnmarshalPolicyTemplateMetaData added in v0.47.0

func UnmarshalPolicyTemplateMetaData(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyTemplateMetaData unmarshals an instance of PolicyTemplateMetaData from the specified map of raw messages.

func UnmarshalPolicyTemplateVersionsCollection added in v0.43.0

func UnmarshalPolicyTemplateVersionsCollection(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPolicyTemplateVersionsCollection unmarshals an instance of PolicyTemplateVersionsCollection from the specified map of raw messages.

func UnmarshalResourceAttribute

func UnmarshalResourceAttribute(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResourceAttribute unmarshals an instance of ResourceAttribute from the specified map of raw messages.

func UnmarshalResourceTag added in v0.17.15

func UnmarshalResourceTag(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResourceTag unmarshals an instance of ResourceTag from the specified map of raw messages.

func UnmarshalRole

func UnmarshalRole(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRole unmarshals an instance of Role from the specified map of raw messages.

func UnmarshalRoleAction added in v0.31.4

func UnmarshalRoleAction(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRoleAction unmarshals an instance of RoleAction from the specified map of raw messages.

func UnmarshalRoleCollection added in v0.43.0

func UnmarshalRoleCollection(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRoleCollection unmarshals an instance of RoleCollection from the specified map of raw messages.

func UnmarshalRoles added in v0.31.5

func UnmarshalRoles(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRoles unmarshals an instance of Roles from the specified map of raw messages.

func UnmarshalRuleAttribute added in v0.31.4

func UnmarshalRuleAttribute(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleAttribute unmarshals an instance of RuleAttribute from the specified map of raw messages.

func UnmarshalSubjectAttribute

func UnmarshalSubjectAttribute(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSubjectAttribute unmarshals an instance of SubjectAttribute from the specified map of raw messages.

func UnmarshalTemplateCountData added in v0.52.1

func UnmarshalTemplateCountData(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTemplateCountData unmarshals an instance of TemplateCountData from the specified map of raw messages.

func UnmarshalTemplateMetadata added in v0.43.0

func UnmarshalTemplateMetadata(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTemplateMetadata unmarshals an instance of TemplateMetadata from the specified map of raw messages.

func UnmarshalTemplatePolicy added in v0.43.0

func UnmarshalTemplatePolicy(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTemplatePolicy unmarshals an instance of TemplatePolicy from the specified map of raw messages.

func UnmarshalV2Policy added in v0.30.0

func UnmarshalV2Policy(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalV2Policy unmarshals an instance of V2Policy from the specified map of raw messages.

func UnmarshalV2PolicyCollection added in v0.31.4

func UnmarshalV2PolicyCollection(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalV2PolicyCollection unmarshals an instance of V2PolicyCollection from the specified map of raw messages.

func UnmarshalV2PolicyResource added in v0.31.4

func UnmarshalV2PolicyResource(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalV2PolicyResource unmarshals an instance of V2PolicyResource from the specified map of raw messages.

func UnmarshalV2PolicyResourceAttribute added in v0.31.4

func UnmarshalV2PolicyResourceAttribute(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalV2PolicyResourceAttribute unmarshals an instance of V2PolicyResourceAttribute from the specified map of raw messages.

func UnmarshalV2PolicyResourceTag added in v0.31.4

func UnmarshalV2PolicyResourceTag(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalV2PolicyResourceTag unmarshals an instance of V2PolicyResourceTag from the specified map of raw messages.

func UnmarshalV2PolicyRule added in v0.31.4

func UnmarshalV2PolicyRule(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalV2PolicyRule unmarshals an instance of V2PolicyRule from the specified map of raw messages.

func UnmarshalV2PolicyRuleRuleAttribute added in v0.31.4

func UnmarshalV2PolicyRuleRuleAttribute(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalV2PolicyRuleRuleAttribute unmarshals an instance of V2PolicyRuleRuleAttribute from the specified map of raw messages.

func UnmarshalV2PolicyRuleRuleWithNestedConditions added in v0.53.1

func UnmarshalV2PolicyRuleRuleWithNestedConditions(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalV2PolicyRuleRuleWithNestedConditions unmarshals an instance of V2PolicyRuleRuleWithNestedConditions from the specified map of raw messages.

func UnmarshalV2PolicySubject added in v0.31.4

func UnmarshalV2PolicySubject(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalV2PolicySubject unmarshals an instance of V2PolicySubject from the specified map of raw messages.

func UnmarshalV2PolicySubjectAttribute added in v0.31.4

func UnmarshalV2PolicySubjectAttribute(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalV2PolicySubjectAttribute unmarshals an instance of V2PolicySubjectAttribute from the specified map of raw messages.

func UnmarshalV2PolicyTemplateMetaData added in v0.47.0

func UnmarshalV2PolicyTemplateMetaData(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalV2PolicyTemplateMetaData unmarshals an instance of V2PolicyTemplateMetaData from the specified map of raw messages.

Types

type AssignmentResourceCreated added in v0.43.0

type AssignmentResourceCreated struct {
	// policy id.
	ID *string `json:"id,omitempty"`
}

AssignmentResourceCreated : On success, includes the policy assigned.

type AssignmentTargetDetails added in v0.62.4

type AssignmentTargetDetails struct {
	// Assignment target type.
	Type *string `json:"type,omitempty"`

	// ID of the target account.
	ID *string `json:"id,omitempty"`
}

AssignmentTargetDetails : assignment target account and type.

type AssignmentTemplateDetails added in v0.62.4

type AssignmentTemplateDetails struct {
	// policy template id.
	ID *string `json:"id,omitempty"`

	// policy template version.
	Version *string `json:"version,omitempty"`
}

AssignmentTemplateDetails : policy template details.

type CommitPolicyTemplateOptions added in v0.43.0

type CommitPolicyTemplateOptions struct {
	// The policy template ID.
	PolicyTemplateID *string `json:"policy_template_id" validate:"required,ne="`

	// The policy template version.
	Version *string `json:"version" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CommitPolicyTemplateOptions : The CommitPolicyTemplate options.

func (*CommitPolicyTemplateOptions) SetHeaders added in v0.43.0

func (options *CommitPolicyTemplateOptions) SetHeaders(param map[string]string) *CommitPolicyTemplateOptions

SetHeaders : Allow user to set Headers

func (*CommitPolicyTemplateOptions) SetPolicyTemplateID added in v0.43.0

func (_options *CommitPolicyTemplateOptions) SetPolicyTemplateID(policyTemplateID string) *CommitPolicyTemplateOptions

SetPolicyTemplateID : Allow user to set PolicyTemplateID

func (*CommitPolicyTemplateOptions) SetVersion added in v0.43.0

func (_options *CommitPolicyTemplateOptions) SetVersion(version string) *CommitPolicyTemplateOptions

SetVersion : Allow user to set Version

type ConflictsWith added in v0.43.0

type ConflictsWith struct {
	// The revision number of the resource.
	Etag *string `json:"etag,omitempty"`

	// The conflicting role id.
	Role *string `json:"role,omitempty"`

	// The conflicting policy id.
	Policy *string `json:"policy,omitempty"`
}

ConflictsWith : Details of conflicting resource.

type Control added in v0.31.4

type Control struct {
	// Permission granted by the policy.
	Grant *Grant `json:"grant" validate:"required"`
}

Control : Specifies the type of access granted by the policy.

type ControlResponse added in v0.31.4

type ControlResponse struct {
	// Permission granted by the policy.
	Grant *Grant `json:"grant,omitempty"`
}

ControlResponse : ControlResponse struct Models which "extend" this model: - ControlResponseControl - ControlResponseControlWithEnrichedRoles

type ControlResponseControl added in v0.31.4

type ControlResponseControl struct {
	// Permission granted by the policy.
	Grant *Grant `json:"grant" validate:"required"`
}

ControlResponseControl : Specifies the type of access granted by the policy. This model "extends" ControlResponse

type ControlResponseControlWithEnrichedRoles added in v0.31.5

type ControlResponseControlWithEnrichedRoles struct {
	// Permission granted by the policy with translated roles and additional role information.
	Grant *GrantWithEnrichedRoles `json:"grant" validate:"required"`
}

ControlResponseControlWithEnrichedRoles : Specifies the type of access granted by the policy with additional role information. This model "extends" ControlResponse

type ControlResponseIntf added in v0.31.4

type ControlResponseIntf interface {
	// contains filtered or unexported methods
}

type CreatePolicyOptions

type CreatePolicyOptions struct {
	// The policy type; either 'access' or 'authorization'.
	Type *string `json:"type" validate:"required"`

	// The subjects associated with a policy.
	Subjects []PolicySubject `json:"subjects" validate:"required"`

	// A set of role cloud resource names (CRNs) granted by the policy.
	Roles []PolicyRole `json:"roles" validate:"required"`

	// The resources associated with a policy.
	Resources []PolicyResource `json:"resources" validate:"required"`

	// Customer-defined description.
	Description *string `json:"description,omitempty"`

	// Language code for translations
	// * `default` - English
	// * `de` -  German (Standard)
	// * `en` - English
	// * `es` - Spanish (Spain)
	// * `fr` - French (Standard)
	// * `it` - Italian (Standard)
	// * `ja` - Japanese
	// * `ko` - Korean
	// * `pt-br` - Portuguese (Brazil)
	// * `zh-cn` - Chinese (Simplified, PRC)
	// * `zh-tw` - (Chinese, Taiwan).
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreatePolicyOptions : The CreatePolicy options.

func (*CreatePolicyOptions) SetAcceptLanguage

func (_options *CreatePolicyOptions) SetAcceptLanguage(acceptLanguage string) *CreatePolicyOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*CreatePolicyOptions) SetDescription added in v0.17.2

func (_options *CreatePolicyOptions) SetDescription(description string) *CreatePolicyOptions

SetDescription : Allow user to set Description

func (*CreatePolicyOptions) SetHeaders

func (options *CreatePolicyOptions) SetHeaders(param map[string]string) *CreatePolicyOptions

SetHeaders : Allow user to set Headers

func (*CreatePolicyOptions) SetResources

func (_options *CreatePolicyOptions) SetResources(resources []PolicyResource) *CreatePolicyOptions

SetResources : Allow user to set Resources

func (*CreatePolicyOptions) SetRoles

func (_options *CreatePolicyOptions) SetRoles(roles []PolicyRole) *CreatePolicyOptions

SetRoles : Allow user to set Roles

func (*CreatePolicyOptions) SetSubjects

func (_options *CreatePolicyOptions) SetSubjects(subjects []PolicySubject) *CreatePolicyOptions

SetSubjects : Allow user to set Subjects

func (*CreatePolicyOptions) SetType

func (_options *CreatePolicyOptions) SetType(typeVar string) *CreatePolicyOptions

SetType : Allow user to set Type

type CreatePolicyTemplateAssignmentOptions added in v0.62.4

type CreatePolicyTemplateAssignmentOptions struct {
	// specify version of response body format.
	Version *string `json:"version" validate:"required"`

	// assignment target account and type.
	Target *AssignmentTargetDetails `json:"target" validate:"required"`

	// List of template details for policy assignment.
	Templates []AssignmentTemplateDetails `json:"templates" validate:"required"`

	// Language code for translations
	// * `default` - English
	// * `de` -  German (Standard)
	// * `en` - English
	// * `es` - Spanish (Spain)
	// * `fr` - French (Standard)
	// * `it` - Italian (Standard)
	// * `ja` - Japanese
	// * `ko` - Korean
	// * `pt-br` - Portuguese (Brazil)
	// * `zh-cn` - Chinese (Simplified, PRC)
	// * `zh-tw` - (Chinese, Taiwan).
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreatePolicyTemplateAssignmentOptions : The CreatePolicyTemplateAssignment options.

func (*CreatePolicyTemplateAssignmentOptions) SetAcceptLanguage added in v0.62.4

func (_options *CreatePolicyTemplateAssignmentOptions) SetAcceptLanguage(acceptLanguage string) *CreatePolicyTemplateAssignmentOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*CreatePolicyTemplateAssignmentOptions) SetHeaders added in v0.62.4

SetHeaders : Allow user to set Headers

func (*CreatePolicyTemplateAssignmentOptions) SetTarget added in v0.62.4

SetTarget : Allow user to set Target

func (*CreatePolicyTemplateAssignmentOptions) SetTemplates added in v0.62.4

SetTemplates : Allow user to set Templates

func (*CreatePolicyTemplateAssignmentOptions) SetVersion added in v0.62.4

SetVersion : Allow user to set Version

type CreatePolicyTemplateOptions added in v0.43.0

type CreatePolicyTemplateOptions struct {
	// Required field when creating a new template. Otherwise this field is optional. If the field is included it will
	// change the name value for all existing versions of the template.
	Name *string `json:"name" validate:"required"`

	// Enterprise account ID where this template will be created.
	AccountID *string `json:"account_id" validate:"required"`

	// The core set of properties associated with the template's policy objet.
	Policy *TemplatePolicy `json:"policy" validate:"required"`

	// Description of the policy template. This is shown to users in the enterprise account. Use this to describe the
	// purpose or context of the policy for enterprise users managing IAM templates.
	Description *string `json:"description,omitempty"`

	// Committed status of the template.
	Committed *bool `json:"committed,omitempty"`

	// Language code for translations
	// * `default` - English
	// * `de` -  German (Standard)
	// * `en` - English
	// * `es` - Spanish (Spain)
	// * `fr` - French (Standard)
	// * `it` - Italian (Standard)
	// * `ja` - Japanese
	// * `ko` - Korean
	// * `pt-br` - Portuguese (Brazil)
	// * `zh-cn` - Chinese (Simplified, PRC)
	// * `zh-tw` - (Chinese, Taiwan).
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreatePolicyTemplateOptions : The CreatePolicyTemplate options.

func (*CreatePolicyTemplateOptions) SetAcceptLanguage added in v0.43.0

func (_options *CreatePolicyTemplateOptions) SetAcceptLanguage(acceptLanguage string) *CreatePolicyTemplateOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*CreatePolicyTemplateOptions) SetAccountID added in v0.43.0

func (_options *CreatePolicyTemplateOptions) SetAccountID(accountID string) *CreatePolicyTemplateOptions

SetAccountID : Allow user to set AccountID

func (*CreatePolicyTemplateOptions) SetCommitted added in v0.43.0

func (_options *CreatePolicyTemplateOptions) SetCommitted(committed bool) *CreatePolicyTemplateOptions

SetCommitted : Allow user to set Committed

func (*CreatePolicyTemplateOptions) SetDescription added in v0.43.0

func (_options *CreatePolicyTemplateOptions) SetDescription(description string) *CreatePolicyTemplateOptions

SetDescription : Allow user to set Description

func (*CreatePolicyTemplateOptions) SetHeaders added in v0.43.0

func (options *CreatePolicyTemplateOptions) SetHeaders(param map[string]string) *CreatePolicyTemplateOptions

SetHeaders : Allow user to set Headers

func (*CreatePolicyTemplateOptions) SetName added in v0.43.0

SetName : Allow user to set Name

func (*CreatePolicyTemplateOptions) SetPolicy added in v0.43.0

SetPolicy : Allow user to set Policy

type CreatePolicyTemplateVersionOptions added in v0.43.0

type CreatePolicyTemplateVersionOptions struct {
	// The policy template ID.
	PolicyTemplateID *string `json:"policy_template_id" validate:"required,ne="`

	// The core set of properties associated with the template's policy objet.
	Policy *TemplatePolicy `json:"policy" validate:"required"`

	// Required field when creating a new template. Otherwise this field is optional. If the field is included it will
	// change the name value for all existing versions of the template.
	Name *string `json:"name,omitempty"`

	// Description of the policy template. This is shown to users in the enterprise account. Use this to describe the
	// purpose or context of the policy for enterprise users managing IAM templates.
	Description *string `json:"description,omitempty"`

	// Committed status of the template version.
	Committed *bool `json:"committed,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreatePolicyTemplateVersionOptions : The CreatePolicyTemplateVersion options.

func (*CreatePolicyTemplateVersionOptions) SetCommitted added in v0.43.0

SetCommitted : Allow user to set Committed

func (*CreatePolicyTemplateVersionOptions) SetDescription added in v0.43.0

func (_options *CreatePolicyTemplateVersionOptions) SetDescription(description string) *CreatePolicyTemplateVersionOptions

SetDescription : Allow user to set Description

func (*CreatePolicyTemplateVersionOptions) SetHeaders added in v0.43.0

SetHeaders : Allow user to set Headers

func (*CreatePolicyTemplateVersionOptions) SetName added in v0.47.0

SetName : Allow user to set Name

func (*CreatePolicyTemplateVersionOptions) SetPolicy added in v0.43.0

SetPolicy : Allow user to set Policy

func (*CreatePolicyTemplateVersionOptions) SetPolicyTemplateID added in v0.43.0

func (_options *CreatePolicyTemplateVersionOptions) SetPolicyTemplateID(policyTemplateID string) *CreatePolicyTemplateVersionOptions

SetPolicyTemplateID : Allow user to set PolicyTemplateID

type CreateRoleOptions

type CreateRoleOptions struct {
	// The display name of the role that is shown in the console.
	DisplayName *string `json:"display_name" validate:"required"`

	// The actions of the role. For more information, see [IAM roles and
	// actions](https://cloud.ibm.com/docs/account?topic=account-iam-service-roles-actions).
	Actions []string `json:"actions" validate:"required"`

	// The name of the role that is used in the CRN. Can only be alphanumeric and has to be capitalized.
	Name *string `json:"name" validate:"required"`

	// The account GUID.
	AccountID *string `json:"account_id" validate:"required"`

	// The service name.
	ServiceName *string `json:"service_name" validate:"required"`

	// The description of the role.
	Description *string `json:"description,omitempty"`

	// Language code for translations
	// * `default` - English
	// * `de` -  German (Standard)
	// * `en` - English
	// * `es` - Spanish (Spain)
	// * `fr` - French (Standard)
	// * `it` - Italian (Standard)
	// * `ja` - Japanese
	// * `ko` - Korean
	// * `pt-br` - Portuguese (Brazil)
	// * `zh-cn` - Chinese (Simplified, PRC)
	// * `zh-tw` - (Chinese, Taiwan).
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateRoleOptions : The CreateRole options.

func (*CreateRoleOptions) SetAcceptLanguage

func (_options *CreateRoleOptions) SetAcceptLanguage(acceptLanguage string) *CreateRoleOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*CreateRoleOptions) SetAccountID

func (_options *CreateRoleOptions) SetAccountID(accountID string) *CreateRoleOptions

SetAccountID : Allow user to set AccountID

func (*CreateRoleOptions) SetActions

func (_options *CreateRoleOptions) SetActions(actions []string) *CreateRoleOptions

SetActions : Allow user to set Actions

func (*CreateRoleOptions) SetDescription

func (_options *CreateRoleOptions) SetDescription(description string) *CreateRoleOptions

SetDescription : Allow user to set Description

func (*CreateRoleOptions) SetDisplayName

func (_options *CreateRoleOptions) SetDisplayName(displayName string) *CreateRoleOptions

SetDisplayName : Allow user to set DisplayName

func (*CreateRoleOptions) SetHeaders

func (options *CreateRoleOptions) SetHeaders(param map[string]string) *CreateRoleOptions

SetHeaders : Allow user to set Headers

func (*CreateRoleOptions) SetName

func (_options *CreateRoleOptions) SetName(name string) *CreateRoleOptions

SetName : Allow user to set Name

func (*CreateRoleOptions) SetServiceName

func (_options *CreateRoleOptions) SetServiceName(serviceName string) *CreateRoleOptions

SetServiceName : Allow user to set ServiceName

type CreateV2PolicyOptions added in v0.31.4

type CreateV2PolicyOptions struct {
	// Specifies the type of access granted by the policy.
	Control *Control `json:"control" validate:"required"`

	// The policy type; either 'access' or 'authorization'.
	Type *string `json:"type" validate:"required"`

	// Description of the policy.
	Description *string `json:"description,omitempty"`

	// The subject attributes for whom the policy grants access.
	Subject *V2PolicySubject `json:"subject,omitempty"`

	// The resource attributes to which the policy grants access.
	Resource *V2PolicyResource `json:"resource,omitempty"`

	// Indicates pattern of rule, either 'time-based-conditions:once', 'time-based-conditions:weekly:all-day', or
	// 'time-based-conditions:weekly:custom-hours'.
	Pattern *string `json:"pattern,omitempty"`

	// Additional access conditions associated with the policy.
	Rule V2PolicyRuleIntf `json:"rule,omitempty"`

	// Language code for translations
	// * `default` - English
	// * `de` -  German (Standard)
	// * `en` - English
	// * `es` - Spanish (Spain)
	// * `fr` - French (Standard)
	// * `it` - Italian (Standard)
	// * `ja` - Japanese
	// * `ko` - Korean
	// * `pt-br` - Portuguese (Brazil)
	// * `zh-cn` - Chinese (Simplified, PRC)
	// * `zh-tw` - (Chinese, Taiwan).
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateV2PolicyOptions : The CreateV2Policy options.

func (*CreateV2PolicyOptions) SetAcceptLanguage added in v0.31.4

func (_options *CreateV2PolicyOptions) SetAcceptLanguage(acceptLanguage string) *CreateV2PolicyOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*CreateV2PolicyOptions) SetControl added in v0.31.4

func (_options *CreateV2PolicyOptions) SetControl(control *Control) *CreateV2PolicyOptions

SetControl : Allow user to set Control

func (*CreateV2PolicyOptions) SetDescription added in v0.31.4

func (_options *CreateV2PolicyOptions) SetDescription(description string) *CreateV2PolicyOptions

SetDescription : Allow user to set Description

func (*CreateV2PolicyOptions) SetHeaders added in v0.31.4

func (options *CreateV2PolicyOptions) SetHeaders(param map[string]string) *CreateV2PolicyOptions

SetHeaders : Allow user to set Headers

func (*CreateV2PolicyOptions) SetPattern added in v0.31.4

func (_options *CreateV2PolicyOptions) SetPattern(pattern string) *CreateV2PolicyOptions

SetPattern : Allow user to set Pattern

func (*CreateV2PolicyOptions) SetResource added in v0.31.4

func (_options *CreateV2PolicyOptions) SetResource(resource *V2PolicyResource) *CreateV2PolicyOptions

SetResource : Allow user to set Resource

func (*CreateV2PolicyOptions) SetRule added in v0.31.4

SetRule : Allow user to set Rule

func (*CreateV2PolicyOptions) SetSubject added in v0.31.4

func (_options *CreateV2PolicyOptions) SetSubject(subject *V2PolicySubject) *CreateV2PolicyOptions

SetSubject : Allow user to set Subject

func (*CreateV2PolicyOptions) SetType added in v0.31.4

func (_options *CreateV2PolicyOptions) SetType(typeVar string) *CreateV2PolicyOptions

SetType : Allow user to set Type

type CustomRole

type CustomRole struct {
	// The role ID. Composed of hexadecimal characters.
	ID *string `json:"id,omitempty"`

	// The display name of the role that is shown in the console.
	DisplayName *string `json:"display_name" validate:"required"`

	// The description of the role.
	Description *string `json:"description,omitempty"`

	// The actions of the role. For more information, see [IAM roles and
	// actions](https://cloud.ibm.com/docs/account?topic=account-iam-service-roles-actions).
	Actions []string `json:"actions" validate:"required"`

	// The role Cloud Resource Name (CRN). Example CRN:
	// 'crn:v1:ibmcloud:public:iam-access-management::a/exampleAccountId::customRole:ExampleRoleName'.
	CRN *string `json:"crn,omitempty"`

	// The name of the role that is used in the CRN. Can only be alphanumeric and has to be capitalized.
	Name *string `json:"name" validate:"required"`

	// The account GUID.
	AccountID *string `json:"account_id" validate:"required"`

	// The service name.
	ServiceName *string `json:"service_name" validate:"required"`

	// The UTC timestamp when the role was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the role.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the role was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`

	// The href link back to the role.
	Href *string `json:"href,omitempty"`
}

CustomRole : An additional set of properties associated with a role.

type DeletePolicyAssignmentOptions added in v0.62.4

type DeletePolicyAssignmentOptions struct {
	// The policy template assignment ID.
	AssignmentID *string `json:"assignment_id" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeletePolicyAssignmentOptions : The DeletePolicyAssignment options.

func (*DeletePolicyAssignmentOptions) SetAssignmentID added in v0.62.4

func (_options *DeletePolicyAssignmentOptions) SetAssignmentID(assignmentID string) *DeletePolicyAssignmentOptions

SetAssignmentID : Allow user to set AssignmentID

func (*DeletePolicyAssignmentOptions) SetHeaders added in v0.62.4

SetHeaders : Allow user to set Headers

type DeletePolicyOptions

type DeletePolicyOptions struct {
	// The policy ID.
	PolicyID *string `json:"policy_id" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeletePolicyOptions : The DeletePolicy options.

func (*DeletePolicyOptions) SetHeaders

func (options *DeletePolicyOptions) SetHeaders(param map[string]string) *DeletePolicyOptions

SetHeaders : Allow user to set Headers

func (*DeletePolicyOptions) SetPolicyID

func (_options *DeletePolicyOptions) SetPolicyID(policyID string) *DeletePolicyOptions

SetPolicyID : Allow user to set PolicyID

type DeletePolicyTemplateOptions added in v0.43.0

type DeletePolicyTemplateOptions struct {
	// The policy template ID.
	PolicyTemplateID *string `json:"policy_template_id" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeletePolicyTemplateOptions : The DeletePolicyTemplate options.

func (*DeletePolicyTemplateOptions) SetHeaders added in v0.43.0

func (options *DeletePolicyTemplateOptions) SetHeaders(param map[string]string) *DeletePolicyTemplateOptions

SetHeaders : Allow user to set Headers

func (*DeletePolicyTemplateOptions) SetPolicyTemplateID added in v0.43.0

func (_options *DeletePolicyTemplateOptions) SetPolicyTemplateID(policyTemplateID string) *DeletePolicyTemplateOptions

SetPolicyTemplateID : Allow user to set PolicyTemplateID

type DeletePolicyTemplateVersionOptions added in v0.43.0

type DeletePolicyTemplateVersionOptions struct {
	// The policy template ID.
	PolicyTemplateID *string `json:"policy_template_id" validate:"required,ne="`

	// The policy template version.
	Version *string `json:"version" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeletePolicyTemplateVersionOptions : The DeletePolicyTemplateVersion options.

func (*DeletePolicyTemplateVersionOptions) SetHeaders added in v0.43.0

SetHeaders : Allow user to set Headers

func (*DeletePolicyTemplateVersionOptions) SetPolicyTemplateID added in v0.43.0

func (_options *DeletePolicyTemplateVersionOptions) SetPolicyTemplateID(policyTemplateID string) *DeletePolicyTemplateVersionOptions

SetPolicyTemplateID : Allow user to set PolicyTemplateID

func (*DeletePolicyTemplateVersionOptions) SetVersion added in v0.43.0

SetVersion : Allow user to set Version

type DeleteRoleOptions

type DeleteRoleOptions struct {
	// The role ID.
	RoleID *string `json:"role_id" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteRoleOptions : The DeleteRole options.

func (*DeleteRoleOptions) SetHeaders

func (options *DeleteRoleOptions) SetHeaders(param map[string]string) *DeleteRoleOptions

SetHeaders : Allow user to set Headers

func (*DeleteRoleOptions) SetRoleID

func (_options *DeleteRoleOptions) SetRoleID(roleID string) *DeleteRoleOptions

SetRoleID : Allow user to set RoleID

type DeleteV2PolicyOptions added in v0.31.4

type DeleteV2PolicyOptions struct {
	// The policy ID.
	ID *string `json:"id" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteV2PolicyOptions : The DeleteV2Policy options.

func (*DeleteV2PolicyOptions) SetHeaders added in v0.31.4

func (options *DeleteV2PolicyOptions) SetHeaders(param map[string]string) *DeleteV2PolicyOptions

SetHeaders : Allow user to set Headers

func (*DeleteV2PolicyOptions) SetID added in v0.31.4

func (_options *DeleteV2PolicyOptions) SetID(id string) *DeleteV2PolicyOptions

SetID : Allow user to set ID

type EnrichedRoles added in v0.31.5

type EnrichedRoles struct {
	// The role Cloud Resource Name (CRN) granted by the policy. Example CRN: 'crn:v1:bluemix:public:iam::::role:Editor'.
	RoleID *string `json:"role_id" validate:"required"`

	// The service defined (or user defined if a custom role) display name of the role.
	DisplayName *string `json:"display_name,omitempty"`

	// The service defined (or user defined if a custom role) description of the role.
	Description *string `json:"description,omitempty"`

	// The actions of the role. For more information, see [IAM roles and
	// actions](https://cloud.ibm.com/docs/account?topic=account-iam-service-roles-actions).
	Actions []RoleAction `json:"actions" validate:"required"`
}

EnrichedRoles : A role associated with a policy with additional information (display_name, description, actions) when `format=display`.

type ErrorDetails added in v0.43.0

type ErrorDetails struct {
	// Details of conflicting resource.
	ConflictsWith *ConflictsWith `json:"conflicts_with,omitempty"`
}

ErrorDetails : Additional error details.

type ErrorObject added in v0.43.0

type ErrorObject struct {
	// The API error code for the error.
	Code *string `json:"code" validate:"required"`

	// The error message returned by the API.
	Message *string `json:"message" validate:"required"`

	// Additional error details.
	Details *ErrorDetails `json:"details,omitempty"`

	// Additional info for error.
	MoreInfo *string `json:"more_info,omitempty"`
}

ErrorObject : ErrorObject struct

type ErrorResponse added in v0.43.0

type ErrorResponse struct {
	// The unique transaction id for the request.
	Trace *string `json:"trace,omitempty"`

	// The errors encountered during the response.
	Errors []ErrorObject `json:"errors,omitempty"`

	// The http error code of the response.
	StatusCode *int64 `json:"status_code,omitempty"`
}

ErrorResponse : The error response from API.

type GetPolicyAssignmentOptions added in v0.43.0

type GetPolicyAssignmentOptions struct {
	// The policy template assignment ID.
	AssignmentID *string `json:"assignment_id" validate:"required,ne="`

	// specify version of response body format.
	Version *string `json:"version" validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetPolicyAssignmentOptions : The GetPolicyAssignment options.

func (*GetPolicyAssignmentOptions) SetAssignmentID added in v0.43.0

func (_options *GetPolicyAssignmentOptions) SetAssignmentID(assignmentID string) *GetPolicyAssignmentOptions

SetAssignmentID : Allow user to set AssignmentID

func (*GetPolicyAssignmentOptions) SetHeaders added in v0.43.0

func (options *GetPolicyAssignmentOptions) SetHeaders(param map[string]string) *GetPolicyAssignmentOptions

SetHeaders : Allow user to set Headers

func (*GetPolicyAssignmentOptions) SetVersion added in v0.62.4

func (_options *GetPolicyAssignmentOptions) SetVersion(version string) *GetPolicyAssignmentOptions

SetVersion : Allow user to set Version

type GetPolicyAssignmentResponse added in v0.62.4

type GetPolicyAssignmentResponse struct {
	// assignment target account and type.
	Target *AssignmentTargetDetails `json:"target,omitempty"`

	// Policy assignment ID.
	ID *string `json:"id,omitempty"`

	// The account GUID that the policies assignments belong to..
	AccountID *string `json:"account_id,omitempty"`

	// The href URL that links to the policies assignments API by policy assignment ID.
	Href *string `json:"href,omitempty"`

	// The UTC timestamp when the policy assignment was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the policy assignment.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the policy assignment was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy assignment.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`

	// Object for each account assigned.
	Resources []PolicyAssignmentV1Resources `json:"resources,omitempty"`

	// subject details of access type assignment.
	Subject *GetPolicyAssignmentResponseSubject `json:"subject,omitempty"`

	// policy template details.
	Template *AssignmentTemplateDetails `json:"template,omitempty"`

	// The policy assignment status.
	Status *string `json:"status,omitempty"`

	// policy template id.
	TemplateID *string `json:"template_id,omitempty"`

	// policy template version.
	TemplateVersion *string `json:"template_version,omitempty"`

	// Passed in value to correlate with other assignments.
	AssignmentID *string `json:"assignment_id,omitempty"`

	// Assignment target type.
	TargetType *string `json:"target_type,omitempty"`
}

GetPolicyAssignmentResponse : GetPolicyAssignmentResponse struct Models which "extend" this model: - GetPolicyAssignmentResponsePolicyAssignmentV1 - GetPolicyAssignmentResponsePolicyAssignment

type GetPolicyAssignmentResponseIntf added in v0.62.4

type GetPolicyAssignmentResponseIntf interface {
	// contains filtered or unexported methods
}

type GetPolicyAssignmentResponsePolicyAssignment added in v0.62.4

type GetPolicyAssignmentResponsePolicyAssignment struct {
	// policy template id.
	TemplateID *string `json:"template_id,omitempty"`

	// policy template version.
	TemplateVersion *string `json:"template_version,omitempty"`

	// Passed in value to correlate with other assignments.
	AssignmentID *string `json:"assignment_id,omitempty"`

	// Assignment target type.
	TargetType *string `json:"target_type,omitempty"`

	// ID of the target account.
	Target *string `json:"target,omitempty"`

	// Policy assignment ID.
	ID *string `json:"id,omitempty"`

	// The account GUID that the policies assignments belong to..
	AccountID *string `json:"account_id,omitempty"`

	// The href URL that links to the policies assignments API by policy assignment ID.
	Href *string `json:"href,omitempty"`

	// The UTC timestamp when the policy assignment was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the policy assignment.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the policy assignment was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy assignment.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`

	// Object for each account assigned.
	Resources []PolicyAssignmentResources `json:"resources,omitempty"`

	// The policy assignment status.
	Status *string `json:"status,omitempty"`
}

GetPolicyAssignmentResponsePolicyAssignment : The set of properties associated with the policy template assignment. This model "extends" GetPolicyAssignmentResponse

type GetPolicyAssignmentResponsePolicyAssignmentV1 added in v0.62.4

type GetPolicyAssignmentResponsePolicyAssignmentV1 struct {
	// assignment target account and type.
	Target *AssignmentTargetDetails `json:"target" validate:"required"`

	// Policy assignment ID.
	ID *string `json:"id,omitempty"`

	// The account GUID that the policies assignments belong to..
	AccountID *string `json:"account_id,omitempty"`

	// The href URL that links to the policies assignments API by policy assignment ID.
	Href *string `json:"href,omitempty"`

	// The UTC timestamp when the policy assignment was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the policy assignment.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the policy assignment was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy assignment.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`

	// Object for each account assigned.
	Resources []PolicyAssignmentV1Resources `json:"resources" validate:"required"`

	// subject details of access type assignment.
	Subject *GetPolicyAssignmentResponsePolicyAssignmentV1Subject `json:"subject,omitempty"`

	// policy template details.
	Template *AssignmentTemplateDetails `json:"template" validate:"required"`

	// The policy assignment status.
	Status *string `json:"status" validate:"required"`
}

GetPolicyAssignmentResponsePolicyAssignmentV1 : The set of properties associated with the policy template assignment. This model "extends" GetPolicyAssignmentResponse

type GetPolicyAssignmentResponsePolicyAssignmentV1Subject added in v0.62.4

type GetPolicyAssignmentResponsePolicyAssignmentV1Subject struct {
	ID *string `json:"id,omitempty"`

	Type *string `json:"type,omitempty"`
}

GetPolicyAssignmentResponsePolicyAssignmentV1Subject : subject details of access type assignment.

type GetPolicyAssignmentResponseSubject added in v0.62.4

type GetPolicyAssignmentResponseSubject struct {
	ID *string `json:"id,omitempty"`

	Type *string `json:"type,omitempty"`
}

GetPolicyAssignmentResponseSubject : subject details of access type assignment.

type GetPolicyOptions

type GetPolicyOptions struct {
	// The policy ID.
	PolicyID *string `json:"policy_id" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetPolicyOptions : The GetPolicy options.

func (*GetPolicyOptions) SetHeaders

func (options *GetPolicyOptions) SetHeaders(param map[string]string) *GetPolicyOptions

SetHeaders : Allow user to set Headers

func (*GetPolicyOptions) SetPolicyID

func (_options *GetPolicyOptions) SetPolicyID(policyID string) *GetPolicyOptions

SetPolicyID : Allow user to set PolicyID

type GetPolicyTemplateOptions added in v0.43.0

type GetPolicyTemplateOptions struct {
	// The policy template ID.
	PolicyTemplateID *string `json:"policy_template_id" validate:"required,ne="`

	// The policy template state.
	State *string `json:"state,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetPolicyTemplateOptions : The GetPolicyTemplate options.

func (*GetPolicyTemplateOptions) SetHeaders added in v0.43.0

func (options *GetPolicyTemplateOptions) SetHeaders(param map[string]string) *GetPolicyTemplateOptions

SetHeaders : Allow user to set Headers

func (*GetPolicyTemplateOptions) SetPolicyTemplateID added in v0.43.0

func (_options *GetPolicyTemplateOptions) SetPolicyTemplateID(policyTemplateID string) *GetPolicyTemplateOptions

SetPolicyTemplateID : Allow user to set PolicyTemplateID

func (*GetPolicyTemplateOptions) SetState added in v0.56.0

func (_options *GetPolicyTemplateOptions) SetState(state string) *GetPolicyTemplateOptions

SetState : Allow user to set State

type GetPolicyTemplateVersionOptions added in v0.43.0

type GetPolicyTemplateVersionOptions struct {
	// The policy template ID.
	PolicyTemplateID *string `json:"policy_template_id" validate:"required,ne="`

	// The policy template version.
	Version *string `json:"version" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetPolicyTemplateVersionOptions : The GetPolicyTemplateVersion options.

func (*GetPolicyTemplateVersionOptions) SetHeaders added in v0.43.0

SetHeaders : Allow user to set Headers

func (*GetPolicyTemplateVersionOptions) SetPolicyTemplateID added in v0.43.0

func (_options *GetPolicyTemplateVersionOptions) SetPolicyTemplateID(policyTemplateID string) *GetPolicyTemplateVersionOptions

SetPolicyTemplateID : Allow user to set PolicyTemplateID

func (*GetPolicyTemplateVersionOptions) SetVersion added in v0.43.0

SetVersion : Allow user to set Version

type GetRoleOptions

type GetRoleOptions struct {
	// The role ID.
	RoleID *string `json:"role_id" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetRoleOptions : The GetRole options.

func (*GetRoleOptions) SetHeaders

func (options *GetRoleOptions) SetHeaders(param map[string]string) *GetRoleOptions

SetHeaders : Allow user to set Headers

func (*GetRoleOptions) SetRoleID

func (_options *GetRoleOptions) SetRoleID(roleID string) *GetRoleOptions

SetRoleID : Allow user to set RoleID

type GetV2PolicyOptions added in v0.31.4

type GetV2PolicyOptions struct {
	// The policy ID.
	ID *string `json:"id" validate:"required,ne="`

	// Include additional data for policy returned
	// * `include_last_permit` - returns details of when the policy last granted a permit decision and the number of times
	// it has done so
	// * `display` - returns the list of all actions included in each of the policy roles and translations for all relevant
	// fields.
	Format *string `json:"format,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetV2PolicyOptions : The GetV2Policy options.

func (*GetV2PolicyOptions) SetFormat added in v0.31.5

func (_options *GetV2PolicyOptions) SetFormat(format string) *GetV2PolicyOptions

SetFormat : Allow user to set Format

func (*GetV2PolicyOptions) SetHeaders added in v0.31.4

func (options *GetV2PolicyOptions) SetHeaders(param map[string]string) *GetV2PolicyOptions

SetHeaders : Allow user to set Headers

func (*GetV2PolicyOptions) SetID added in v0.31.4

func (_options *GetV2PolicyOptions) SetID(id string) *GetV2PolicyOptions

SetID : Allow user to set ID

type Grant added in v0.31.5

type Grant struct {
	// A set of role cloud resource names (CRNs) granted by the policy.
	Roles []Roles `json:"roles" validate:"required"`
}

Grant : Permission granted by the policy.

type GrantWithEnrichedRoles added in v0.31.5

type GrantWithEnrichedRoles struct {
	// A set of roles granted by the policy.
	Roles []EnrichedRoles `json:"roles" validate:"required"`
}

GrantWithEnrichedRoles : Permission granted by the policy with translated roles and additional role information.

type IamPolicyManagementV1

type IamPolicyManagementV1 struct {
	Service *core.BaseService
}

IamPolicyManagementV1 : IAM Policy Management API

API Version: 1.0.1

func NewIamPolicyManagementV1

func NewIamPolicyManagementV1(options *IamPolicyManagementV1Options) (service *IamPolicyManagementV1, err error)

NewIamPolicyManagementV1 : constructs an instance of IamPolicyManagementV1 with passed in options.

func NewIamPolicyManagementV1UsingExternalConfig

func NewIamPolicyManagementV1UsingExternalConfig(options *IamPolicyManagementV1Options) (iamPolicyManagement *IamPolicyManagementV1, err error)

NewIamPolicyManagementV1UsingExternalConfig : constructs an instance of IamPolicyManagementV1 with passed in options and external configuration.

func (*IamPolicyManagementV1) Clone added in v0.17.2

func (iamPolicyManagement *IamPolicyManagementV1) Clone() *IamPolicyManagementV1

Clone makes a copy of "iamPolicyManagement" suitable for processing requests.

func (*IamPolicyManagementV1) CommitPolicyTemplate added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) CommitPolicyTemplate(commitPolicyTemplateOptions *CommitPolicyTemplateOptions) (response *core.DetailedResponse, err error)

CommitPolicyTemplate : Commit a policy template version Commit a policy template version. You can make no further changes to the policy template once it's committed. If you need to make updates after committing a version, create a new version.

func (*IamPolicyManagementV1) CommitPolicyTemplateWithContext added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) CommitPolicyTemplateWithContext(ctx context.Context, commitPolicyTemplateOptions *CommitPolicyTemplateOptions) (response *core.DetailedResponse, err error)

CommitPolicyTemplateWithContext is an alternate form of the CommitPolicyTemplate method which supports a Context parameter

func (*IamPolicyManagementV1) CreatePolicy

func (iamPolicyManagement *IamPolicyManagementV1) CreatePolicy(createPolicyOptions *CreatePolicyOptions) (result *Policy, response *core.DetailedResponse, err error)

CreatePolicy : Create a policy Creates a policy to grant access between a subject and a resource. There are two types of policies: **access** and **authorization**. A policy administrator might want to create an access policy which grants access to a user, service-id, or an access group. They might also want to create an authorization policy and setup access between services.

### Access

To create an access policy, use **`"type": "access"`** in the body. The possible subject attributes are **`iam_id`** and **`access_group_id`**. Use the **`iam_id`** subject attribute for assigning access for a user or service-id. Use the **`access_group_id`** subject attribute for assigning access for an access group. Assign roles that are supported by the service or platform roles. For more information, see [IAM roles and actions](/docs/account?topic=account-iam-service-roles-actions). Use only the resource attributes supported by the service. To view a service's or the platform's supported attributes, check the [documentation](/docs?tab=all-docs). The policy resource must include either the **`serviceType`**, **`serviceName`**, **`resourceGroupId`** or **`service_group_id`** attribute and the **`accountId`** attribute. The IAM Services group (`IAM`) is a subset of account management services that includes the IAM platform services IAM Identity, IAM Access Management, IAM Users Management, IAM Groups, and future IAM services. If the subject is a locked service-id, the request will fail.

### Authorization

Authorization policies are supported by services on a case by case basis. Refer to service documentation to verify their support of authorization policies. To create an authorization policy, use **`"type": "authorization"`** in the body. The subject attributes must match the supported authorization subjects of the resource. Multiple subject attributes might be provided. The following attributes are supported:

serviceName, serviceInstance, region, resourceType, resource, accountId, resourceGroupId Assign roles that are

supported by the service or platform roles. For more information, see [IAM roles and actions](/docs/account?topic=account-iam-service-roles-actions). The user must also have the same level of access or greater to the target resource in order to grant the role. Use only the resource attributes supported by the service. To view a service's or the platform's supported attributes, check the [documentation](/docs?tab=all-docs). Both the policy subject and the policy resource must include the **`accountId`** attributes. The policy subject must include either **`serviceName`** or **`resourceGroupId`** (or both) attributes.

### Attribute Operators

Currently, only the `stringEquals` and the `stringMatch` operators are available. Resource attributes may support one or both operators. For more information, see [Assigning access by using wildcard policies](https://cloud.ibm.com/docs/account?topic=account-wildcard).

### Attribute Validations

Policy attribute values must be between 1 and 1,000 characters in length. If location related attributes like geography, country, metro, region, satellite, and locationvalues are supported by the service, they are validated against Global Catalog locations.

func (*IamPolicyManagementV1) CreatePolicyTemplate added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) CreatePolicyTemplate(createPolicyTemplateOptions *CreatePolicyTemplateOptions) (result *PolicyTemplateLimitData, response *core.DetailedResponse, err error)

CreatePolicyTemplate : Create a policy template Create a policy template. Policy templates define a policy without requiring a subject, and you can use them to grant access to multiple subjects.

func (*IamPolicyManagementV1) CreatePolicyTemplateAssignment added in v0.62.4

func (iamPolicyManagement *IamPolicyManagementV1) CreatePolicyTemplateAssignment(createPolicyTemplateAssignmentOptions *CreatePolicyTemplateAssignmentOptions) (result *PolicyAssignmentV1Collection, response *core.DetailedResponse, err error)

CreatePolicyTemplateAssignment : Create a policy authorization template assignment Assign a policy template to child accounts and account groups. This creates the policy in the accounts and account groups that you specify.

func (*IamPolicyManagementV1) CreatePolicyTemplateAssignmentWithContext added in v0.62.4

func (iamPolicyManagement *IamPolicyManagementV1) CreatePolicyTemplateAssignmentWithContext(ctx context.Context, createPolicyTemplateAssignmentOptions *CreatePolicyTemplateAssignmentOptions) (result *PolicyAssignmentV1Collection, response *core.DetailedResponse, err error)

CreatePolicyTemplateAssignmentWithContext is an alternate form of the CreatePolicyTemplateAssignment method which supports a Context parameter

func (*IamPolicyManagementV1) CreatePolicyTemplateVersion added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) CreatePolicyTemplateVersion(createPolicyTemplateVersionOptions *CreatePolicyTemplateVersionOptions) (result *PolicyTemplateLimitData, response *core.DetailedResponse, err error)

CreatePolicyTemplateVersion : Create a new policy template version Create a new version of a policy template. Use this if you need to make updates to a policy template that is committed.

func (*IamPolicyManagementV1) CreatePolicyTemplateVersionWithContext added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) CreatePolicyTemplateVersionWithContext(ctx context.Context, createPolicyTemplateVersionOptions *CreatePolicyTemplateVersionOptions) (result *PolicyTemplateLimitData, response *core.DetailedResponse, err error)

CreatePolicyTemplateVersionWithContext is an alternate form of the CreatePolicyTemplateVersion method which supports a Context parameter

func (*IamPolicyManagementV1) CreatePolicyTemplateWithContext added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) CreatePolicyTemplateWithContext(ctx context.Context, createPolicyTemplateOptions *CreatePolicyTemplateOptions) (result *PolicyTemplateLimitData, response *core.DetailedResponse, err error)

CreatePolicyTemplateWithContext is an alternate form of the CreatePolicyTemplate method which supports a Context parameter

func (*IamPolicyManagementV1) CreatePolicyWithContext added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) CreatePolicyWithContext(ctx context.Context, createPolicyOptions *CreatePolicyOptions) (result *Policy, response *core.DetailedResponse, err error)

CreatePolicyWithContext is an alternate form of the CreatePolicy method which supports a Context parameter

func (*IamPolicyManagementV1) CreateRole

func (iamPolicyManagement *IamPolicyManagementV1) CreateRole(createRoleOptions *CreateRoleOptions) (result *CustomRole, response *core.DetailedResponse, err error)

CreateRole : Create a role Creates a custom role for a specific service within the account. An account owner or a user assigned the Administrator role on the Role management service can create a custom role. Any number of actions for a single service can be mapped to the new role, but there must be at least one service-defined action to successfully create the new role.

func (*IamPolicyManagementV1) CreateRoleWithContext added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) CreateRoleWithContext(ctx context.Context, createRoleOptions *CreateRoleOptions) (result *CustomRole, response *core.DetailedResponse, err error)

CreateRoleWithContext is an alternate form of the CreateRole method which supports a Context parameter

func (*IamPolicyManagementV1) CreateV2Policy added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) CreateV2Policy(createV2PolicyOptions *CreateV2PolicyOptions) (result *V2Policy, response *core.DetailedResponse, err error)

CreateV2Policy : Create a policy Creates a policy to grant access between a subject and a resource. Currently, there is one type of a v2/policy: **access**. A policy administrator might want to create an access policy that grants access to a user, service-id, or an access group.

### Access

To create an access policy, use **`"type": "access"`** in the body. The supported subject attributes are **`iam_id`** and **`access_group_id`**. Use the **`iam_id`** subject attribute to assign access to a user or service-id. Use the **`access_group_id`** subject attribute to assign access to an access group. Assign roles that are supported by the service or platform roles. For more information, see [IAM roles and actions](/docs/account?topic=account-iam-service-roles-actions). Use only the resource attributes supported by the service. To view a service's or the platform's supported attributes, check the [documentation](/docs?tab=all-docs). The policy resource must include either the **`serviceType`**, **`serviceName`**, **`resourceGroupId`** or **`service_group_id`** attribute and the **`accountId`** attribute. In the rule field, you can specify a single condition by using **`key`**, **`value`**, and condition **`operator`**, or a set of **`conditions`** with a combination **`operator`**. The possible combination operators are **`and`** and **`or`**.

Currently, we support two types of patterns:

1. `time-based`: Used to specify a time-based restriction

Combine conditions to specify a time-based restriction (e.g., access only during business hours, during the Monday-Friday work week). For example, a policy can grant access Monday-Friday, 9:00am-5:00pm using the following rule: ```json

"rule": {
  "operator": "and",
  "conditions": [{
    "key": "{{environment.attributes.day_of_week}}",
    "operator": "dayOfWeekAnyOf",
    "value": ["1+00:00", "2+00:00", "3+00:00", "4+00:00", "5+00:00"]
  },
    "key": "{{environment.attributes.current_time}}",
    "operator": "timeGreaterThanOrEquals",
    "value": "09:00:00+00:00"
  },
    "key": "{{environment.attributes.current_time}}",
    "operator": "timeLessThanOrEquals",
    "value": "17:00:00+00:00"
  }]
}

``` You can use the following operators in the **`key`** and **`value`** pair: ```

'timeLessThan', 'timeLessThanOrEquals', 'timeGreaterThan', 'timeGreaterThanOrEquals',
'dateLessThan', 'dateLessThanOrEquals', 'dateGreaterThan', 'dateGreaterThanOrEquals',
'dateTimeLessThan', 'dateTimeLessThanOrEquals', 'dateTimeGreaterThan', 'dateTimeGreaterThanOrEquals',
'dayOfWeekEquals', 'dayOfWeekAnyOf'

``` The pattern field that matches the rule is required when rule is provided. For the business hour rule example above, the **`pattern`** is **`"time-based-conditions:weekly"`**. For more information, see [Time-based conditions operators](/docs/account?topic=account-iam-condition-properties&interface=ui#policy-condition-properties) and [Limiting access with time-based conditions](/docs/account?topic=account-iam-time-based&interface=ui). If the subject is a locked service-id, the request will fail.

2. `attribute-based`: Used to specify a combination of OR/AND based conditions applied on resource attributes.

Combine conditions to specify an attribute-based condition using AND/OR-based operators.

For example, a policy can grant access based on multiple conditions applied on the resource attributes below: ```json

"pattern": "attribute-based-condition:resource:literal-and-wildcard"
"rule": {
    "operator": "or",
    "conditions": [
      {
        "operator": "and",
        "conditions": [
          {
            "key": "{{resource.attributes.prefix}}",
            "operator": "stringEquals",
            "value": "home/test"
          },
          {
            "key": "{{environment.attributes.delimiter}}",
            "operator": "stringEquals",
            "value": "/"
          }
        ]
      },
      {
        "key": "{{resource.attributes.path}}",
        "operator": "stringMatch",
        "value": "home/David/_*"
      }
    ]
}

```

In addition to satisfying the `resources` section, the policy grants permission only if either the `path` begins with `home/David/` **OR** the `prefix` is `home/test` and the `delimiter` is `/`. This mechanism helps you consolidate multiple policies in to a single policy, making policies easier to administer and stay within the policy limit for an account. View the list of operators that can be used in the condition [here](/docs/account?topic=account-wildcard#string-comparisons).

### Authorization

Authorization policies are supported by services on a case by case basis. Refer to service documentation to verify their support of authorization policies. To create an authorization policy, use **`"type": "authorization"`** in the body. The subject attributes must match the supported authorization subjects of the resource. Multiple subject attributes might be provided. The following attributes are supported:

serviceName, serviceInstance, region, resourceType, resource, accountId, resourceGroupId Assign roles that are

supported by the service or platform roles. For more information, see [IAM roles and actions](/docs/account?topic=account-iam-service-roles-actions). The user must also have the same level of access or greater to the target resource in order to grant the role. Use only the resource attributes supported by the service. To view a service's or the platform's supported attributes, check the [documentation](/docs?tab=all-docs). Both the policy subject and the policy resource must include the **`accountId`** attributes. The policy subject must include either **`serviceName`** or **`resourceGroupId`** (or both) attributes.

### Attribute Operators

Currently, only the `stringEquals`, `stringMatch`, and `stringEquals` operators are available. For more information, see [Assigning access by using wildcard policies](https://cloud.ibm.com/docs/account?topic=account-wildcard).

### Attribute Validations

Policy attribute values must be between 1 and 1,000 characters in length. If location related attributes like geography, country, metro, region, satellite, and locationvalues are supported by the service, they are validated against Global Catalog locations.

func (*IamPolicyManagementV1) CreateV2PolicyWithContext added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) CreateV2PolicyWithContext(ctx context.Context, createV2PolicyOptions *CreateV2PolicyOptions) (result *V2Policy, response *core.DetailedResponse, err error)

CreateV2PolicyWithContext is an alternate form of the CreateV2Policy method which supports a Context parameter

func (*IamPolicyManagementV1) DeletePolicy

func (iamPolicyManagement *IamPolicyManagementV1) DeletePolicy(deletePolicyOptions *DeletePolicyOptions) (response *core.DetailedResponse, err error)

DeletePolicy : Delete a policy by ID Delete a policy by providing a policy ID. A policy cannot be deleted if the subject ID contains a locked service ID. If the subject of the policy is a locked service-id, the request will fail.

func (*IamPolicyManagementV1) DeletePolicyAssignment added in v0.62.4

func (iamPolicyManagement *IamPolicyManagementV1) DeletePolicyAssignment(deletePolicyAssignmentOptions *DeletePolicyAssignmentOptions) (response *core.DetailedResponse, err error)

DeletePolicyAssignment : Remove a policy assignment Remove a policy template assignment by providing a policy assignment ID. You can't delete a policy assignment if the status is "in_progress".

func (*IamPolicyManagementV1) DeletePolicyAssignmentWithContext added in v0.62.4

func (iamPolicyManagement *IamPolicyManagementV1) DeletePolicyAssignmentWithContext(ctx context.Context, deletePolicyAssignmentOptions *DeletePolicyAssignmentOptions) (response *core.DetailedResponse, err error)

DeletePolicyAssignmentWithContext is an alternate form of the DeletePolicyAssignment method which supports a Context parameter

func (*IamPolicyManagementV1) DeletePolicyTemplate added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) DeletePolicyTemplate(deletePolicyTemplateOptions *DeletePolicyTemplateOptions) (response *core.DetailedResponse, err error)

DeletePolicyTemplate : Delete a policy template Delete a policy template by providing the policy template ID. This deletes all versions of this template. A policy template can't be deleted if any version of the template is assigned to one or more child accounts. You must remove the policy assignments first.

func (*IamPolicyManagementV1) DeletePolicyTemplateVersion added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) DeletePolicyTemplateVersion(deletePolicyTemplateVersionOptions *DeletePolicyTemplateVersionOptions) (response *core.DetailedResponse, err error)

DeletePolicyTemplateVersion : Delete a policy template version Delete a specific version of a policy template by providing a policy template ID and version number. You can't delete a policy template version that is assigned to one or more child accounts. You must remove the policy assignments first.

func (*IamPolicyManagementV1) DeletePolicyTemplateVersionWithContext added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) DeletePolicyTemplateVersionWithContext(ctx context.Context, deletePolicyTemplateVersionOptions *DeletePolicyTemplateVersionOptions) (response *core.DetailedResponse, err error)

DeletePolicyTemplateVersionWithContext is an alternate form of the DeletePolicyTemplateVersion method which supports a Context parameter

func (*IamPolicyManagementV1) DeletePolicyTemplateWithContext added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) DeletePolicyTemplateWithContext(ctx context.Context, deletePolicyTemplateOptions *DeletePolicyTemplateOptions) (response *core.DetailedResponse, err error)

DeletePolicyTemplateWithContext is an alternate form of the DeletePolicyTemplate method which supports a Context parameter

func (*IamPolicyManagementV1) DeletePolicyWithContext added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) DeletePolicyWithContext(ctx context.Context, deletePolicyOptions *DeletePolicyOptions) (response *core.DetailedResponse, err error)

DeletePolicyWithContext is an alternate form of the DeletePolicy method which supports a Context parameter

func (*IamPolicyManagementV1) DeleteRole

func (iamPolicyManagement *IamPolicyManagementV1) DeleteRole(deleteRoleOptions *DeleteRoleOptions) (response *core.DetailedResponse, err error)

DeleteRole : Delete a role by ID Delete a role by providing a role ID.

func (*IamPolicyManagementV1) DeleteRoleWithContext added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) DeleteRoleWithContext(ctx context.Context, deleteRoleOptions *DeleteRoleOptions) (response *core.DetailedResponse, err error)

DeleteRoleWithContext is an alternate form of the DeleteRole method which supports a Context parameter

func (*IamPolicyManagementV1) DeleteV2Policy added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) DeleteV2Policy(deleteV2PolicyOptions *DeleteV2PolicyOptions) (response *core.DetailedResponse, err error)

DeleteV2Policy : Delete a policy by ID Delete a policy by providing a policy ID. A policy cannot be deleted if the subject ID contains a locked service ID. If the subject of the policy is a locked service-id, the request will fail.

func (*IamPolicyManagementV1) DeleteV2PolicyWithContext added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) DeleteV2PolicyWithContext(ctx context.Context, deleteV2PolicyOptions *DeleteV2PolicyOptions) (response *core.DetailedResponse, err error)

DeleteV2PolicyWithContext is an alternate form of the DeleteV2Policy method which supports a Context parameter

func (*IamPolicyManagementV1) DisableRetries added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) DisableRetries()

DisableRetries disables automatic retries for requests invoked for this service instance.

func (*IamPolicyManagementV1) EnableRetries added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)

EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.

func (*IamPolicyManagementV1) GetEnableGzipCompression added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*IamPolicyManagementV1) GetPolicy

func (iamPolicyManagement *IamPolicyManagementV1) GetPolicy(getPolicyOptions *GetPolicyOptions) (result *PolicyTemplateMetaData, response *core.DetailedResponse, err error)

GetPolicy : Retrieve a policy by ID Retrieve a policy by providing a policy ID.

func (*IamPolicyManagementV1) GetPolicyAssignment added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) GetPolicyAssignment(getPolicyAssignmentOptions *GetPolicyAssignmentOptions) (result GetPolicyAssignmentResponseIntf, response *core.DetailedResponse, err error)

GetPolicyAssignment : Retrieve a policy assignment Retrieve a policy template assignment by providing a policy assignment ID.

func (*IamPolicyManagementV1) GetPolicyAssignmentWithContext added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) GetPolicyAssignmentWithContext(ctx context.Context, getPolicyAssignmentOptions *GetPolicyAssignmentOptions) (result GetPolicyAssignmentResponseIntf, response *core.DetailedResponse, err error)

GetPolicyAssignmentWithContext is an alternate form of the GetPolicyAssignment method which supports a Context parameter

func (*IamPolicyManagementV1) GetPolicyTemplate added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) GetPolicyTemplate(getPolicyTemplateOptions *GetPolicyTemplateOptions) (result *PolicyTemplate, response *core.DetailedResponse, err error)

GetPolicyTemplate : Retrieve latest version of a policy template Retrieve the latest version of a policy template by providing a policy template ID.

func (*IamPolicyManagementV1) GetPolicyTemplateVersion added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) GetPolicyTemplateVersion(getPolicyTemplateVersionOptions *GetPolicyTemplateVersionOptions) (result *PolicyTemplate, response *core.DetailedResponse, err error)

GetPolicyTemplateVersion : Retrieve a policy template version Retrieve a policy template by providing a policy template ID and version number.

func (*IamPolicyManagementV1) GetPolicyTemplateVersionWithContext added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) GetPolicyTemplateVersionWithContext(ctx context.Context, getPolicyTemplateVersionOptions *GetPolicyTemplateVersionOptions) (result *PolicyTemplate, response *core.DetailedResponse, err error)

GetPolicyTemplateVersionWithContext is an alternate form of the GetPolicyTemplateVersion method which supports a Context parameter

func (*IamPolicyManagementV1) GetPolicyTemplateWithContext added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) GetPolicyTemplateWithContext(ctx context.Context, getPolicyTemplateOptions *GetPolicyTemplateOptions) (result *PolicyTemplate, response *core.DetailedResponse, err error)

GetPolicyTemplateWithContext is an alternate form of the GetPolicyTemplate method which supports a Context parameter

func (*IamPolicyManagementV1) GetPolicyWithContext added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) GetPolicyWithContext(ctx context.Context, getPolicyOptions *GetPolicyOptions) (result *PolicyTemplateMetaData, response *core.DetailedResponse, err error)

GetPolicyWithContext is an alternate form of the GetPolicy method which supports a Context parameter

func (*IamPolicyManagementV1) GetRole

func (iamPolicyManagement *IamPolicyManagementV1) GetRole(getRoleOptions *GetRoleOptions) (result *CustomRole, response *core.DetailedResponse, err error)

GetRole : Retrieve a role by ID Retrieve a role by providing a role ID.

func (*IamPolicyManagementV1) GetRoleWithContext added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) GetRoleWithContext(ctx context.Context, getRoleOptions *GetRoleOptions) (result *CustomRole, response *core.DetailedResponse, err error)

GetRoleWithContext is an alternate form of the GetRole method which supports a Context parameter

func (*IamPolicyManagementV1) GetServiceURL added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) GetServiceURL() string

GetServiceURL returns the service URL

func (*IamPolicyManagementV1) GetV2Policy added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) GetV2Policy(getV2PolicyOptions *GetV2PolicyOptions) (result *V2PolicyTemplateMetaData, response *core.DetailedResponse, err error)

GetV2Policy : Retrieve a policy by ID Retrieve a policy by providing a policy ID.

func (*IamPolicyManagementV1) GetV2PolicyWithContext added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) GetV2PolicyWithContext(ctx context.Context, getV2PolicyOptions *GetV2PolicyOptions) (result *V2PolicyTemplateMetaData, response *core.DetailedResponse, err error)

GetV2PolicyWithContext is an alternate form of the GetV2Policy method which supports a Context parameter

func (*IamPolicyManagementV1) ListPolicies

func (iamPolicyManagement *IamPolicyManagementV1) ListPolicies(listPoliciesOptions *ListPoliciesOptions) (result *PolicyCollection, response *core.DetailedResponse, err error)

ListPolicies : Get policies by attributes Get policies and filter by attributes. While managing policies, you might want to retrieve policies in the account and filter by attribute values. This can be done through query parameters. The following attributes are supported: account_id, iam_id, access_group_id, type, service_type, sort, format and state. account_id is a required query parameter. Only policies that have the specified attributes and that the caller has read access to are returned. If the caller does not have read access to any policies an empty array is returned.

func (*IamPolicyManagementV1) ListPoliciesWithContext added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) ListPoliciesWithContext(ctx context.Context, listPoliciesOptions *ListPoliciesOptions) (result *PolicyCollection, response *core.DetailedResponse, err error)

ListPoliciesWithContext is an alternate form of the ListPolicies method which supports a Context parameter

func (*IamPolicyManagementV1) ListPolicyAssignments added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) ListPolicyAssignments(listPolicyAssignmentsOptions *ListPolicyAssignmentsOptions) (result *PolicyTemplateAssignmentCollection, response *core.DetailedResponse, err error)

ListPolicyAssignments : Get policy template assignments Get policy template assignments by attributes. The following attributes are supported: `account_id`, `template_id`, `template_version`, `sort`. `account_id` is a required query parameter. Only policy template assignments that have the specified attributes and that the caller has read access to are returned. If the caller does not have read access to any policy template assignments an empty array is returned.

func (*IamPolicyManagementV1) ListPolicyAssignmentsWithContext added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) ListPolicyAssignmentsWithContext(ctx context.Context, listPolicyAssignmentsOptions *ListPolicyAssignmentsOptions) (result *PolicyTemplateAssignmentCollection, response *core.DetailedResponse, err error)

ListPolicyAssignmentsWithContext is an alternate form of the ListPolicyAssignments method which supports a Context parameter

func (*IamPolicyManagementV1) ListPolicyTemplateVersions added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) ListPolicyTemplateVersions(listPolicyTemplateVersionsOptions *ListPolicyTemplateVersionsOptions) (result *PolicyTemplateVersionsCollection, response *core.DetailedResponse, err error)

ListPolicyTemplateVersions : Retrieve policy template versions Retrieve the versions of a policy template by providing a policy template ID.

func (*IamPolicyManagementV1) ListPolicyTemplateVersionsWithContext added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) ListPolicyTemplateVersionsWithContext(ctx context.Context, listPolicyTemplateVersionsOptions *ListPolicyTemplateVersionsOptions) (result *PolicyTemplateVersionsCollection, response *core.DetailedResponse, err error)

ListPolicyTemplateVersionsWithContext is an alternate form of the ListPolicyTemplateVersions method which supports a Context parameter

func (*IamPolicyManagementV1) ListPolicyTemplates added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) ListPolicyTemplates(listPolicyTemplatesOptions *ListPolicyTemplatesOptions) (result *PolicyTemplateCollection, response *core.DetailedResponse, err error)

ListPolicyTemplates : List policy templates by attributes List policy templates and filter by attributes by using query parameters. The following attributes are supported: `account_id`, `policy_service_name`, `policy_service_type`, `policy_service_group_id` and `policy_type`. `account_id` is a required query parameter. These attributes `policy_service_name`, `policy_service_type` and `policy_service_group_id` are mutually exclusive. Only policy templates that have the specified attributes and that the caller has read access to are returned. If the caller does not have read access to any policy templates an empty array is returned.

func (*IamPolicyManagementV1) ListPolicyTemplatesWithContext added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) ListPolicyTemplatesWithContext(ctx context.Context, listPolicyTemplatesOptions *ListPolicyTemplatesOptions) (result *PolicyTemplateCollection, response *core.DetailedResponse, err error)

ListPolicyTemplatesWithContext is an alternate form of the ListPolicyTemplates method which supports a Context parameter

func (*IamPolicyManagementV1) ListRoles

func (iamPolicyManagement *IamPolicyManagementV1) ListRoles(listRolesOptions *ListRolesOptions) (result *RoleCollection, response *core.DetailedResponse, err error)

ListRoles : Get roles by filters Get roles based on the filters. While managing roles, you may want to retrieve roles and filter by usages. This can be done through query parameters. Currently, we only support the following attributes: account_id, service_name, service_group_id, source_service_name and policy_type. Both service_name and service_group_id attributes are mutually exclusive. Only roles that match the filter and that the caller has read access to are returned. If the caller does not have read access to any roles an empty array is returned.

func (*IamPolicyManagementV1) ListRolesWithContext added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) ListRolesWithContext(ctx context.Context, listRolesOptions *ListRolesOptions) (result *RoleCollection, response *core.DetailedResponse, err error)

ListRolesWithContext is an alternate form of the ListRoles method which supports a Context parameter

func (*IamPolicyManagementV1) ListV2Policies added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) ListV2Policies(listV2PoliciesOptions *ListV2PoliciesOptions) (result *V2PolicyCollection, response *core.DetailedResponse, err error)

ListV2Policies : Get policies by attributes Get policies and filter by attributes. While managing policies, you might want to retrieve policies in the account and filter by attribute values. This can be done through query parameters. The following attributes are supported: account_id, iam_id, access_group_id, type, service_type, sort, format and state. account_id is a required query parameter. Only policies that have the specified attributes and that the caller has read access to are returned. If the caller does not have read access to any policies an empty array is returned.

func (*IamPolicyManagementV1) ListV2PoliciesWithContext added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) ListV2PoliciesWithContext(ctx context.Context, listV2PoliciesOptions *ListV2PoliciesOptions) (result *V2PolicyCollection, response *core.DetailedResponse, err error)

ListV2PoliciesWithContext is an alternate form of the ListV2Policies method which supports a Context parameter

func (*IamPolicyManagementV1) NewCommitPolicyTemplateOptions added in v0.43.0

func (*IamPolicyManagementV1) NewCommitPolicyTemplateOptions(policyTemplateID string, version string) *CommitPolicyTemplateOptions

NewCommitPolicyTemplateOptions : Instantiate CommitPolicyTemplateOptions

func (*IamPolicyManagementV1) NewControl added in v0.31.4

func (*IamPolicyManagementV1) NewControl(grant *Grant) (_model *Control, err error)

NewControl : Instantiate Control (Generic Model Constructor)

func (*IamPolicyManagementV1) NewCreatePolicyOptions

func (*IamPolicyManagementV1) NewCreatePolicyOptions(typeVar string, subjects []PolicySubject, roles []PolicyRole, resources []PolicyResource) *CreatePolicyOptions

NewCreatePolicyOptions : Instantiate CreatePolicyOptions

func (*IamPolicyManagementV1) NewCreatePolicyTemplateAssignmentOptions added in v0.62.4

func (*IamPolicyManagementV1) NewCreatePolicyTemplateAssignmentOptions(version string, target *AssignmentTargetDetails, templates []AssignmentTemplateDetails) *CreatePolicyTemplateAssignmentOptions

NewCreatePolicyTemplateAssignmentOptions : Instantiate CreatePolicyTemplateAssignmentOptions

func (*IamPolicyManagementV1) NewCreatePolicyTemplateOptions added in v0.43.0

func (*IamPolicyManagementV1) NewCreatePolicyTemplateOptions(name string, accountID string, policy *TemplatePolicy) *CreatePolicyTemplateOptions

NewCreatePolicyTemplateOptions : Instantiate CreatePolicyTemplateOptions

func (*IamPolicyManagementV1) NewCreatePolicyTemplateVersionOptions added in v0.43.0

func (*IamPolicyManagementV1) NewCreatePolicyTemplateVersionOptions(policyTemplateID string, policy *TemplatePolicy) *CreatePolicyTemplateVersionOptions

NewCreatePolicyTemplateVersionOptions : Instantiate CreatePolicyTemplateVersionOptions

func (*IamPolicyManagementV1) NewCreateRoleOptions

func (*IamPolicyManagementV1) NewCreateRoleOptions(displayName string, actions []string, name string, accountID string, serviceName string) *CreateRoleOptions

NewCreateRoleOptions : Instantiate CreateRoleOptions

func (*IamPolicyManagementV1) NewCreateV2PolicyOptions added in v0.31.4

func (*IamPolicyManagementV1) NewCreateV2PolicyOptions(control *Control, typeVar string) *CreateV2PolicyOptions

NewCreateV2PolicyOptions : Instantiate CreateV2PolicyOptions

func (*IamPolicyManagementV1) NewDeletePolicyAssignmentOptions added in v0.62.4

func (*IamPolicyManagementV1) NewDeletePolicyAssignmentOptions(assignmentID string) *DeletePolicyAssignmentOptions

NewDeletePolicyAssignmentOptions : Instantiate DeletePolicyAssignmentOptions

func (*IamPolicyManagementV1) NewDeletePolicyOptions

func (*IamPolicyManagementV1) NewDeletePolicyOptions(policyID string) *DeletePolicyOptions

NewDeletePolicyOptions : Instantiate DeletePolicyOptions

func (*IamPolicyManagementV1) NewDeletePolicyTemplateOptions added in v0.43.0

func (*IamPolicyManagementV1) NewDeletePolicyTemplateOptions(policyTemplateID string) *DeletePolicyTemplateOptions

NewDeletePolicyTemplateOptions : Instantiate DeletePolicyTemplateOptions

func (*IamPolicyManagementV1) NewDeletePolicyTemplateVersionOptions added in v0.43.0

func (*IamPolicyManagementV1) NewDeletePolicyTemplateVersionOptions(policyTemplateID string, version string) *DeletePolicyTemplateVersionOptions

NewDeletePolicyTemplateVersionOptions : Instantiate DeletePolicyTemplateVersionOptions

func (*IamPolicyManagementV1) NewDeleteRoleOptions

func (*IamPolicyManagementV1) NewDeleteRoleOptions(roleID string) *DeleteRoleOptions

NewDeleteRoleOptions : Instantiate DeleteRoleOptions

func (*IamPolicyManagementV1) NewDeleteV2PolicyOptions added in v0.31.4

func (*IamPolicyManagementV1) NewDeleteV2PolicyOptions(id string) *DeleteV2PolicyOptions

NewDeleteV2PolicyOptions : Instantiate DeleteV2PolicyOptions

func (*IamPolicyManagementV1) NewGetPolicyAssignmentOptions added in v0.43.0

func (*IamPolicyManagementV1) NewGetPolicyAssignmentOptions(assignmentID string, version string) *GetPolicyAssignmentOptions

NewGetPolicyAssignmentOptions : Instantiate GetPolicyAssignmentOptions

func (*IamPolicyManagementV1) NewGetPolicyOptions

func (*IamPolicyManagementV1) NewGetPolicyOptions(policyID string) *GetPolicyOptions

NewGetPolicyOptions : Instantiate GetPolicyOptions

func (*IamPolicyManagementV1) NewGetPolicyTemplateOptions added in v0.43.0

func (*IamPolicyManagementV1) NewGetPolicyTemplateOptions(policyTemplateID string) *GetPolicyTemplateOptions

NewGetPolicyTemplateOptions : Instantiate GetPolicyTemplateOptions

func (*IamPolicyManagementV1) NewGetPolicyTemplateVersionOptions added in v0.43.0

func (*IamPolicyManagementV1) NewGetPolicyTemplateVersionOptions(policyTemplateID string, version string) *GetPolicyTemplateVersionOptions

NewGetPolicyTemplateVersionOptions : Instantiate GetPolicyTemplateVersionOptions

func (*IamPolicyManagementV1) NewGetRoleOptions

func (*IamPolicyManagementV1) NewGetRoleOptions(roleID string) *GetRoleOptions

NewGetRoleOptions : Instantiate GetRoleOptions

func (*IamPolicyManagementV1) NewGetV2PolicyOptions added in v0.31.4

func (*IamPolicyManagementV1) NewGetV2PolicyOptions(id string) *GetV2PolicyOptions

NewGetV2PolicyOptions : Instantiate GetV2PolicyOptions

func (*IamPolicyManagementV1) NewGrant added in v0.31.5

func (*IamPolicyManagementV1) NewGrant(roles []Roles) (_model *Grant, err error)

NewGrant : Instantiate Grant (Generic Model Constructor)

func (*IamPolicyManagementV1) NewListPoliciesOptions

func (*IamPolicyManagementV1) NewListPoliciesOptions(accountID string) *ListPoliciesOptions

NewListPoliciesOptions : Instantiate ListPoliciesOptions

func (*IamPolicyManagementV1) NewListPolicyAssignmentsOptions added in v0.43.0

func (*IamPolicyManagementV1) NewListPolicyAssignmentsOptions(version string, accountID string) *ListPolicyAssignmentsOptions

NewListPolicyAssignmentsOptions : Instantiate ListPolicyAssignmentsOptions

func (*IamPolicyManagementV1) NewListPolicyTemplateVersionsOptions added in v0.43.0

func (*IamPolicyManagementV1) NewListPolicyTemplateVersionsOptions(policyTemplateID string) *ListPolicyTemplateVersionsOptions

NewListPolicyTemplateVersionsOptions : Instantiate ListPolicyTemplateVersionsOptions

func (*IamPolicyManagementV1) NewListPolicyTemplatesOptions added in v0.43.0

func (*IamPolicyManagementV1) NewListPolicyTemplatesOptions(accountID string) *ListPolicyTemplatesOptions

NewListPolicyTemplatesOptions : Instantiate ListPolicyTemplatesOptions

func (*IamPolicyManagementV1) NewListRolesOptions

func (*IamPolicyManagementV1) NewListRolesOptions() *ListRolesOptions

NewListRolesOptions : Instantiate ListRolesOptions

func (*IamPolicyManagementV1) NewListV2PoliciesOptions added in v0.31.4

func (*IamPolicyManagementV1) NewListV2PoliciesOptions(accountID string) *ListV2PoliciesOptions

NewListV2PoliciesOptions : Instantiate ListV2PoliciesOptions

func (*IamPolicyManagementV1) NewNestedConditionRuleAttribute added in v0.53.1

func (*IamPolicyManagementV1) NewNestedConditionRuleAttribute(key string, operator string, value interface{}) (_model *NestedConditionRuleAttribute, err error)

NewNestedConditionRuleAttribute : Instantiate NestedConditionRuleAttribute (Generic Model Constructor)

func (*IamPolicyManagementV1) NewNestedConditionRuleWithConditions added in v0.53.1

func (*IamPolicyManagementV1) NewNestedConditionRuleWithConditions(operator string, conditions []RuleAttribute) (_model *NestedConditionRuleWithConditions, err error)

NewNestedConditionRuleWithConditions : Instantiate NestedConditionRuleWithConditions (Generic Model Constructor)

func (*IamPolicyManagementV1) NewPolicyRole

func (*IamPolicyManagementV1) NewPolicyRole(roleID string) (_model *PolicyRole, err error)

NewPolicyRole : Instantiate PolicyRole (Generic Model Constructor)

func (*IamPolicyManagementV1) NewReplacePolicyOptions added in v0.31.4

func (*IamPolicyManagementV1) NewReplacePolicyOptions(policyID string, ifMatch string, typeVar string, subjects []PolicySubject, roles []PolicyRole, resources []PolicyResource) *ReplacePolicyOptions

NewReplacePolicyOptions : Instantiate ReplacePolicyOptions

func (*IamPolicyManagementV1) NewReplacePolicyTemplateOptions added in v0.43.0

func (*IamPolicyManagementV1) NewReplacePolicyTemplateOptions(policyTemplateID string, version string, ifMatch string, policy *TemplatePolicy) *ReplacePolicyTemplateOptions

NewReplacePolicyTemplateOptions : Instantiate ReplacePolicyTemplateOptions

func (*IamPolicyManagementV1) NewReplaceRoleOptions added in v0.31.4

func (*IamPolicyManagementV1) NewReplaceRoleOptions(roleID string, ifMatch string, displayName string, actions []string) *ReplaceRoleOptions

NewReplaceRoleOptions : Instantiate ReplaceRoleOptions

func (*IamPolicyManagementV1) NewReplaceV2PolicyOptions added in v0.31.4

func (*IamPolicyManagementV1) NewReplaceV2PolicyOptions(id string, ifMatch string, control *Control, typeVar string) *ReplaceV2PolicyOptions

NewReplaceV2PolicyOptions : Instantiate ReplaceV2PolicyOptions

func (*IamPolicyManagementV1) NewResourceAttribute

func (*IamPolicyManagementV1) NewResourceAttribute(name string, value string) (_model *ResourceAttribute, err error)

NewResourceAttribute : Instantiate ResourceAttribute (Generic Model Constructor)

func (*IamPolicyManagementV1) NewResourceTag added in v0.17.15

func (*IamPolicyManagementV1) NewResourceTag(name string, value string) (_model *ResourceTag, err error)

NewResourceTag : Instantiate ResourceTag (Generic Model Constructor)

func (*IamPolicyManagementV1) NewRole added in v0.31.4

func (*IamPolicyManagementV1) NewRole(displayName string, actions []string) (_model *Role, err error)

NewRole : Instantiate Role (Generic Model Constructor)

func (*IamPolicyManagementV1) NewRoles added in v0.31.5

func (*IamPolicyManagementV1) NewRoles(roleID string) (_model *Roles, err error)

NewRoles : Instantiate Roles (Generic Model Constructor)

func (*IamPolicyManagementV1) NewRuleAttribute added in v0.31.4

func (*IamPolicyManagementV1) NewRuleAttribute(key string, operator string, value interface{}) (_model *RuleAttribute, err error)

NewRuleAttribute : Instantiate RuleAttribute (Generic Model Constructor)

func (*IamPolicyManagementV1) NewSubjectAttribute

func (*IamPolicyManagementV1) NewSubjectAttribute(name string, value string) (_model *SubjectAttribute, err error)

NewSubjectAttribute : Instantiate SubjectAttribute (Generic Model Constructor)

func (*IamPolicyManagementV1) NewTemplatePolicy added in v0.43.0

func (*IamPolicyManagementV1) NewTemplatePolicy(typeVar string) (_model *TemplatePolicy, err error)

NewTemplatePolicy : Instantiate TemplatePolicy (Generic Model Constructor)

func (*IamPolicyManagementV1) NewUpdatePolicyAssignmentOptions added in v0.62.4

func (*IamPolicyManagementV1) NewUpdatePolicyAssignmentOptions(assignmentID string, version string, ifMatch string, templateVersion string) *UpdatePolicyAssignmentOptions

NewUpdatePolicyAssignmentOptions : Instantiate UpdatePolicyAssignmentOptions

func (*IamPolicyManagementV1) NewUpdatePolicyStateOptions added in v0.31.4

func (*IamPolicyManagementV1) NewUpdatePolicyStateOptions(policyID string, ifMatch string) *UpdatePolicyStateOptions

NewUpdatePolicyStateOptions : Instantiate UpdatePolicyStateOptions

func (*IamPolicyManagementV1) NewV2PolicyResource added in v0.31.4

func (*IamPolicyManagementV1) NewV2PolicyResource(attributes []V2PolicyResourceAttribute) (_model *V2PolicyResource, err error)

NewV2PolicyResource : Instantiate V2PolicyResource (Generic Model Constructor)

func (*IamPolicyManagementV1) NewV2PolicyResourceAttribute added in v0.31.4

func (*IamPolicyManagementV1) NewV2PolicyResourceAttribute(key string, operator string, value interface{}) (_model *V2PolicyResourceAttribute, err error)

NewV2PolicyResourceAttribute : Instantiate V2PolicyResourceAttribute (Generic Model Constructor)

func (*IamPolicyManagementV1) NewV2PolicyResourceTag added in v0.31.4

func (*IamPolicyManagementV1) NewV2PolicyResourceTag(key string, value string, operator string) (_model *V2PolicyResourceTag, err error)

NewV2PolicyResourceTag : Instantiate V2PolicyResourceTag (Generic Model Constructor)

func (*IamPolicyManagementV1) NewV2PolicyRuleRuleAttribute added in v0.31.4

func (*IamPolicyManagementV1) NewV2PolicyRuleRuleAttribute(key string, operator string, value interface{}) (_model *V2PolicyRuleRuleAttribute, err error)

NewV2PolicyRuleRuleAttribute : Instantiate V2PolicyRuleRuleAttribute (Generic Model Constructor)

func (*IamPolicyManagementV1) NewV2PolicyRuleRuleWithNestedConditions added in v0.53.1

func (*IamPolicyManagementV1) NewV2PolicyRuleRuleWithNestedConditions(operator string, conditions []NestedConditionIntf) (_model *V2PolicyRuleRuleWithNestedConditions, err error)

NewV2PolicyRuleRuleWithNestedConditions : Instantiate V2PolicyRuleRuleWithNestedConditions (Generic Model Constructor)

func (*IamPolicyManagementV1) NewV2PolicySubject added in v0.31.4

func (*IamPolicyManagementV1) NewV2PolicySubject(attributes []V2PolicySubjectAttribute) (_model *V2PolicySubject, err error)

NewV2PolicySubject : Instantiate V2PolicySubject (Generic Model Constructor)

func (*IamPolicyManagementV1) NewV2PolicySubjectAttribute added in v0.31.4

func (*IamPolicyManagementV1) NewV2PolicySubjectAttribute(key string, operator string, value interface{}) (_model *V2PolicySubjectAttribute, err error)

NewV2PolicySubjectAttribute : Instantiate V2PolicySubjectAttribute (Generic Model Constructor)

func (*IamPolicyManagementV1) ReplacePolicy added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) ReplacePolicy(replacePolicyOptions *ReplacePolicyOptions) (result *Policy, response *core.DetailedResponse, err error)

ReplacePolicy : Update a policy Update a policy to grant access between a subject and a resource. A policy administrator might want to update an existing policy. The policy type cannot be changed (You cannot change an access policy to an authorization policy).

### Access

To update an access policy, use **`"type": "access"`** in the body. The possible subject attributes are **`iam_id`** and **`access_group_id`**. Use the **`iam_id`** subject attribute for assigning access for a user or service-id. Use the **`access_group_id`** subject attribute for assigning access for an access group. Assign roles that are supported by the service or platform roles. For more information, see [IAM roles and actions](/docs/account?topic=account-iam-service-roles-actions). Use only the resource attributes supported by the service. To view a service's or the platform's supported attributes, check the [documentation](/docs?tab=all-docs). The policy resource must include either the **`serviceType`**, **`serviceName`**, or **`resourceGroupId`** attribute and the **`accountId`** attribute.` If the subject is a locked service-id, the request will fail.

### Authorization

To update an authorization policy, use **`"type": "authorization"`** in the body. The subject attributes must match the supported authorization subjects of the resource. Multiple subject attributes might be provided. The following attributes are supported:

serviceName, serviceInstance, region, resourceType, resource, accountId, resourceGroupId Assign roles that are

supported by the service or platform roles. For more information, see [IAM roles and actions](/docs/account?topic=account-iam-service-roles-actions). The user must also have the same level of access or greater to the target resource in order to grant the role. Use only the resource attributes supported by the service. To view a service's or the platform's supported attributes, check the [documentation](/docs?tab=all-docs). Both the policy subject and the policy resource must include the **`accountId`** attributes. The policy subject must include either **`serviceName`** or **`resourceGroupId`** (or both) attributes.

### Attribute Operators

Currently, only the `stringEquals` and the `stringMatch` operators are available. Resource attributes might support one or both operators. For more information, see [Assigning access by using wildcard policies](https://cloud.ibm.com/docs/account?topic=account-wildcard).

### Attribute Validations

Policy attribute values must be between 1 and 1,000 characters in length. If location related attributes like geography, country, metro, region, satellite, and locationvalues are supported by the service, they are validated against Global Catalog locations.

func (*IamPolicyManagementV1) ReplacePolicyTemplate added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) ReplacePolicyTemplate(replacePolicyTemplateOptions *ReplacePolicyTemplateOptions) (result *PolicyTemplate, response *core.DetailedResponse, err error)

ReplacePolicyTemplate : Update a policy template version Update a specific version of a policy template. You can use this only if the version isn't committed.

func (*IamPolicyManagementV1) ReplacePolicyTemplateWithContext added in v0.43.0

func (iamPolicyManagement *IamPolicyManagementV1) ReplacePolicyTemplateWithContext(ctx context.Context, replacePolicyTemplateOptions *ReplacePolicyTemplateOptions) (result *PolicyTemplate, response *core.DetailedResponse, err error)

ReplacePolicyTemplateWithContext is an alternate form of the ReplacePolicyTemplate method which supports a Context parameter

func (*IamPolicyManagementV1) ReplacePolicyWithContext added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) ReplacePolicyWithContext(ctx context.Context, replacePolicyOptions *ReplacePolicyOptions) (result *Policy, response *core.DetailedResponse, err error)

ReplacePolicyWithContext is an alternate form of the ReplacePolicy method which supports a Context parameter

func (*IamPolicyManagementV1) ReplaceRole added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) ReplaceRole(replaceRoleOptions *ReplaceRoleOptions) (result *CustomRole, response *core.DetailedResponse, err error)

ReplaceRole : Update a role Update a custom role. A role administrator might want to update an existing role by updating the display name, description, or the actions that are mapped to the role. The name, account_id, and service_name can't be changed.

func (*IamPolicyManagementV1) ReplaceRoleWithContext added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) ReplaceRoleWithContext(ctx context.Context, replaceRoleOptions *ReplaceRoleOptions) (result *CustomRole, response *core.DetailedResponse, err error)

ReplaceRoleWithContext is an alternate form of the ReplaceRole method which supports a Context parameter

func (*IamPolicyManagementV1) ReplaceV2Policy added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) ReplaceV2Policy(replaceV2PolicyOptions *ReplaceV2PolicyOptions) (result *V2Policy, response *core.DetailedResponse, err error)

ReplaceV2Policy : Update a policy Update a policy to grant access between a subject and a resource. A policy administrator might want to update an existing policy.

### Access

To update an access policy, use **`"type": "access"`** in the body. The supported subject attributes are **`iam_id`** and **`access_group_id`**. Use the **`iam_id`** subject attribute to assign access to a user or service-id. Use the **`access_group_id`** subject attribute to assign access to an access group. Assign roles that are supported by the service or platform roles. For more information, see [IAM roles and actions](/docs/account?topic=account-iam-service-roles-actions). Use only the resource attributes supported by the service. To view a service's or the platform's supported attributes, check the [documentation](/docs?tab=all-docs). The policy resource must include either the **`serviceType`**, **`serviceName`**, **`resourceGroupId`** or **`service_group_id`** attribute and the **`accountId`** attribute. In the rule field, you can specify a single condition by using **`key`**, **`value`**, and condition **`operator`**, or a set of **`conditions`** with a combination **`operator`**. The possible combination operators are **`and`** and **`or`**.

Currently, we support two types of patterns:

1. `time-based`: Used to specify a time-based restriction

Combine conditions to specify a time-based restriction (e.g., access only during business hours, during the Monday-Friday work week). For example, a policy can grant access Monday-Friday, 9:00am-5:00pm using the following rule: ```json

"rule": {
  "operator": "and",
  "conditions": [{
    "key": "{{environment.attributes.day_of_week}}",
    "operator": "dayOfWeekAnyOf",
    "value": ["1+00:00", "2+00:00", "3+00:00", "4+00:00", "5+00:00"]
  },
    "key": "{{environment.attributes.current_time}}",
    "operator": "timeGreaterThanOrEquals",
    "value": "09:00:00+00:00"
  },
    "key": "{{environment.attributes.current_time}}",
    "operator": "timeLessThanOrEquals",
    "value": "17:00:00+00:00"
  }]
}

``` You can use the following operators in the **`key`** and **`value`** pair: ```

'timeLessThan', 'timeLessThanOrEquals', 'timeGreaterThan', 'timeGreaterThanOrEquals',
'dateLessThan', 'dateLessThanOrEquals', 'dateGreaterThan', 'dateGreaterThanOrEquals',
'dateTimeLessThan', 'dateTimeLessThanOrEquals', 'dateTimeGreaterThan', 'dateTimeGreaterThanOrEquals',
'dayOfWeekEquals', 'dayOfWeekAnyOf'

``` The pattern field that matches the rule is required when rule is provided. For the business hour rule example above, the **`pattern`** is **`"time-based-conditions:weekly"`**. For more information, see [Time-based conditions operators](/docs/account?topic=account-iam-condition-properties&interface=ui#policy-condition-properties) and [Limiting access with time-based conditions](/docs/account?topic=account-iam-time-based&interface=ui). If the subject is a locked service-id, the request will fail.

2. `attribute-based`: Used to specify a combination of OR/AND based conditions applied on resource attributes.

Combine conditions to specify an attribute-based condition using AND/OR-based operators.

For example, a policy can grant access based on multiple conditions applied on the resource attributes below: ```json

"pattern": "attribute-based-condition:resource:literal-and-wildcard"
"rule": {
    "operator": "or",
    "conditions": [
      {
        "operator": "and",
        "conditions": [
          {
            "key": "{{resource.attributes.prefix}}",
            "operator": "stringEquals",
            "value": "home/test"
          },
          {
            "key": "{{environment.attributes.delimiter}}",
            "operator": "stringEquals",
            "value": "/"
          }
        ]
      },
      {
        "key": "{{resource.attributes.path}}",
        "operator": "stringMatch",
        "value": "home/David/_*"
      }
    ]
}

```

In addition to satisfying the `resources` section, the policy grants permission only if either the `path` begins with `home/David/` **OR** the `prefix` is `home/test` and the `delimiter` is `/`. This mechanism helps you consolidate multiple policies in to a single policy, making policies easier to administer and stay within the policy limit for an account. View the list of operators that can be used in the condition [here](/docs/account?topic=account-wildcard#string-comparisons).

### Authorization

To update an authorization policy, use **`"type": "authorization"`** in the body. The subject attributes must match the supported authorization subjects of the resource. Multiple subject attributes might be provided. The following attributes are supported:

serviceName, serviceInstance, region, resourceType, resource, accountId, resourceGroupId Assign roles that are

supported by the service or platform roles. For more information, see [IAM roles and actions](/docs/account?topic=account-iam-service-roles-actions). The user must also have the same level of access or greater to the target resource in order to grant the role. Use only the resource attributes supported by the service. To view a service's or the platform's supported attributes, check the [documentation](/docs?tab=all-docs). Both the policy subject and the policy resource must include the **`accountId`** attributes. The policy subject must include either **`serviceName`** or **`resourceGroupId`** (or both) attributes.

### Attribute Operators

Currently, only the `stringEquals`, `stringMatch`, and `stringEquals` operators are available. For more information, see [Assigning access by using wildcard policies](https://cloud.ibm.com/docs/account?topic=account-wildcard).

### Attribute Validations

Policy attribute values must be between 1 and 1,000 characters in length. If location related attributes like geography, country, metro, region, satellite, and locationvalues are supported by the service, they are validated against Global Catalog locations.

func (*IamPolicyManagementV1) ReplaceV2PolicyWithContext added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) ReplaceV2PolicyWithContext(ctx context.Context, replaceV2PolicyOptions *ReplaceV2PolicyOptions) (result *V2Policy, response *core.DetailedResponse, err error)

ReplaceV2PolicyWithContext is an alternate form of the ReplaceV2Policy method which supports a Context parameter

func (*IamPolicyManagementV1) SetDefaultHeaders added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*IamPolicyManagementV1) SetEnableGzipCompression added in v0.12.2

func (iamPolicyManagement *IamPolicyManagementV1) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*IamPolicyManagementV1) SetServiceURL

func (iamPolicyManagement *IamPolicyManagementV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*IamPolicyManagementV1) UpdatePolicyAssignment added in v0.62.4

func (iamPolicyManagement *IamPolicyManagementV1) UpdatePolicyAssignment(updatePolicyAssignmentOptions *UpdatePolicyAssignmentOptions) (result *PolicyAssignmentV1, response *core.DetailedResponse, err error)

UpdatePolicyAssignment : Update a policy authorization type assignment Update a policy assignment by providing a policy assignment ID.

func (*IamPolicyManagementV1) UpdatePolicyAssignmentWithContext added in v0.62.4

func (iamPolicyManagement *IamPolicyManagementV1) UpdatePolicyAssignmentWithContext(ctx context.Context, updatePolicyAssignmentOptions *UpdatePolicyAssignmentOptions) (result *PolicyAssignmentV1, response *core.DetailedResponse, err error)

UpdatePolicyAssignmentWithContext is an alternate form of the UpdatePolicyAssignment method which supports a Context parameter

func (*IamPolicyManagementV1) UpdatePolicyState added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) UpdatePolicyState(updatePolicyStateOptions *UpdatePolicyStateOptions) (result *Policy, response *core.DetailedResponse, err error)

UpdatePolicyState : Restore a deleted policy by ID Restore a policy that has recently been deleted. A policy administrator might want to restore a deleted policy. To restore a policy, use **`"state": "active"`** in the body.

func (*IamPolicyManagementV1) UpdatePolicyStateWithContext added in v0.31.4

func (iamPolicyManagement *IamPolicyManagementV1) UpdatePolicyStateWithContext(ctx context.Context, updatePolicyStateOptions *UpdatePolicyStateOptions) (result *Policy, response *core.DetailedResponse, err error)

UpdatePolicyStateWithContext is an alternate form of the UpdatePolicyState method which supports a Context parameter

type IamPolicyManagementV1Options

type IamPolicyManagementV1Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator
}

IamPolicyManagementV1Options : Service options

type LimitData added in v0.52.1

type LimitData struct {
	// policy template current count.
	Current *int64 `json:"current,omitempty"`

	// policy template limit count.
	Limit *int64 `json:"limit,omitempty"`
}

LimitData : policy template current and limit details with in an account.

type ListPoliciesOptions

type ListPoliciesOptions struct {
	// The account GUID that the policies belong to.
	AccountID *string `json:"account_id" validate:"required"`

	// Language code for translations
	// * `default` - English
	// * `de` -  German (Standard)
	// * `en` - English
	// * `es` - Spanish (Spain)
	// * `fr` - French (Standard)
	// * `it` - Italian (Standard)
	// * `ja` - Japanese
	// * `ko` - Korean
	// * `pt-br` - Portuguese (Brazil)
	// * `zh-cn` - Chinese (Simplified, PRC)
	// * `zh-tw` - (Chinese, Taiwan).
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Optional IAM ID used to identify the subject.
	IamID *string `json:"iam_id,omitempty"`

	// Optional access group id.
	AccessGroupID *string `json:"access_group_id,omitempty"`

	// Optional type of policy.
	Type *string `json:"type,omitempty"`

	// Optional type of service.
	ServiceType *string `json:"service_type,omitempty"`

	// Optional name of the access tag in the policy.
	TagName *string `json:"tag_name,omitempty"`

	// Optional value of the access tag in the policy.
	TagValue *string `json:"tag_value,omitempty"`

	// Optional top level policy field to sort results. Ascending sort is default. Descending sort available by prepending
	// '-' to field. Example '-last_modified_at'.
	Sort *string `json:"sort,omitempty"`

	// Include additional data per policy returned
	// * `include_last_permit` - returns details of when the policy last granted a permit decision and the number of times
	// it has done so
	// * `display` - returns the list of all actions included in each of the policy roles.
	Format *string `json:"format,omitempty"`

	// The state of the policy.
	// * `active` - returns active policies
	// * `deleted` - returns non-active policies.
	State *string `json:"state,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListPoliciesOptions : The ListPolicies options.

func (*ListPoliciesOptions) SetAcceptLanguage

func (_options *ListPoliciesOptions) SetAcceptLanguage(acceptLanguage string) *ListPoliciesOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*ListPoliciesOptions) SetAccessGroupID

func (_options *ListPoliciesOptions) SetAccessGroupID(accessGroupID string) *ListPoliciesOptions

SetAccessGroupID : Allow user to set AccessGroupID

func (*ListPoliciesOptions) SetAccountID

func (_options *ListPoliciesOptions) SetAccountID(accountID string) *ListPoliciesOptions

SetAccountID : Allow user to set AccountID

func (*ListPoliciesOptions) SetFormat added in v0.17.2

func (_options *ListPoliciesOptions) SetFormat(format string) *ListPoliciesOptions

SetFormat : Allow user to set Format

func (*ListPoliciesOptions) SetHeaders

func (options *ListPoliciesOptions) SetHeaders(param map[string]string) *ListPoliciesOptions

SetHeaders : Allow user to set Headers

func (*ListPoliciesOptions) SetIamID

func (_options *ListPoliciesOptions) SetIamID(iamID string) *ListPoliciesOptions

SetIamID : Allow user to set IamID

func (*ListPoliciesOptions) SetServiceType

func (_options *ListPoliciesOptions) SetServiceType(serviceType string) *ListPoliciesOptions

SetServiceType : Allow user to set ServiceType

func (*ListPoliciesOptions) SetSort added in v0.17.2

func (_options *ListPoliciesOptions) SetSort(sort string) *ListPoliciesOptions

SetSort : Allow user to set Sort

func (*ListPoliciesOptions) SetState added in v0.18.5

func (_options *ListPoliciesOptions) SetState(state string) *ListPoliciesOptions

SetState : Allow user to set State

func (*ListPoliciesOptions) SetTagName added in v0.17.15

func (_options *ListPoliciesOptions) SetTagName(tagName string) *ListPoliciesOptions

SetTagName : Allow user to set TagName

func (*ListPoliciesOptions) SetTagValue added in v0.17.15

func (_options *ListPoliciesOptions) SetTagValue(tagValue string) *ListPoliciesOptions

SetTagValue : Allow user to set TagValue

func (*ListPoliciesOptions) SetType

func (_options *ListPoliciesOptions) SetType(typeVar string) *ListPoliciesOptions

SetType : Allow user to set Type

type ListPolicyAssignmentsOptions added in v0.43.0

type ListPolicyAssignmentsOptions struct {
	// specify version of response body format.
	Version *string `json:"version" validate:"required"`

	// The account GUID in which the policies belong to.
	AccountID *string `json:"account_id" validate:"required"`

	// Language code for translations
	// * `default` - English
	// * `de` -  German (Standard)
	// * `en` - English
	// * `es` - Spanish (Spain)
	// * `fr` - French (Standard)
	// * `it` - Italian (Standard)
	// * `ja` - Japanese
	// * `ko` - Korean
	// * `pt-br` - Portuguese (Brazil)
	// * `zh-cn` - Chinese (Simplified, PRC)
	// * `zh-tw` - (Chinese, Taiwan).
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Optional template id.
	TemplateID *string `json:"template_id,omitempty"`

	// Optional policy template version.
	TemplateVersion *string `json:"template_version,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListPolicyAssignmentsOptions : The ListPolicyAssignments options.

func (*ListPolicyAssignmentsOptions) SetAcceptLanguage added in v0.43.0

func (_options *ListPolicyAssignmentsOptions) SetAcceptLanguage(acceptLanguage string) *ListPolicyAssignmentsOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*ListPolicyAssignmentsOptions) SetAccountID added in v0.43.0

func (_options *ListPolicyAssignmentsOptions) SetAccountID(accountID string) *ListPolicyAssignmentsOptions

SetAccountID : Allow user to set AccountID

func (*ListPolicyAssignmentsOptions) SetHeaders added in v0.43.0

SetHeaders : Allow user to set Headers

func (*ListPolicyAssignmentsOptions) SetTemplateID added in v0.43.0

func (_options *ListPolicyAssignmentsOptions) SetTemplateID(templateID string) *ListPolicyAssignmentsOptions

SetTemplateID : Allow user to set TemplateID

func (*ListPolicyAssignmentsOptions) SetTemplateVersion added in v0.43.0

func (_options *ListPolicyAssignmentsOptions) SetTemplateVersion(templateVersion string) *ListPolicyAssignmentsOptions

SetTemplateVersion : Allow user to set TemplateVersion

func (*ListPolicyAssignmentsOptions) SetVersion added in v0.62.4

func (_options *ListPolicyAssignmentsOptions) SetVersion(version string) *ListPolicyAssignmentsOptions

SetVersion : Allow user to set Version

type ListPolicyTemplateVersionsOptions added in v0.43.0

type ListPolicyTemplateVersionsOptions struct {
	// The policy template ID.
	PolicyTemplateID *string `json:"policy_template_id" validate:"required,ne="`

	// The policy template state.
	State *string `json:"state,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListPolicyTemplateVersionsOptions : The ListPolicyTemplateVersions options.

func (*ListPolicyTemplateVersionsOptions) SetHeaders added in v0.43.0

SetHeaders : Allow user to set Headers

func (*ListPolicyTemplateVersionsOptions) SetPolicyTemplateID added in v0.43.0

func (_options *ListPolicyTemplateVersionsOptions) SetPolicyTemplateID(policyTemplateID string) *ListPolicyTemplateVersionsOptions

SetPolicyTemplateID : Allow user to set PolicyTemplateID

func (*ListPolicyTemplateVersionsOptions) SetState added in v0.56.0

SetState : Allow user to set State

type ListPolicyTemplatesOptions added in v0.43.0

type ListPolicyTemplatesOptions struct {
	// The account GUID that the policy templates belong to.
	AccountID *string `json:"account_id" validate:"required"`

	// Language code for translations
	// * `default` - English
	// * `de` -  German (Standard)
	// * `en` - English
	// * `es` - Spanish (Spain)
	// * `fr` - French (Standard)
	// * `it` - Italian (Standard)
	// * `ja` - Japanese
	// * `ko` - Korean
	// * `pt-br` - Portuguese (Brazil)
	// * `zh-cn` - Chinese (Simplified, PRC)
	// * `zh-tw` - (Chinese, Taiwan).
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// The policy template state.
	State *string `json:"state,omitempty"`

	// The policy template name.
	Name *string `json:"name,omitempty"`

	// Service type, Optional.
	PolicyServiceType *string `json:"policy_service_type,omitempty"`

	// Service name, Optional.
	PolicyServiceName *string `json:"policy_service_name,omitempty"`

	// Service group id, Optional.
	PolicyServiceGroupID *string `json:"policy_service_group_id,omitempty"`

	// Policy type, Optional.
	PolicyType *string `json:"policy_type,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListPolicyTemplatesOptions : The ListPolicyTemplates options.

func (*ListPolicyTemplatesOptions) SetAcceptLanguage added in v0.43.0

func (_options *ListPolicyTemplatesOptions) SetAcceptLanguage(acceptLanguage string) *ListPolicyTemplatesOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*ListPolicyTemplatesOptions) SetAccountID added in v0.43.0

func (_options *ListPolicyTemplatesOptions) SetAccountID(accountID string) *ListPolicyTemplatesOptions

SetAccountID : Allow user to set AccountID

func (*ListPolicyTemplatesOptions) SetHeaders added in v0.43.0

func (options *ListPolicyTemplatesOptions) SetHeaders(param map[string]string) *ListPolicyTemplatesOptions

SetHeaders : Allow user to set Headers

func (*ListPolicyTemplatesOptions) SetName added in v0.62.4

SetName : Allow user to set Name

func (*ListPolicyTemplatesOptions) SetPolicyServiceGroupID added in v0.62.4

func (_options *ListPolicyTemplatesOptions) SetPolicyServiceGroupID(policyServiceGroupID string) *ListPolicyTemplatesOptions

SetPolicyServiceGroupID : Allow user to set PolicyServiceGroupID

func (*ListPolicyTemplatesOptions) SetPolicyServiceName added in v0.62.4

func (_options *ListPolicyTemplatesOptions) SetPolicyServiceName(policyServiceName string) *ListPolicyTemplatesOptions

SetPolicyServiceName : Allow user to set PolicyServiceName

func (*ListPolicyTemplatesOptions) SetPolicyServiceType added in v0.62.4

func (_options *ListPolicyTemplatesOptions) SetPolicyServiceType(policyServiceType string) *ListPolicyTemplatesOptions

SetPolicyServiceType : Allow user to set PolicyServiceType

func (*ListPolicyTemplatesOptions) SetPolicyType added in v0.62.4

func (_options *ListPolicyTemplatesOptions) SetPolicyType(policyType string) *ListPolicyTemplatesOptions

SetPolicyType : Allow user to set PolicyType

func (*ListPolicyTemplatesOptions) SetState added in v0.56.0

SetState : Allow user to set State

type ListRolesOptions

type ListRolesOptions struct {
	// Language code for translations
	// * `default` - English
	// * `de` -  German (Standard)
	// * `en` - English
	// * `es` - Spanish (Spain)
	// * `fr` - French (Standard)
	// * `it` - Italian (Standard)
	// * `ja` - Japanese
	// * `ko` - Korean
	// * `pt-br` - Portuguese (Brazil)
	// * `zh-cn` - Chinese (Simplified, PRC)
	// * `zh-tw` - (Chinese, Taiwan).
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Optional account GUID in which the roles belong to.
	AccountID *string `json:"account_id,omitempty"`

	// Optional name of IAM enabled service.
	ServiceName *string `json:"service_name,omitempty"`

	// Optional name of source IAM enabled service.
	SourceServiceName *string `json:"source_service_name,omitempty"`

	// Optional Policy Type.
	PolicyType *string `json:"policy_type,omitempty"`

	// Optional id of service group.
	ServiceGroupID *string `json:"service_group_id,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListRolesOptions : The ListRoles options.

func (*ListRolesOptions) SetAcceptLanguage

func (_options *ListRolesOptions) SetAcceptLanguage(acceptLanguage string) *ListRolesOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*ListRolesOptions) SetAccountID

func (_options *ListRolesOptions) SetAccountID(accountID string) *ListRolesOptions

SetAccountID : Allow user to set AccountID

func (*ListRolesOptions) SetHeaders

func (options *ListRolesOptions) SetHeaders(param map[string]string) *ListRolesOptions

SetHeaders : Allow user to set Headers

func (*ListRolesOptions) SetPolicyType added in v0.22.0

func (_options *ListRolesOptions) SetPolicyType(policyType string) *ListRolesOptions

SetPolicyType : Allow user to set PolicyType

func (*ListRolesOptions) SetServiceGroupID added in v0.33.0

func (_options *ListRolesOptions) SetServiceGroupID(serviceGroupID string) *ListRolesOptions

SetServiceGroupID : Allow user to set ServiceGroupID

func (*ListRolesOptions) SetServiceName

func (_options *ListRolesOptions) SetServiceName(serviceName string) *ListRolesOptions

SetServiceName : Allow user to set ServiceName

func (*ListRolesOptions) SetSourceServiceName added in v0.22.0

func (_options *ListRolesOptions) SetSourceServiceName(sourceServiceName string) *ListRolesOptions

SetSourceServiceName : Allow user to set SourceServiceName

type ListV2PoliciesOptions added in v0.31.4

type ListV2PoliciesOptions struct {
	// The account GUID in which the policies belong to.
	AccountID *string `json:"account_id" validate:"required"`

	// Language code for translations
	// * `default` - English
	// * `de` -  German (Standard)
	// * `en` - English
	// * `es` - Spanish (Spain)
	// * `fr` - French (Standard)
	// * `it` - Italian (Standard)
	// * `ja` - Japanese
	// * `ko` - Korean
	// * `pt-br` - Portuguese (Brazil)
	// * `zh-cn` - Chinese (Simplified, PRC)
	// * `zh-tw` - (Chinese, Taiwan).
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Optional IAM ID used to identify the subject.
	IamID *string `json:"iam_id,omitempty"`

	// Optional access group id.
	AccessGroupID *string `json:"access_group_id,omitempty"`

	// Optional type of policy.
	Type *string `json:"type,omitempty"`

	// Optional type of service.
	ServiceType *string `json:"service_type,omitempty"`

	// Optional name of service.
	ServiceName *string `json:"service_name,omitempty"`

	// Optional ID of service group.
	ServiceGroupID *string `json:"service_group_id,omitempty"`

	// Optional top level policy field to sort results. Ascending sort is default. Descending sort available by prepending
	// '-' to field, for example, '-last_modified_at'. Note that last permit information is only included when
	// 'format=include_last_permit', for example, "format=include_last_permit&sort=last_permit_at" Example fields that can
	// be sorted on:
	//   - 'id'
	//   - 'type'
	//   - 'href'
	//   - 'created_at'
	//   - 'created_by_id'
	//   - 'last_modified_at'
	//   - 'last_modified_by_id'
	//   - 'state'
	//   - 'last_permit_at'
	//   - 'last_permit_frequency'.
	Sort *string `json:"sort,omitempty"`

	// Include additional data per policy returned
	// * `include_last_permit` - returns details of when the policy last granted a permit decision and the number of times
	// it has done so
	// * `display` - returns the list of all actions included in each of the policy roles and translations for all relevant
	// fields.
	Format *string `json:"format,omitempty"`

	// The state of the policy.
	// * `active` - returns active policies
	// * `deleted` - returns non-active policies.
	State *string `json:"state,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListV2PoliciesOptions : The ListV2Policies options.

func (*ListV2PoliciesOptions) SetAcceptLanguage added in v0.31.4

func (_options *ListV2PoliciesOptions) SetAcceptLanguage(acceptLanguage string) *ListV2PoliciesOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*ListV2PoliciesOptions) SetAccessGroupID added in v0.31.4

func (_options *ListV2PoliciesOptions) SetAccessGroupID(accessGroupID string) *ListV2PoliciesOptions

SetAccessGroupID : Allow user to set AccessGroupID

func (*ListV2PoliciesOptions) SetAccountID added in v0.31.4

func (_options *ListV2PoliciesOptions) SetAccountID(accountID string) *ListV2PoliciesOptions

SetAccountID : Allow user to set AccountID

func (*ListV2PoliciesOptions) SetFormat added in v0.31.4

func (_options *ListV2PoliciesOptions) SetFormat(format string) *ListV2PoliciesOptions

SetFormat : Allow user to set Format

func (*ListV2PoliciesOptions) SetHeaders added in v0.31.4

func (options *ListV2PoliciesOptions) SetHeaders(param map[string]string) *ListV2PoliciesOptions

SetHeaders : Allow user to set Headers

func (*ListV2PoliciesOptions) SetIamID added in v0.31.4

func (_options *ListV2PoliciesOptions) SetIamID(iamID string) *ListV2PoliciesOptions

SetIamID : Allow user to set IamID

func (*ListV2PoliciesOptions) SetServiceGroupID added in v0.31.4

func (_options *ListV2PoliciesOptions) SetServiceGroupID(serviceGroupID string) *ListV2PoliciesOptions

SetServiceGroupID : Allow user to set ServiceGroupID

func (*ListV2PoliciesOptions) SetServiceName added in v0.31.4

func (_options *ListV2PoliciesOptions) SetServiceName(serviceName string) *ListV2PoliciesOptions

SetServiceName : Allow user to set ServiceName

func (*ListV2PoliciesOptions) SetServiceType added in v0.31.4

func (_options *ListV2PoliciesOptions) SetServiceType(serviceType string) *ListV2PoliciesOptions

SetServiceType : Allow user to set ServiceType

func (*ListV2PoliciesOptions) SetSort added in v0.32.1

func (_options *ListV2PoliciesOptions) SetSort(sort string) *ListV2PoliciesOptions

SetSort : Allow user to set Sort

func (*ListV2PoliciesOptions) SetState added in v0.31.4

func (_options *ListV2PoliciesOptions) SetState(state string) *ListV2PoliciesOptions

SetState : Allow user to set State

func (*ListV2PoliciesOptions) SetType added in v0.31.4

func (_options *ListV2PoliciesOptions) SetType(typeVar string) *ListV2PoliciesOptions

SetType : Allow user to set Type

type NestedCondition added in v0.53.1

type NestedCondition struct {
	// The name of an attribute.
	Key *string `json:"key,omitempty"`

	// The operator of an attribute.
	Operator *string `json:"operator,omitempty"`

	// The value of a rule, resource, or subject attribute; can be boolean or string for resource and subject attribute.
	// Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
	Value interface{} `json:"value,omitempty"`

	// List of conditions associated with a policy, e.g., time-based conditions that grant access over a certain time
	// period.
	Conditions []RuleAttribute `json:"conditions,omitempty"`
}

NestedCondition : Condition that specifies additional conditions or RuleAttribute to grant access. Models which "extend" this model: - NestedConditionRuleAttribute - NestedConditionRuleWithConditions

type NestedConditionIntf added in v0.53.1

type NestedConditionIntf interface {
	// contains filtered or unexported methods
}

type NestedConditionRuleAttribute added in v0.53.1

type NestedConditionRuleAttribute struct {
	// The name of an attribute.
	Key *string `json:"key" validate:"required"`

	// The operator of an attribute.
	Operator *string `json:"operator" validate:"required"`

	// The value of a rule, resource, or subject attribute; can be boolean or string for resource and subject attribute.
	// Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
	Value interface{} `json:"value" validate:"required"`
}

NestedConditionRuleAttribute : Rule that specifies additional access granted (e.g., time-based condition). This model "extends" NestedCondition

type NestedConditionRuleWithConditions added in v0.53.1

type NestedConditionRuleWithConditions struct {
	// Operator to evaluate conditions.
	Operator *string `json:"operator" validate:"required"`

	// List of conditions associated with a policy, e.g., time-based conditions that grant access over a certain time
	// period.
	Conditions []RuleAttribute `json:"conditions" validate:"required"`
}

NestedConditionRuleWithConditions : Rule that specifies additional access granted (e.g., time-based condition) accross multiple conditions. This model "extends" NestedCondition

type Policy

type Policy struct {
	// The policy ID.
	ID *string `json:"id,omitempty"`

	// The policy type; either 'access' or 'authorization'.
	Type *string `json:"type" validate:"required"`

	// Customer-defined description.
	Description *string `json:"description,omitempty"`

	// The subjects associated with a policy.
	Subjects []PolicySubject `json:"subjects" validate:"required"`

	// A set of role cloud resource names (CRNs) granted by the policy.
	Roles []PolicyRole `json:"roles" validate:"required"`

	// The resources associated with a policy.
	Resources []PolicyResource `json:"resources" validate:"required"`

	// The href link back to the policy.
	Href *string `json:"href,omitempty"`

	// The UTC timestamp when the policy was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the policy.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the policy was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`

	// The policy state.
	State *string `json:"state,omitempty"`
}

Policy : The core set of properties associated with a policy.

type PolicyAssignmentResourcePolicy added in v0.47.0

type PolicyAssignmentResourcePolicy struct {
	// On success, includes the  policy assigned.
	ResourceCreated *AssignmentResourceCreated `json:"resource_created,omitempty"`

	// policy status.
	Status *string `json:"status,omitempty"`

	// The error response from API.
	ErrorMessage *ErrorResponse `json:"error_message,omitempty"`
}

PolicyAssignmentResourcePolicy : Set of properties for the assigned resource.

type PolicyAssignmentResources added in v0.43.0

type PolicyAssignmentResources struct {
	// Account ID where resources are assigned.
	Target *string `json:"target,omitempty"`

	// Set of properties for the assigned resource.
	Policy *PolicyAssignmentResourcePolicy `json:"policy,omitempty"`
}

PolicyAssignmentResources : The policy assignment resources.

type PolicyAssignmentV1 added in v0.62.4

type PolicyAssignmentV1 struct {
	// assignment target account and type.
	Target *AssignmentTargetDetails `json:"target" validate:"required"`

	// Policy assignment ID.
	ID *string `json:"id,omitempty"`

	// The account GUID that the policies assignments belong to..
	AccountID *string `json:"account_id,omitempty"`

	// The href URL that links to the policies assignments API by policy assignment ID.
	Href *string `json:"href,omitempty"`

	// The UTC timestamp when the policy assignment was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the policy assignment.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the policy assignment was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy assignment.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`

	// Object for each account assigned.
	Resources []PolicyAssignmentV1Resources `json:"resources" validate:"required"`

	// subject details of access type assignment.
	Subject *PolicyAssignmentV1Subject `json:"subject,omitempty"`

	// policy template details.
	Template *AssignmentTemplateDetails `json:"template" validate:"required"`

	// The policy assignment status.
	Status *string `json:"status" validate:"required"`
}

PolicyAssignmentV1 : The set of properties associated with the policy template assignment.

type PolicyAssignmentV1Collection added in v0.62.4

type PolicyAssignmentV1Collection struct {
	// Response of policy assignments.
	Assignments []PolicyAssignmentV1 `json:"assignments,omitempty"`
}

PolicyAssignmentV1Collection : Policy assignment response.

type PolicyAssignmentV1Resources added in v0.62.4

type PolicyAssignmentV1Resources struct {
	// assignment target account and type.
	Target *AssignmentTargetDetails `json:"target,omitempty"`

	// Set of properties for the assigned resource.
	Policy *PolicyAssignmentResourcePolicy `json:"policy,omitempty"`
}

PolicyAssignmentV1Resources : The policy assignment resources.

type PolicyAssignmentV1Subject added in v0.62.4

type PolicyAssignmentV1Subject struct {
	ID *string `json:"id,omitempty"`

	Type *string `json:"type,omitempty"`
}

PolicyAssignmentV1Subject : subject details of access type assignment.

type PolicyCollection added in v0.43.0

type PolicyCollection struct {
	// List of policies.
	Policies []PolicyTemplateMetaData `json:"policies,omitempty"`
}

PolicyCollection : A collection of policies.

type PolicyResource

type PolicyResource struct {
	// List of resource attributes.
	Attributes []ResourceAttribute `json:"attributes,omitempty"`

	// List of access management tags.
	Tags []ResourceTag `json:"tags,omitempty"`
}

PolicyResource : The attributes of the resource. Note that only one resource is allowed in a policy.

type PolicyRole

type PolicyRole struct {
	// The role Cloud Resource Name (CRN) granted by the policy. Example CRN: 'crn:v1:bluemix:public:iam::::role:Editor'.
	RoleID *string `json:"role_id" validate:"required"`

	// The display name of the role.
	DisplayName *string `json:"display_name,omitempty"`

	// The description of the role.
	Description *string `json:"description,omitempty"`
}

PolicyRole : A role associated with a policy.

type PolicySubject

type PolicySubject struct {
	// List of subject attributes.
	Attributes []SubjectAttribute `json:"attributes,omitempty"`
}

PolicySubject : The subject attribute values that must match in order for this policy to apply in a permission decision.

type PolicyTemplate added in v0.43.0

type PolicyTemplate struct {
	// Required field when creating a new template. Otherwise this field is optional. If the field is included it will
	// change the name value for all existing versions of the template.
	Name *string `json:"name" validate:"required"`

	// Description of the policy template. This is shown to users in the enterprise account. Use this to describe the
	// purpose or context of the policy for enterprise users managing IAM templates.
	Description *string `json:"description,omitempty"`

	// Enterprise account ID where this template will be created.
	AccountID *string `json:"account_id" validate:"required"`

	// Template version.
	Version *string `json:"version" validate:"required"`

	// Committed status of the template version.
	Committed *bool `json:"committed,omitempty"`

	// The core set of properties associated with the template's policy objet.
	Policy *TemplatePolicy `json:"policy" validate:"required"`

	// State of policy template.
	State *string `json:"state,omitempty"`

	// The policy template ID.
	ID *string `json:"id,omitempty"`

	// The href URL that links to the policy templates API by policy template ID.
	Href *string `json:"href,omitempty"`

	// The UTC timestamp when the policy template was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the policy template.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the policy template was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy template.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`
}

PolicyTemplate : The core set of properties associated with the policy template.

type PolicyTemplateAssignmentCollection added in v0.43.0

type PolicyTemplateAssignmentCollection struct {
	// List of policy assignments.
	Assignments []PolicyTemplateAssignmentItemsIntf `json:"assignments,omitempty"`
}

PolicyTemplateAssignmentCollection : A collection of policies assignments.

type PolicyTemplateAssignmentItems added in v0.62.4

type PolicyTemplateAssignmentItems struct {
	// assignment target account and type.
	Target *AssignmentTargetDetails `json:"target,omitempty"`

	// Policy assignment ID.
	ID *string `json:"id,omitempty"`

	// The account GUID that the policies assignments belong to..
	AccountID *string `json:"account_id,omitempty"`

	// The href URL that links to the policies assignments API by policy assignment ID.
	Href *string `json:"href,omitempty"`

	// The UTC timestamp when the policy assignment was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the policy assignment.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the policy assignment was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy assignment.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`

	// Object for each account assigned.
	Resources []PolicyAssignmentV1Resources `json:"resources,omitempty"`

	// subject details of access type assignment.
	Subject *PolicyAssignmentV1Subject `json:"subject,omitempty"`

	// policy template details.
	Template *AssignmentTemplateDetails `json:"template,omitempty"`

	// The policy assignment status.
	Status *string `json:"status,omitempty"`

	// policy template id.
	TemplateID *string `json:"template_id,omitempty"`

	// policy template version.
	TemplateVersion *string `json:"template_version,omitempty"`

	// Passed in value to correlate with other assignments.
	AssignmentID *string `json:"assignment_id,omitempty"`

	// Assignment target type.
	TargetType *string `json:"target_type,omitempty"`
}

PolicyTemplateAssignmentItems : PolicyTemplateAssignmentItems struct Models which "extend" this model: - PolicyTemplateAssignmentItemsPolicyAssignmentV1 - PolicyTemplateAssignmentItemsPolicyAssignment

type PolicyTemplateAssignmentItemsIntf added in v0.62.4

type PolicyTemplateAssignmentItemsIntf interface {
	// contains filtered or unexported methods
}

type PolicyTemplateAssignmentItemsPolicyAssignment added in v0.62.4

type PolicyTemplateAssignmentItemsPolicyAssignment struct {
	// policy template id.
	TemplateID *string `json:"template_id,omitempty"`

	// policy template version.
	TemplateVersion *string `json:"template_version,omitempty"`

	// Passed in value to correlate with other assignments.
	AssignmentID *string `json:"assignment_id,omitempty"`

	// Assignment target type.
	TargetType *string `json:"target_type,omitempty"`

	// ID of the target account.
	Target *string `json:"target,omitempty"`

	// Policy assignment ID.
	ID *string `json:"id,omitempty"`

	// The account GUID that the policies assignments belong to..
	AccountID *string `json:"account_id,omitempty"`

	// The href URL that links to the policies assignments API by policy assignment ID.
	Href *string `json:"href,omitempty"`

	// The UTC timestamp when the policy assignment was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the policy assignment.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the policy assignment was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy assignment.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`

	// Object for each account assigned.
	Resources []PolicyAssignmentResources `json:"resources,omitempty"`

	// The policy assignment status.
	Status *string `json:"status,omitempty"`
}

PolicyTemplateAssignmentItemsPolicyAssignment : The set of properties associated with the policy template assignment. This model "extends" PolicyTemplateAssignmentItems

type PolicyTemplateAssignmentItemsPolicyAssignmentV1 added in v0.62.4

type PolicyTemplateAssignmentItemsPolicyAssignmentV1 struct {
	// assignment target account and type.
	Target *AssignmentTargetDetails `json:"target" validate:"required"`

	// Policy assignment ID.
	ID *string `json:"id,omitempty"`

	// The account GUID that the policies assignments belong to..
	AccountID *string `json:"account_id,omitempty"`

	// The href URL that links to the policies assignments API by policy assignment ID.
	Href *string `json:"href,omitempty"`

	// The UTC timestamp when the policy assignment was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the policy assignment.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the policy assignment was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy assignment.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`

	// Object for each account assigned.
	Resources []PolicyAssignmentV1Resources `json:"resources" validate:"required"`

	// subject details of access type assignment.
	Subject *PolicyAssignmentV1Subject `json:"subject,omitempty"`

	// policy template details.
	Template *AssignmentTemplateDetails `json:"template" validate:"required"`

	// The policy assignment status.
	Status *string `json:"status" validate:"required"`
}

PolicyTemplateAssignmentItemsPolicyAssignmentV1 : The set of properties associated with the policy template assignment. This model "extends" PolicyTemplateAssignmentItems

type PolicyTemplateCollection added in v0.43.0

type PolicyTemplateCollection struct {
	// List of policy templates.
	PolicyTemplates []PolicyTemplate `json:"policy_templates,omitempty"`
}

PolicyTemplateCollection : A collection of policy Templates.

type PolicyTemplateLimitData added in v0.52.1

type PolicyTemplateLimitData struct {
	// Required field when creating a new template. Otherwise this field is optional. If the field is included it will
	// change the name value for all existing versions of the template.
	Name *string `json:"name" validate:"required"`

	// Description of the policy template. This is shown to users in the enterprise account. Use this to describe the
	// purpose or context of the policy for enterprise users managing IAM templates.
	Description *string `json:"description,omitempty"`

	// Enterprise account ID where this template will be created.
	AccountID *string `json:"account_id" validate:"required"`

	// Template version.
	Version *string `json:"version" validate:"required"`

	// Committed status of the template version.
	Committed *bool `json:"committed,omitempty"`

	// The core set of properties associated with the template's policy objet.
	Policy *TemplatePolicy `json:"policy" validate:"required"`

	// State of policy template.
	State *string `json:"state,omitempty"`

	// The policy template ID.
	ID *string `json:"id,omitempty"`

	// The href URL that links to the policy templates API by policy template ID.
	Href *string `json:"href,omitempty"`

	// The UTC timestamp when the policy template was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the policy template.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the policy template was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy template.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`

	// policy template count details.
	Counts *TemplateCountData `json:"counts,omitempty"`
}

PolicyTemplateLimitData : The core set of properties associated with the policy template.

type PolicyTemplateMetaData added in v0.47.0

type PolicyTemplateMetaData struct {
	// The policy ID.
	ID *string `json:"id,omitempty"`

	// The policy type; either 'access' or 'authorization'.
	Type *string `json:"type" validate:"required"`

	// Customer-defined description.
	Description *string `json:"description,omitempty"`

	// The subjects associated with a policy.
	Subjects []PolicySubject `json:"subjects" validate:"required"`

	// A set of role cloud resource names (CRNs) granted by the policy.
	Roles []PolicyRole `json:"roles" validate:"required"`

	// The resources associated with a policy.
	Resources []PolicyResource `json:"resources" validate:"required"`

	// The href link back to the policy.
	Href *string `json:"href,omitempty"`

	// The UTC timestamp when the policy was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the policy.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the policy was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`

	// The policy state.
	State *string `json:"state,omitempty"`

	// The details of the IAM template that was used to create an enterprise-managed policy in your account. When returned,
	// this indicates that the policy is created from and managed by a template in the root enterprise account.
	Template *TemplateMetadata `json:"template,omitempty"`
}

PolicyTemplateMetaData : The core set of properties associated with a policy.

type PolicyTemplateVersionsCollection added in v0.43.0

type PolicyTemplateVersionsCollection struct {
	// List of policy templates versions.
	Versions []PolicyTemplate `json:"versions,omitempty"`
}

PolicyTemplateVersionsCollection : A collection of versions for a specific policy template.

type ReplacePolicyOptions added in v0.31.4

type ReplacePolicyOptions struct {
	// The policy ID.
	PolicyID *string `json:"policy_id" validate:"required,ne="`

	// The revision number for updating a policy and must match the ETag value of the existing policy. The Etag can be
	// retrieved using the GET /v1/policies/{policy_id} API and looking at the ETag response header.
	IfMatch *string `json:"If-Match" validate:"required"`

	// The policy type; either 'access' or 'authorization'.
	Type *string `json:"type" validate:"required"`

	// The subjects associated with a policy.
	Subjects []PolicySubject `json:"subjects" validate:"required"`

	// A set of role cloud resource names (CRNs) granted by the policy.
	Roles []PolicyRole `json:"roles" validate:"required"`

	// The resources associated with a policy.
	Resources []PolicyResource `json:"resources" validate:"required"`

	// Customer-defined description.
	Description *string `json:"description,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ReplacePolicyOptions : The ReplacePolicy options.

func (*ReplacePolicyOptions) SetDescription added in v0.31.4

func (_options *ReplacePolicyOptions) SetDescription(description string) *ReplacePolicyOptions

SetDescription : Allow user to set Description

func (*ReplacePolicyOptions) SetHeaders added in v0.31.4

func (options *ReplacePolicyOptions) SetHeaders(param map[string]string) *ReplacePolicyOptions

SetHeaders : Allow user to set Headers

func (*ReplacePolicyOptions) SetIfMatch added in v0.31.4

func (_options *ReplacePolicyOptions) SetIfMatch(ifMatch string) *ReplacePolicyOptions

SetIfMatch : Allow user to set IfMatch

func (*ReplacePolicyOptions) SetPolicyID added in v0.31.4

func (_options *ReplacePolicyOptions) SetPolicyID(policyID string) *ReplacePolicyOptions

SetPolicyID : Allow user to set PolicyID

func (*ReplacePolicyOptions) SetResources added in v0.31.4

func (_options *ReplacePolicyOptions) SetResources(resources []PolicyResource) *ReplacePolicyOptions

SetResources : Allow user to set Resources

func (*ReplacePolicyOptions) SetRoles added in v0.31.4

func (_options *ReplacePolicyOptions) SetRoles(roles []PolicyRole) *ReplacePolicyOptions

SetRoles : Allow user to set Roles

func (*ReplacePolicyOptions) SetSubjects added in v0.31.4

func (_options *ReplacePolicyOptions) SetSubjects(subjects []PolicySubject) *ReplacePolicyOptions

SetSubjects : Allow user to set Subjects

func (*ReplacePolicyOptions) SetType added in v0.31.4

func (_options *ReplacePolicyOptions) SetType(typeVar string) *ReplacePolicyOptions

SetType : Allow user to set Type

type ReplacePolicyTemplateOptions added in v0.43.0

type ReplacePolicyTemplateOptions struct {
	// The policy template ID.
	PolicyTemplateID *string `json:"policy_template_id" validate:"required,ne="`

	// The policy template version.
	Version *string `json:"version" validate:"required,ne="`

	// The revision number for updating a policy template version and must match the ETag value of the existing policy
	// template version. The Etag can be retrieved using the GET
	// /v1/policy_templates/{policy_template_id}/versions/{version} API and looking at the ETag response header.
	IfMatch *string `json:"If-Match" validate:"required"`

	// The core set of properties associated with the template's policy objet.
	Policy *TemplatePolicy `json:"policy" validate:"required"`

	// Required field when creating a new template. Otherwise this field is optional. If the field is included it will
	// change the name value for all existing versions of the template.
	Name *string `json:"name,omitempty"`

	// Description of the policy template. This is shown to users in the enterprise account. Use this to describe the
	// purpose or context of the policy for enterprise users managing IAM templates.
	Description *string `json:"description,omitempty"`

	// Committed status of the template version.
	Committed *bool `json:"committed,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ReplacePolicyTemplateOptions : The ReplacePolicyTemplate options.

func (*ReplacePolicyTemplateOptions) SetCommitted added in v0.43.0

func (_options *ReplacePolicyTemplateOptions) SetCommitted(committed bool) *ReplacePolicyTemplateOptions

SetCommitted : Allow user to set Committed

func (*ReplacePolicyTemplateOptions) SetDescription added in v0.43.0

func (_options *ReplacePolicyTemplateOptions) SetDescription(description string) *ReplacePolicyTemplateOptions

SetDescription : Allow user to set Description

func (*ReplacePolicyTemplateOptions) SetHeaders added in v0.43.0

SetHeaders : Allow user to set Headers

func (*ReplacePolicyTemplateOptions) SetIfMatch added in v0.43.0

func (_options *ReplacePolicyTemplateOptions) SetIfMatch(ifMatch string) *ReplacePolicyTemplateOptions

SetIfMatch : Allow user to set IfMatch

func (*ReplacePolicyTemplateOptions) SetName added in v0.47.0

SetName : Allow user to set Name

func (*ReplacePolicyTemplateOptions) SetPolicy added in v0.43.0

SetPolicy : Allow user to set Policy

func (*ReplacePolicyTemplateOptions) SetPolicyTemplateID added in v0.43.0

func (_options *ReplacePolicyTemplateOptions) SetPolicyTemplateID(policyTemplateID string) *ReplacePolicyTemplateOptions

SetPolicyTemplateID : Allow user to set PolicyTemplateID

func (*ReplacePolicyTemplateOptions) SetVersion added in v0.43.0

func (_options *ReplacePolicyTemplateOptions) SetVersion(version string) *ReplacePolicyTemplateOptions

SetVersion : Allow user to set Version

type ReplaceRoleOptions added in v0.31.4

type ReplaceRoleOptions struct {
	// The role ID.
	RoleID *string `json:"role_id" validate:"required,ne="`

	// The revision number for updating a role and must match the ETag value of the existing role. The Etag can be
	// retrieved using the GET /v2/roles/{role_id} API and looking at the ETag response header.
	IfMatch *string `json:"If-Match" validate:"required"`

	// The display name of the role that is shown in the console.
	DisplayName *string `json:"display_name" validate:"required"`

	// The actions of the role. For more information, see [IAM roles and
	// actions](https://cloud.ibm.com/docs/account?topic=account-iam-service-roles-actions).
	Actions []string `json:"actions" validate:"required"`

	// The description of the role.
	Description *string `json:"description,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ReplaceRoleOptions : The ReplaceRole options.

func (*ReplaceRoleOptions) SetActions added in v0.31.4

func (_options *ReplaceRoleOptions) SetActions(actions []string) *ReplaceRoleOptions

SetActions : Allow user to set Actions

func (*ReplaceRoleOptions) SetDescription added in v0.31.4

func (_options *ReplaceRoleOptions) SetDescription(description string) *ReplaceRoleOptions

SetDescription : Allow user to set Description

func (*ReplaceRoleOptions) SetDisplayName added in v0.31.4

func (_options *ReplaceRoleOptions) SetDisplayName(displayName string) *ReplaceRoleOptions

SetDisplayName : Allow user to set DisplayName

func (*ReplaceRoleOptions) SetHeaders added in v0.31.4

func (options *ReplaceRoleOptions) SetHeaders(param map[string]string) *ReplaceRoleOptions

SetHeaders : Allow user to set Headers

func (*ReplaceRoleOptions) SetIfMatch added in v0.31.4

func (_options *ReplaceRoleOptions) SetIfMatch(ifMatch string) *ReplaceRoleOptions

SetIfMatch : Allow user to set IfMatch

func (*ReplaceRoleOptions) SetRoleID added in v0.31.4

func (_options *ReplaceRoleOptions) SetRoleID(roleID string) *ReplaceRoleOptions

SetRoleID : Allow user to set RoleID

type ReplaceV2PolicyOptions added in v0.31.4

type ReplaceV2PolicyOptions struct {
	// The policy ID.
	ID *string `json:"id" validate:"required,ne="`

	// The revision number for updating a policy and must match the ETag value of the existing policy. The Etag can be
	// retrieved using the GET /v2/policies/{id} API and looking at the ETag response header.
	IfMatch *string `json:"If-Match" validate:"required"`

	// Specifies the type of access granted by the policy.
	Control *Control `json:"control" validate:"required"`

	// The policy type; either 'access' or 'authorization'.
	Type *string `json:"type" validate:"required"`

	// Description of the policy.
	Description *string `json:"description,omitempty"`

	// The subject attributes for whom the policy grants access.
	Subject *V2PolicySubject `json:"subject,omitempty"`

	// The resource attributes to which the policy grants access.
	Resource *V2PolicyResource `json:"resource,omitempty"`

	// Indicates pattern of rule, either 'time-based-conditions:once', 'time-based-conditions:weekly:all-day', or
	// 'time-based-conditions:weekly:custom-hours'.
	Pattern *string `json:"pattern,omitempty"`

	// Additional access conditions associated with the policy.
	Rule V2PolicyRuleIntf `json:"rule,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ReplaceV2PolicyOptions : The ReplaceV2Policy options.

func (*ReplaceV2PolicyOptions) SetControl added in v0.31.4

func (_options *ReplaceV2PolicyOptions) SetControl(control *Control) *ReplaceV2PolicyOptions

SetControl : Allow user to set Control

func (*ReplaceV2PolicyOptions) SetDescription added in v0.31.4

func (_options *ReplaceV2PolicyOptions) SetDescription(description string) *ReplaceV2PolicyOptions

SetDescription : Allow user to set Description

func (*ReplaceV2PolicyOptions) SetHeaders added in v0.31.4

func (options *ReplaceV2PolicyOptions) SetHeaders(param map[string]string) *ReplaceV2PolicyOptions

SetHeaders : Allow user to set Headers

func (*ReplaceV2PolicyOptions) SetID added in v0.31.4

SetID : Allow user to set ID

func (*ReplaceV2PolicyOptions) SetIfMatch added in v0.31.4

func (_options *ReplaceV2PolicyOptions) SetIfMatch(ifMatch string) *ReplaceV2PolicyOptions

SetIfMatch : Allow user to set IfMatch

func (*ReplaceV2PolicyOptions) SetPattern added in v0.31.4

func (_options *ReplaceV2PolicyOptions) SetPattern(pattern string) *ReplaceV2PolicyOptions

SetPattern : Allow user to set Pattern

func (*ReplaceV2PolicyOptions) SetResource added in v0.31.4

func (_options *ReplaceV2PolicyOptions) SetResource(resource *V2PolicyResource) *ReplaceV2PolicyOptions

SetResource : Allow user to set Resource

func (*ReplaceV2PolicyOptions) SetRule added in v0.31.4

SetRule : Allow user to set Rule

func (*ReplaceV2PolicyOptions) SetSubject added in v0.31.4

func (_options *ReplaceV2PolicyOptions) SetSubject(subject *V2PolicySubject) *ReplaceV2PolicyOptions

SetSubject : Allow user to set Subject

func (*ReplaceV2PolicyOptions) SetType added in v0.31.4

func (_options *ReplaceV2PolicyOptions) SetType(typeVar string) *ReplaceV2PolicyOptions

SetType : Allow user to set Type

type ResourceAttribute

type ResourceAttribute struct {
	// The name of an attribute.
	Name *string `json:"name" validate:"required"`

	// The value of an attribute.
	Value *string `json:"value" validate:"required"`

	// The operator of an attribute.
	Operator *string `json:"operator,omitempty"`
}

ResourceAttribute : An attribute associated with a resource.

type ResourceTag added in v0.17.15

type ResourceTag struct {
	// The name of an access management tag.
	Name *string `json:"name" validate:"required"`

	// The value of an access management tag.
	Value *string `json:"value" validate:"required"`

	// The operator of an access management tag.
	Operator *string `json:"operator,omitempty"`
}

ResourceTag : A tag associated with a resource.

type Role

type Role struct {
	// The display name of the role that is shown in the console.
	DisplayName *string `json:"display_name" validate:"required"`

	// The description of the role.
	Description *string `json:"description,omitempty"`

	// The actions of the role. For more information, see [IAM roles and
	// actions](https://cloud.ibm.com/docs/account?topic=account-iam-service-roles-actions).
	Actions []string `json:"actions" validate:"required"`

	// The role Cloud Resource Name (CRN). Example CRN:
	// 'crn:v1:ibmcloud:public:iam-access-management::a/exampleAccountId::customRole:ExampleRoleName'.
	CRN *string `json:"crn,omitempty"`
}

Role : A role resource.

type RoleAction added in v0.31.4

type RoleAction struct {
	// Unique identifier for action with structure service.resource.action e.g., cbr.rule.read.
	ID *string `json:"id" validate:"required"`

	// Service defined display name for action.
	DisplayName *string `json:"display_name" validate:"required"`

	// Service defined description for action.
	Description *string `json:"description" validate:"required"`
}

RoleAction : An action that can be performed by the policy subject when assigned role.

type RoleCollection added in v0.43.0

type RoleCollection struct {
	// List of custom roles.
	CustomRoles []CustomRole `json:"custom_roles,omitempty"`

	// List of service roles.
	ServiceRoles []Role `json:"service_roles,omitempty"`

	// List of system roles.
	SystemRoles []Role `json:"system_roles,omitempty"`
}

RoleCollection : A collection of roles returned by the 'list roles' operation.

type Roles added in v0.31.5

type Roles struct {
	// The role Cloud Resource Name (CRN) granted by the policy. Example CRN: 'crn:v1:bluemix:public:iam::::role:Editor'.
	RoleID *string `json:"role_id" validate:"required"`
}

Roles : A role associated with a policy.

type RuleAttribute added in v0.31.4

type RuleAttribute struct {
	// The name of an attribute.
	Key *string `json:"key" validate:"required"`

	// The operator of an attribute.
	Operator *string `json:"operator" validate:"required"`

	// The value of a rule, resource, or subject attribute; can be boolean or string for resource and subject attribute.
	// Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
	Value interface{} `json:"value" validate:"required"`
}

RuleAttribute : Rule that specifies additional access granted (e.g., time-based condition).

type SubjectAttribute

type SubjectAttribute struct {
	// The name of an attribute.
	Name *string `json:"name" validate:"required"`

	// The value of an attribute.
	Value *string `json:"value" validate:"required"`
}

SubjectAttribute : An attribute associated with a subject.

type TemplateCountData added in v0.52.1

type TemplateCountData struct {
	// policy template current and limit details with in an account.
	Template *LimitData `json:"template,omitempty"`

	// policy template current and limit details with in an account.
	Version *LimitData `json:"version,omitempty"`
}

TemplateCountData : policy template count details.

type TemplateMetadata added in v0.43.0

type TemplateMetadata struct {
	// The policy template ID.
	ID *string `json:"id,omitempty"`

	// Template version.
	Version *string `json:"version,omitempty"`

	// policy assignment id.
	AssignmentID *string `json:"assignment_id,omitempty"`

	// orchestrator template id.
	RootID *string `json:"root_id,omitempty"`

	// orchestrator template version.
	RootVersion *string `json:"root_version,omitempty"`
}

TemplateMetadata : The details of the IAM template that was used to create an enterprise-managed policy in your account. When returned, this indicates that the policy is created from and managed by a template in the root enterprise account.

type TemplatePolicy added in v0.43.0

type TemplatePolicy struct {
	// The policy type; either 'access' or 'authorization'.
	Type *string `json:"type" validate:"required"`

	// Description of the policy. This is shown in child accounts when an access group or trusted profile template uses the
	// policy template to assign access.
	Description *string `json:"description,omitempty"`

	// The resource attributes to which the policy grants access.
	Resource *V2PolicyResource `json:"resource,omitempty"`

	// The subject attributes for whom the policy grants access.
	Subject *V2PolicySubject `json:"subject,omitempty"`

	// Indicates pattern of rule, either 'time-based-conditions:once', 'time-based-conditions:weekly:all-day', or
	// 'time-based-conditions:weekly:custom-hours'.
	Pattern *string `json:"pattern,omitempty"`

	// Additional access conditions associated with the policy.
	Rule V2PolicyRuleIntf `json:"rule,omitempty"`

	// Specifies the type of access granted by the policy.
	Control *Control `json:"control,omitempty"`
}

TemplatePolicy : The core set of properties associated with the template's policy objet.

type UpdatePolicyAssignmentOptions added in v0.62.4

type UpdatePolicyAssignmentOptions struct {
	// The policy template assignment ID.
	AssignmentID *string `json:"assignment_id" validate:"required,ne="`

	// specify version of response body format.
	Version *string `json:"version" validate:"required"`

	// The revision number for updating a policy assignment and must match the ETag value of the existing policy
	// assignment. The Etag can be retrieved using the GET /v1/policy_assignments/{assignment_id} API and looking at the
	// ETag response header.
	IfMatch *string `json:"If-Match" validate:"required"`

	// The policy template version to update to.
	TemplateVersion *string `json:"template_version" validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdatePolicyAssignmentOptions : The UpdatePolicyAssignment options.

func (*UpdatePolicyAssignmentOptions) SetAssignmentID added in v0.62.4

func (_options *UpdatePolicyAssignmentOptions) SetAssignmentID(assignmentID string) *UpdatePolicyAssignmentOptions

SetAssignmentID : Allow user to set AssignmentID

func (*UpdatePolicyAssignmentOptions) SetHeaders added in v0.62.4

SetHeaders : Allow user to set Headers

func (*UpdatePolicyAssignmentOptions) SetIfMatch added in v0.62.4

SetIfMatch : Allow user to set IfMatch

func (*UpdatePolicyAssignmentOptions) SetTemplateVersion added in v0.62.4

func (_options *UpdatePolicyAssignmentOptions) SetTemplateVersion(templateVersion string) *UpdatePolicyAssignmentOptions

SetTemplateVersion : Allow user to set TemplateVersion

func (*UpdatePolicyAssignmentOptions) SetVersion added in v0.62.4

SetVersion : Allow user to set Version

type UpdatePolicyStateOptions added in v0.31.4

type UpdatePolicyStateOptions struct {
	// The policy ID.
	PolicyID *string `json:"policy_id" validate:"required,ne="`

	// The revision number for updating a policy and must match the ETag value of the existing policy. The Etag can be
	// retrieved using the GET /v1/policies/{policy_id} API and looking at the ETag response header.
	IfMatch *string `json:"If-Match" validate:"required"`

	// The policy state.
	State *string `json:"state,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdatePolicyStateOptions : The UpdatePolicyState options.

func (*UpdatePolicyStateOptions) SetHeaders added in v0.31.4

func (options *UpdatePolicyStateOptions) SetHeaders(param map[string]string) *UpdatePolicyStateOptions

SetHeaders : Allow user to set Headers

func (*UpdatePolicyStateOptions) SetIfMatch added in v0.31.4

func (_options *UpdatePolicyStateOptions) SetIfMatch(ifMatch string) *UpdatePolicyStateOptions

SetIfMatch : Allow user to set IfMatch

func (*UpdatePolicyStateOptions) SetPolicyID added in v0.31.4

func (_options *UpdatePolicyStateOptions) SetPolicyID(policyID string) *UpdatePolicyStateOptions

SetPolicyID : Allow user to set PolicyID

func (*UpdatePolicyStateOptions) SetState added in v0.31.4

func (_options *UpdatePolicyStateOptions) SetState(state string) *UpdatePolicyStateOptions

SetState : Allow user to set State

type V2Policy added in v0.30.0

type V2Policy struct {
	// The policy type; either 'access' or 'authorization'.
	Type *string `json:"type" validate:"required"`

	// Description of the policy.
	Description *string `json:"description,omitempty"`

	// The subject attributes for whom the policy grants access.
	Subject *V2PolicySubject `json:"subject,omitempty"`

	// The resource attributes to which the policy grants access.
	Resource *V2PolicyResource `json:"resource,omitempty"`

	// Indicates pattern of rule, either 'time-based-conditions:once', 'time-based-conditions:weekly:all-day', or
	// 'time-based-conditions:weekly:custom-hours'.
	Pattern *string `json:"pattern,omitempty"`

	// Additional access conditions associated with the policy.
	Rule V2PolicyRuleIntf `json:"rule,omitempty"`

	// The policy ID.
	ID *string `json:"id,omitempty"`

	// The href URL that links to the policies API by policy ID.
	Href *string `json:"href,omitempty"`

	Control ControlResponseIntf `json:"control" validate:"required"`

	// The UTC timestamp when the policy was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the policy.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the policy was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`

	// The policy state, either 'deleted' or 'active'.
	State *string `json:"state" validate:"required"`

	// The optional last permit time of policy, when passing query parameter format=include_last_permit.
	LastPermitAt *string `json:"last_permit_at,omitempty"`

	// The optional count of times that policy has provided a permit, when passing query parameter
	// format=include_last_permit.
	LastPermitFrequency *int64 `json:"last_permit_frequency,omitempty"`
}

V2Policy : The core set of properties associated with the policy.

type V2PolicyCollection added in v0.31.4

type V2PolicyCollection struct {
	// List of policies.
	Policies []V2PolicyTemplateMetaData `json:"policies,omitempty"`
}

V2PolicyCollection : A collection of policies.

type V2PolicyResource added in v0.31.4

type V2PolicyResource struct {
	// List of resource attributes to which the policy grants access.
	Attributes []V2PolicyResourceAttribute `json:"attributes" validate:"required"`

	// Optional list of resource tags to which the policy grants access.
	Tags []V2PolicyResourceTag `json:"tags,omitempty"`
}

V2PolicyResource : The resource attributes to which the policy grants access.

type V2PolicyResourceAttribute added in v0.31.4

type V2PolicyResourceAttribute struct {
	// The name of a resource attribute.
	Key *string `json:"key" validate:"required"`

	// The operator of an attribute.
	Operator *string `json:"operator" validate:"required"`

	// The value of a rule, resource, or subject attribute; can be boolean or string for resource and subject attribute.
	// Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
	Value interface{} `json:"value" validate:"required"`
}

V2PolicyResourceAttribute : Resource attribute to which the policy grants access.

type V2PolicyResourceTag added in v0.31.4

type V2PolicyResourceTag struct {
	// The name of an access management tag.
	Key *string `json:"key" validate:"required"`

	// The value of an access management tag.
	Value *string `json:"value" validate:"required"`

	// The operator of an access management tag.
	Operator *string `json:"operator" validate:"required"`
}

V2PolicyResourceTag : A tag associated with a resource.

type V2PolicyRule added in v0.31.4

type V2PolicyRule struct {
	// The name of an attribute.
	Key *string `json:"key,omitempty"`

	// The operator of an attribute.
	Operator *string `json:"operator,omitempty"`

	// The value of a rule, resource, or subject attribute; can be boolean or string for resource and subject attribute.
	// Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
	Value interface{} `json:"value,omitempty"`

	// List of conditions associated with a policy, e.g., time-based conditions that grant access over a certain time
	// period.
	Conditions []NestedConditionIntf `json:"conditions,omitempty"`
}

V2PolicyRule : Additional access conditions associated with the policy. Models which "extend" this model: - V2PolicyRuleRuleAttribute - V2PolicyRuleRuleWithNestedConditions

type V2PolicyRuleIntf added in v0.31.4

type V2PolicyRuleIntf interface {
	// contains filtered or unexported methods
}

type V2PolicyRuleRuleAttribute added in v0.31.4

type V2PolicyRuleRuleAttribute struct {
	// The name of an attribute.
	Key *string `json:"key" validate:"required"`

	// The operator of an attribute.
	Operator *string `json:"operator" validate:"required"`

	// The value of a rule, resource, or subject attribute; can be boolean or string for resource and subject attribute.
	// Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
	Value interface{} `json:"value" validate:"required"`
}

V2PolicyRuleRuleAttribute : Rule that specifies additional access granted (e.g., time-based condition). This model "extends" V2PolicyRule

type V2PolicyRuleRuleWithNestedConditions added in v0.53.1

type V2PolicyRuleRuleWithNestedConditions struct {
	// Operator to evaluate conditions.
	Operator *string `json:"operator" validate:"required"`

	// List of conditions associated with a policy, e.g., time-based conditions that grant access over a certain time
	// period.
	Conditions []NestedConditionIntf `json:"conditions" validate:"required"`
}

V2PolicyRuleRuleWithNestedConditions : Rule that specifies additional access granted (e.g., time-based condition) accross multiple conditions. This model "extends" V2PolicyRule

type V2PolicySubject added in v0.31.4

type V2PolicySubject struct {
	// List of subject attributes associated with policy/.
	Attributes []V2PolicySubjectAttribute `json:"attributes" validate:"required"`
}

V2PolicySubject : The subject attributes for whom the policy grants access.

type V2PolicySubjectAttribute added in v0.31.4

type V2PolicySubjectAttribute struct {
	// The name of a subject attribute, e.g., iam_id, access_group_id.
	Key *string `json:"key" validate:"required"`

	// The operator of an attribute.
	Operator *string `json:"operator" validate:"required"`

	// The value of a rule, resource, or subject attribute; can be boolean or string for resource and subject attribute.
	// Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
	Value interface{} `json:"value" validate:"required"`
}

V2PolicySubjectAttribute : Subject attribute for whom the policy grants access.

type V2PolicyTemplateMetaData added in v0.47.0

type V2PolicyTemplateMetaData struct {
	// The policy type; either 'access' or 'authorization'.
	Type *string `json:"type" validate:"required"`

	// Description of the policy.
	Description *string `json:"description,omitempty"`

	// The subject attributes for whom the policy grants access.
	Subject *V2PolicySubject `json:"subject,omitempty"`

	// The resource attributes to which the policy grants access.
	Resource *V2PolicyResource `json:"resource,omitempty"`

	// Indicates pattern of rule, either 'time-based-conditions:once', 'time-based-conditions:weekly:all-day', or
	// 'time-based-conditions:weekly:custom-hours'.
	Pattern *string `json:"pattern,omitempty"`

	// Additional access conditions associated with the policy.
	Rule V2PolicyRuleIntf `json:"rule,omitempty"`

	// The policy ID.
	ID *string `json:"id,omitempty"`

	// The href URL that links to the policies API by policy ID.
	Href *string `json:"href,omitempty"`

	Control ControlResponseIntf `json:"control" validate:"required"`

	// The UTC timestamp when the policy was created.
	CreatedAt *strfmt.DateTime `json:"created_at,omitempty"`

	// The iam ID of the entity that created the policy.
	CreatedByID *string `json:"created_by_id,omitempty"`

	// The UTC timestamp when the policy was last modified.
	LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"`

	// The iam ID of the entity that last modified the policy.
	LastModifiedByID *string `json:"last_modified_by_id,omitempty"`

	// The policy state, either 'deleted' or 'active'.
	State *string `json:"state" validate:"required"`

	// The optional last permit time of policy, when passing query parameter format=include_last_permit.
	LastPermitAt *string `json:"last_permit_at,omitempty"`

	// The optional count of times that policy has provided a permit, when passing query parameter
	// format=include_last_permit.
	LastPermitFrequency *int64 `json:"last_permit_frequency,omitempty"`

	// The details of the IAM template that was used to create an enterprise-managed policy in your account. When returned,
	// this indicates that the policy is created from and managed by a template in the root enterprise account.
	Template *TemplateMetadata `json:"template,omitempty"`
}

V2PolicyTemplateMetaData : The core set of properties associated with the policy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL