Create a network zone
POST /v1/zones
This operation creates a network zone for the specified account.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
context-based-restrictions.zone.create
Request
Parameters
name
string
The name of the zone.
Example: an example of zone
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[^�-!-,.-\/:-@[-^`{--]+$/
accountId
string
The id of the account owning this zone.
Example: 12ab34cd56ef78ab90cd12ef34ab56cd
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[a-zA-Z0-9\\-]+$/
addresses
Address[]
The list of addresses in the zone.
Example: [{"type":"ipAddress","value":"169.23.56.234"},{"type":"ipAddress","value":"3ffe:1900:fe21:4545::"},{"type":"ipRange","value":"169.23.22.0-169.23.22.255"},{"type":"ipRange","value":"3ffe:1900:fe21:4545::-3ffe:1900:fe21:6767::"},{"type":"subnet","value":"192.0.2.0/24"},{"type":"vpc","value":"crn:v1:bluemix:public:is:us-south:a/12ab34cd56ef78ab90cd12ef34ab56cd::vpc:r134-d98a1702-b39a-449a-86d4-ef8dbacf281e"},{"type":"serviceRef","ref":{"account_id":"12ab34cd56ef78ab90cd12ef34ab56cd","service_name":"cloud-object-storage"}}]
Constraints:
- Max items: 1000
description
string
The description of the zone.
Example: this is an example of zone
Constraints:
- Max length: 300
- Pattern:
/^[^�--]*$/
excluded
Address[]
The list of excluded addresses in the zone. Only addresses of type `ipAddress`, `ipRange`, and `subnet` can be excluded.
Example: [{"type":"ipAddress","value":"169.23.22.127"}]
Constraints:
- Max items: 1000
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
Response
201 - Network zone created.
id
string
The globally unique ID of the zone.
crn
string
The zone CRN.
address_count
integer
The number of addresses in the zone.
excluded_count
integer
The number of excluded addresses in the zone.
name
string
The name of the zone.
account_id
string
The id of the account owning this zone.
description
string
The description of the zone.
addresses
array
The list of addresses in the zone.
excluded
array
The list of excluded addresses in the zone. Only addresses of type `ipAddress`, `ipRange`, and `subnet` can be excluded.
href
string
The href link to the resource.
created_at
string
The time the resource was created.
created_by_id
string
IAM ID of the user or service which created the resource.
last_modified_at
string
The last time the resource was modified.
last_modified_by_id
string
IAM ID of the user or service which modified the resource.
400 - The network zone could not be created due to an invalid or missing input parameter or request body.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
403 - The supplied authentication is not authorized to perform the operation.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
409 - The network zone could not be created due to an already existing zone with the same name.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too Many Requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
List network zones
GET /v1/zones
This operation lists network zones in the specified account.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
context-based-restrictions.zone.read
Request
Parameters
accountId
Required *
string
The ID of the managing account.
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[a-zA-Z0-9\\-]+$/
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
name
string
The name of the zone.
Constraints:
- Min length: 1
- Max length: 100
- Pattern:
/^\\*?[a-zA-Z0-9 \\-_]+\\*?$/
sort
string
Sorts results by using a valid sort field. To learn more, see Sorting.
Constraints:
- Min length: 1
- Max length: 32
- Pattern:
/^[\\-]?[a-z0-9_]+$/
Response
200 - The network zones were successfully retrieved.
count
integer
The number of returned results.
zones
array
The returned zones.
400 - The network zones could not be retrieved due to an invalid or missing input parameter.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
403 - The supplied authentication is not authorized to perform the operation.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too Many Requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
Get a network zone
GET /v1/zones/{zone_id}
This operation retrieves the network zone identified by the specified zone ID.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
context-based-restrictions.zone.read
Request
Parameters
zoneId
Required *
string
The ID of a zone.
Constraints:
- Min length: 32
- Max length: 32
- Pattern:
/^[a-fA-F0-9]{32}$/
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
Response
200 - The network zone was successfully retrieved.
id
string
The globally unique ID of the zone.
crn
string
The zone CRN.
address_count
integer
The number of addresses in the zone.
excluded_count
integer
The number of excluded addresses in the zone.
name
string
The name of the zone.
account_id
string
The id of the account owning this zone.
description
string
The description of the zone.
addresses
array
The list of addresses in the zone.
excluded
array
The list of excluded addresses in the zone. Only addresses of type `ipAddress`, `ipRange`, and `subnet` can be excluded.
href
string
The href link to the resource.
created_at
string
The time the resource was created.
created_by_id
string
IAM ID of the user or service which created the resource.
last_modified_at
string
The last time the resource was modified.
last_modified_by_id
string
IAM ID of the user or service which modified the resource.
400 - The network zone could not be retrieved due to an invalid or missing input parameter.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
403 - The supplied authentication is not authorized to perform the operation.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
404 - The network zone could not be found. Verify that the specified zone ID is valid.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too Many Requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
Replace a network zone
PUT /v1/zones/{zone_id}
This operation replaces the network zone identified by the specified zone ID. Partial updates are not supported. The entire network zone object must be replaced.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
context-based-restrictions.zone.update
Request
Parameters
zoneId
Required *
string
The ID of a zone.
Constraints:
- Min length: 32
- Max length: 32
- Pattern:
/^[a-fA-F0-9]{32}$/
ifMatch
Required *
string
The current revision of the resource being updated. This can be found in the Create/Get/Update resource response ETag header.
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[a-fA-F0-9\\-]+$/
name
string
The name of the zone.
Example: an example of zone
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[^�-!-,.-\/:-@[-^`{--]+$/
accountId
string
The id of the account owning this zone.
Example: 12ab34cd56ef78ab90cd12ef34ab56cd
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[a-zA-Z0-9\\-]+$/
addresses
Address[]
The list of addresses in the zone.
Example: [{"type":"ipAddress","value":"169.23.56.234"},{"type":"ipAddress","value":"3ffe:1900:fe21:4545::"},{"type":"ipRange","value":"169.23.22.0-169.23.22.255"},{"type":"ipRange","value":"3ffe:1900:fe21:4545::-3ffe:1900:fe21:6767::"},{"type":"vpc","value":"crn:v1:bluemix:public:is:us-south:a/12ab34cd56ef78ab90cd12ef34ab56cd::vpc:r134-d98a1702-b39a-449a-86d4-ef8dbacf281e"}]
Constraints:
- Max items: 1000
description
string
The description of the zone.
Example: this is an example of zone
Constraints:
- Max length: 300
- Pattern:
/^[^�--]*$/
excluded
Address[]
The list of excluded addresses in the zone. Only addresses of type `ipAddress`, `ipRange`, and `subnet` can be excluded.
Example: [{"type":"ipAddress","value":"169.23.22.128"}]
Constraints:
- Max items: 1000
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
Response
200 - The network zone was successfully replaced.
id
string
The globally unique ID of the zone.
crn
string
The zone CRN.
address_count
integer
The number of addresses in the zone.
excluded_count
integer
The number of excluded addresses in the zone.
name
string
The name of the zone.
account_id
string
The id of the account owning this zone.
description
string
The description of the zone.
addresses
array
The list of addresses in the zone.
excluded
array
The list of excluded addresses in the zone. Only addresses of type `ipAddress`, `ipRange`, and `subnet` can be excluded.
href
string
The href link to the resource.
created_at
string
The time the resource was created.
created_by_id
string
IAM ID of the user or service which created the resource.
last_modified_at
string
The last time the resource was modified.
last_modified_by_id
string
IAM ID of the user or service which modified the resource.
400 - The network zone could not be replaced due to an invalid or missing input parameter.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
403 - The supplied authentication is not authorized to perform the operation.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
404 - The network zone could not be found. Verify that the specified zone ID is valid.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
412 - The network zone revision is missing or invalid.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too Many Requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
Delete a network zone
DELETE /v1/zones/{zone_id}
This operation deletes the network zone identified by the specified zone ID.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
context-based-restrictions.zone.delete
Request
Parameters
zoneId
Required *
string
The ID of a zone.
Constraints:
- Min length: 32
- Max length: 32
- Pattern:
/^[a-fA-F0-9]{32}$/
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
Response
204 - The network zone was successfully deleted.
400 - The network zone could not be deleted due to an invalid or missing input parameter.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
403 - The supplied authentication is not authorized to perform the operation.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
404 - The network zone could not be found. Verify that the specified zone ID is valid.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
412 - Precondition not satisfied. A network zone cannot be deleted if it is referenced by one or more rules.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too Many Requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
List available service reference targets
GET /v1/zones/serviceref_targets
This operation lists all available service reference targets.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
This operation does not require you to be assigned an IAM access role.
N/A
Request
Parameters
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
type
string
Specifies the types of services to retrieve.
Allowed values: all, platform_service
Default: all
Response
200 - The service reference targets were successfully retrieved.
count
integer
The number of returned results.
targets
array
The list of service reference targets.
400 - The service reference targets could not be retrieved due to an invalid or missing input parameter.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too Many Requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
Get service reference target for a specified service name
GET /v1/zones/serviceref_targets/{service_name}
This operation gets the service reference target for a specified service name
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
This operation does not require you to be assigned an IAM access role.
N/A
Request
Parameters
serviceName
Required *
string
The name of a service.
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[0-9a-z\\-]+$/
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
Response
200 - The service reference target was successfully retrieved.
service_name
string
The name of the service.
service_type
string
The type of the service.
locations
array
The locations the service is available.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
404 - No service reference target found for specified service name.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too Many Requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
Create a rule
POST /v1/rules
This operation creates a rule for the specified account.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
cbr.rule.create
Request
Parameters
contexts
RuleContext[]
The contexts this rule applies to.
Example: [{"attributes":[{"name":"networkZoneId","value":"65810ac762004f22ac19f8f8edf70a34"}]}]
Constraints:
- Max items: 1000
resources
Resource[]
The resources this rule apply to.
Example: [{"attributes":[{"name":"accountId","value":"12ab34cd56ef78ab90cd12ef34ab56cd"},{"name":"serviceName","value":"kms"}]}]
Constraints:
- Min items: 1
- Max items: 1
description
string
The description of the rule.
Example: this is an example of rule
Constraints:
- Max length: 300
- Pattern:
/^[^�--]*$/
operations
NewRuleOperations
The operations this rule applies to.
enforcementMode
string
The rule enforcement mode:
- `enabled` - The restrictions are enforced and reported. This is the default.
- `disabled` - The restrictions are disabled. Nothing is enforced or reported.
- `report` - The restrictions are evaluated and reported, but not enforced.
Example: enabled
Allowed values: enabled, disabled, report
Default: enabled
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
Response
201 - Rule created.
id
string
The globally unique ID of the rule.
crn
string
The rule CRN.
description
string
The description of the rule.
contexts
array
The contexts this rule applies to.
resources
array
The resources this rule apply to.
operations
object
The operations this rule applies to.
enforcement_mode
string
The rule enforcement mode:
- `enabled` - The restrictions are enforced and reported. This is the default.
- `disabled` - The restrictions are disabled. Nothing is enforced or reported.
- `report` - The restrictions are evaluated and reported, but not enforced.
href
string
The href link to the resource.
created_at
string
The time the resource was created.
created_by_id
string
IAM ID of the user or service which created the resource.
last_modified_at
string
The last time the resource was modified.
last_modified_by_id
string
IAM ID of the user or service which modified the resource.
400 - The rule could not be created due to an invalid or missing input parameter or request body.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
403 - The supplied authentication is not authorized to perform the operation.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too Many Requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
List rules
GET /v1/rules
This operation lists rules in the specified account.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
cbr.rule.read
Request
Parameters
accountId
Required *
string
The ID of the managing account.
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[a-zA-Z0-9\\-]+$/
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
region
string
The `region` resource attribute.
Constraints:
- Min length: 1
- Max length: 32
- Pattern:
/^[a-zA-Z0-9\\-]+$/
resource
string
The `resource` resource attribute.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[\\S\\s]+$/
resourceType
string
The `resourceType` resource attribute.
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[\\S\\s]+$/
serviceInstance
string
The `serviceInstance` resource attribute.
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[0-9a-z\\-\/]+$/
serviceName
string
The `serviceName` resource attribute.
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[0-9a-z\\-]+$/
serviceType
string
The rule's `serviceType` resource attribute.
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[0-9a-z_]+$/
serviceGroupId
string
The rule's `service_group_id` resource attribute.
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[a-zA-Z0-9]+$/
zoneId
string
The globally unique ID of the zone.
Constraints:
- Min length: 32
- Max length: 32
- Pattern:
/^[a-fA-F0-9]{32}$/
sort
string
Sorts results by using a valid sort field. To learn more, see Sorting.
Constraints:
- Min length: 1
- Max length: 32
- Pattern:
/^[\\-]?[a-z0-9_]+$/
enforcementMode
string
The rule's `enforcement_mode` attribute.
Allowed values: enabled, disabled, report
Response
200 - The rules were successfully retrieved.
count
integer
The number of returned results.
rules
array
The returned rules.
400 - The rules could not be retrieved due to an invalid or missing input parameter.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
403 - The supplied authentication is not authorized to perform the operation.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too Many Requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
Get a rule
GET /v1/rules/{rule_id}
This operation retrieves the rule identified by the specified rule ID.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
cbr.rule.read
Request
Parameters
ruleId
Required *
string
The ID of a rule.
Constraints:
- Min length: 32
- Max length: 32
- Pattern:
/^[a-fA-F0-9]{32}$/
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
Response
200 - The rule was successfully retrieved.
id
string
The globally unique ID of the rule.
crn
string
The rule CRN.
description
string
The description of the rule.
contexts
array
The contexts this rule applies to.
resources
array
The resources this rule apply to.
operations
object
The operations this rule applies to.
enforcement_mode
string
The rule enforcement mode:
- `enabled` - The restrictions are enforced and reported. This is the default.
- `disabled` - The restrictions are disabled. Nothing is enforced or reported.
- `report` - The restrictions are evaluated and reported, but not enforced.
href
string
The href link to the resource.
created_at
string
The time the resource was created.
created_by_id
string
IAM ID of the user or service which created the resource.
last_modified_at
string
The last time the resource was modified.
last_modified_by_id
string
IAM ID of the user or service which modified the resource.
400 - The rule could not be retrieved due to an invalid or missing input parameter.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
403 - The supplied authentication is not authorized to perform the operation.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
404 - The rule could not be found. Verify that the specified rule ID is valid.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too Many Requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
Replace a rule
PUT /v1/rules/{rule_id}
This operation replaces the rule identified by the specified rule ID. Partial updates are not supported. The entire rule object must be replaced.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
cbr.rule.update
Request
Parameters
ruleId
Required *
string
The ID of a rule.
Constraints:
- Min length: 32
- Max length: 32
- Pattern:
/^[a-fA-F0-9]{32}$/
ifMatch
Required *
string
The current revision of the resource being updated. This can be found in the Create/Get/Update resource response ETag header.
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[a-fA-F0-9\\-]+$/
contexts
RuleContext[]
The contexts this rule applies to.
Example: [{"attributes":[{"name":"networkZoneId","value":"76921bd873115033bd2a0909fe081b45"}]}]
Constraints:
- Max items: 1000
resources
Resource[]
The resources this rule apply to.
Example: [{"attributes":[{"name":"accountId","value":"12ab34cd56ef78ab90cd12ef34ab56cd"},{"name":"serviceName","value":"kms"}]}]
Constraints:
- Min items: 1
- Max items: 1
description
string
The description of the rule.
Example: this is an example of rule
Constraints:
- Max length: 300
- Pattern:
/^[^�--]*$/
operations
NewRuleOperations
The operations this rule applies to.
enforcementMode
string
The rule enforcement mode:
- `enabled` - The restrictions are enforced and reported. This is the default.
- `disabled` - The restrictions are disabled. Nothing is enforced or reported.
- `report` - The restrictions are evaluated and reported, but not enforced.
Example: disabled
Allowed values: enabled, disabled, report
Default: enabled
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
Response
200 - The rule was successfully replaced.
id
string
The globally unique ID of the rule.
crn
string
The rule CRN.
description
string
The description of the rule.
contexts
array
The contexts this rule applies to.
resources
array
The resources this rule apply to.
operations
object
The operations this rule applies to.
enforcement_mode
string
The rule enforcement mode:
- `enabled` - The restrictions are enforced and reported. This is the default.
- `disabled` - The restrictions are disabled. Nothing is enforced or reported.
- `report` - The restrictions are evaluated and reported, but not enforced.
href
string
The href link to the resource.
created_at
string
The time the resource was created.
created_by_id
string
IAM ID of the user or service which created the resource.
last_modified_at
string
The last time the resource was modified.
last_modified_by_id
string
IAM ID of the user or service which modified the resource.
400 - The rule could not be replaced due to an invalid or missing input parameter.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
403 - The supplied authentication is not authorized to perform the operation.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
404 - The rule could not be found. Verify that the specified rule ID is valid.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
412 - The rule revision is missing or invalid.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too Many Requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
Delete a rule
DELETE /v1/rules/{rule_id}
This operation deletes the rule identified by the specified rule ID.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
cbr.rule.delete
Request
Parameters
ruleId
Required *
string
The ID of a rule.
Constraints:
- Min length: 32
- Max length: 32
- Pattern:
/^[a-fA-F0-9]{32}$/
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
Response
204 - The rule was successfully deleted.
400 - The rule could not be deleted due to an invalid or missing input parameter.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
403 - The supplied authentication is not authorized to perform the operation.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
404 - The rule could not be found. Verify that the specified rule ID is valid.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too Many Requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
Get account settings
GET /v1/account_settings/{account_id}
This operation retrieves the settings for the specified account ID.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
context-based-restrictions.account-settings.read
Request
Parameters
accountId
Required *
string
The ID of the account the settings are for.
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[a-zA-Z0-9\\-]+$/
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
Response
200 - The account settings were successfully retrieved.
id
string
The globally unique ID of the account settings.
crn
string
The account settings CRN.
rule_count_limit
integer
the max number of rules allowed for the account.
zone_count_limit
integer
the max number of zones allowed for the account.
tags_rule_count_limit
integer
the max number of rules with tags allowed for the account.
current_rule_count
integer
the current number of rules used by the account.
current_zone_count
integer
the current number of zones used by the account.
current_tags_rule_count
integer
the current number of rules with tags used by the account.
href
string
The href link to the resource.
created_at
string
The time the resource was created.
created_by_id
string
IAM ID of the user or service which created the resource.
last_modified_at
string
The last time the resource was modified.
last_modified_by_id
string
IAM ID of the user or service which modified the resource.
400 - The account settings could not be retrieved due to an invalid or missing input parameter.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
403 - The supplied authentication is not authorized to perform the operation.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too Many Requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
List available service operations
GET /v1/operations
This operation lists all available service operations.
Request
Parameters
xCorrelationId
string
The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
transactionId
string
The `Transaction-Id` header behaves as the `X-Correlation-Id` header. It is supported for backward compatibility with other IBM platform services that support the `Transaction-Id` header only. If both `X-Correlation-Id` and `Transaction-Id` are provided, `X-Correlation-Id` has the precedence over `Transaction-Id`.
Constraints:
- Min length: 1
- Max length: 1024
- Pattern:
/^[a-zA-Z0-9 ,\\-_]+$/
serviceName
string
The name of the service.
Constraints:
- Pattern:
/^[-0-9a-z]+$/
serviceGroupId
string
The id of the service group.
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[a-zA-Z0-9]+$/
resourceType
string
The type of resource.
Constraints:
- Min length: 1
- Max length: 128
- Pattern:
/^[\\S\\s]+$/
Response
200 - The service operations were successfully retrieved.
api_types
array
The returned API types.
400 - The service operations could not be retrieved due to an invalid or missing input parameter.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
401 - You are not authorized to make this request. The token is either missing, invalid, or expired.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
429 - Too many requests.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.
503 - A backend service required to complete the operation is unavailable. Try again later.
errors
array
An array with at least one error.
trace
string
A lowercase UUID uniquely identifying the request.
status_code
integer
The HTTP status code used for the response.