AttachService
post
/20160918/serviceGateways/{service_gateway_id}/actions/attachService
Add the specified Service to the list of enabled Service objects for the specified gateway. Create a route rule with the cidrBlock of the Service as the rule's destination and the service gateway as the rule's target.
Note: The AttachServiceId operation is an easy way to add an individual Service to the service gateway. Compare with UpdateServiceGateway, which replaces the entire existing list of enabled Service objects with the list that you provide in the UpdateServiceGateway request.
Request
Supported Media Types
- application/json
Path Parameters
-
serviceGatewayId(required): string
Minimum Length:
1
Maximum Length:255
The OCID of the service gateway.
Header Parameters
-
if-match: string
For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
ServiceId of Service to be attached to a service gateway.
Root Schema : ServiceIdRequestDetails
Type:
Show Source
object
-
serviceId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the Service.
Response
Supported Media Types
- application/json
200 Response
The service has been enabled for the service gateway.
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : ServiceGateway
Type:
object
Represents a router that lets your VCN privately access specific Oracle services such as Object Storage without exposing the VCN to the public internet. Traffic leaving the VCN and destined for a supported Oracle service (see ListServices) is routed through the service gateway and does not traverse the internet. The instances in the VCN do not need to have public IP addresses nor be in a public subnet. The VCN does not need an internet gateway for this traffic.
Show Source
-
blockTraffic(required):
boolean
Default Value:
false
Whether the service gateway blocks all traffic through it. The default is false. When this is true, traffic is not routed to any services, regardless of route rules. Example: true -
compartmentId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the compartment that contains the service gateway. -
definedTags:
object definedTags
Additional Properties Allowed: additionalPropertiesDefined tags for this resource. Each key is predefined and scoped to a namespace.
-
displayName:
string
Minimum Length:
1
Maximum Length:255
A user-friendly name. Does not need to be unique, and it is changeable. Avoid entering confidential information. -
freeformTags:
object freeformTags
Additional Properties Allowed: additionalPropertiesFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
-
id(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the service gateway. -
lifecycleState(required):
string
Allowed Values:
[ "PROVISIONING", "AVAILABLE", "TERMINATING", "TERMINATED" ]
The service gateway's current state. -
routeTableId:
string
Minimum Length:
1
Maximum Length:255
The OCID of the route table the service gateway is using. -
services(required):
array services
List of the Service objects enabled for this service gateway. The list can be empty. You can enable a particular Service by using AttachServiceId or UpdateServiceGateway.
-
timeCreated:
string(date-time)
The date and time the service gateway was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z
-
vcnId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the VCN the service gateway belongs to.
Nested Schema : definedTags
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace.
Defined tags for this resource. Each key is predefined and scoped to a namespace.
Nested Schema : freeformTags
Type:
object
Additional Properties Allowed
Show Source
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
Nested Schema : services
Type:
array
List of the Service objects enabled for this service gateway. The list can be empty. You can enable a particular Service by using AttachServiceId or UpdateServiceGateway.
Show Source
Nested Schema : additionalProperties
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
The value of the tag. Only the String type is supported.
Key-value pair representing a defined tag key and value, scoped to a namespace.
Nested Schema : additionalProperties
Type:
object
The value of the tag. Only the String type is supported.
Nested Schema : ServiceIdResponseDetails
Type:
Show Source
object
-
serviceId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the service. -
serviceName(required):
string
Minimum Length:
1
Maximum Length:255
The name of the service.
400 Response
Bad Request
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
401 Response
Unauthorized
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
404 Response
Not Found
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
409 Response
Conflict
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
500 Response
Internal Server Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
Default Response
An error has occurred.
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload