lib/oci/file_storage/file_storage_client.rb
def create_mount_target(create_mount_target_details, opts = {})
      logger.debug 'Calling operation FileStorageClient#create_mount_target.' if logger

      raise "Missing the required parameter 'create_mount_target_details' when calling create_mount_target." if create_mount_target_details.nil?

      path = '/mountTargets'
      operation_signing_strategy = :standard

      # rubocop:disable Style/NegatedIf
      # Query Params
      query_params = {}

      # Header Params
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
      header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
      # rubocop:enable Style/NegatedIf
      header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

      post_body = @api_client.object_to_http_body(create_mount_target_details)

      # rubocop:disable Metrics/BlockLength
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'FileStorageClient#create_mount_target') do
        @api_client.call_api(
          :POST,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::FileStorage::Models::MountTarget'
        )
      end
      # rubocop:enable Metrics/BlockLength
    end
# Creates a new mount target in the specified compartment and
# subnet. You can associate a file system with a mount
# target only when they exist in the same availability domain. Instances
# can connect to mount targets in another availablity domain, but
# you might see higher latency than with instances in the same
# availability domain as the mount target.
#
# Mount targets have one or more private IP addresses that you can
# provide as the host portion of remote target parameters in
# client mount commands. These private IP addresses are listed
# in the privateIpIds property of the mount target and are highly available. Mount
# targets also consume additional IP addresses in their subnet.
# Do not use /30 or smaller subnets for mount target creation because they
# do not have sufficient available IP addresses.
# Allow at least three IP addresses for each mount target.
#
# For information about access control and compartments, see
# [Overview of the IAM
# Service](https://docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm).
#
# For information about availability domains, see [Regions and
# Availability Domains](https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm).
# To get a list of availability domains, use the
# `ListAvailabilityDomains` operation in the Identity and Access
# Management Service API.
#
# All Oracle Cloud Infrastructure Services resources, including
# mount targets, get an Oracle-assigned, unique ID called an
# Oracle Cloud Identifier ([OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)).
# When you create a resource, you can find its OCID in the response.
# You can also retrieve a resource's OCID by using a List API operation on that resource
# type, or by viewing the resource in the Console.
#
# @param [OCI::FileStorage::Models::CreateMountTargetDetails] create_mount_target_details Details for creating a new mount target.
# @param [Hash] opts the optional parameters
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
#   retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
#   server error without risk of executing that same action again. Retry tokens expire after 24
#   hours, but can be invalidated before then due to conflicting operations. For example, if a resource
#   has been deleted and purged from the system, then a retry of the original creation request
#   might be rejected.
#    (default to none)
# @option opts [String] :opc_request_id Unique identifier for the request.
#   If you need to contact Oracle about a particular request, please provide the request ID.
#
# @return [Response] A Response object with data of type {OCI::FileStorage::Models::MountTarget MountTarget}
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/filestorage/create_mount_target.rb.html) to see an example of how to use create_mount_target API.
Creates a new mount target in the specified compartment and
subnet. You can associate a file system with a mount
target only when they exist in the same availability domain. Instances
can connect to mount targets in another availablity domain, but
you might see higher latency than with instances in the same
availability domain as the mount target.

Mount targets have one or more private IP addresses that you can
provide as the host portion of remote target parameters in
client mount commands. These private IP addresses are listed
in the privateIpIds property of the mount target and are highly available. Mount
targets also consume additional IP addresses in their subnet.
Do not use /30 or smaller subnets for mount target creation because they
do not have sufficient available IP addresses.
Allow at least three IP addresses for each mount target.

For information about access control and compartments, see
[Overview of the IAM
Service].

For information about availability domains, see [Regions and
Availability Domains].
To get a list of availability domains, use the
`ListAvailabilityDomains` operation in the Identity and Access
Management Service API.

All Oracle Cloud Infrastructure Services resources, including
mount targets, get an Oracle-assigned, unique ID called an
Oracle Cloud Identifier ([OCID]).
When you create a resource, you can find its OCID in the response.
You can also retrieve a resource's OCID by using a List API operation on that resource
type, or by viewing the resource in the Console.
Creates a new mount target in the specified compartment and subnet . You can associate a file system with a mount target only when they exist in the same availability domain . Instances can connect to mount targets in another availablity domain but you might see higher latency than with instances in the same availability domain as the mount target . Mount targets have one or more private IP addresses that you can provide as the host portion of remote target parameters in client mount commands . These private IP addresses are listed in the privateIpIds property of the mount target and are highly available . Mount targets also consume additional IP addresses in their subnet . Do not use / 30 or smaller subnets for mount target creation because they do not have sufficient available IP addresses . Allow at least three IP addresses for each mount target . For information about access control and compartments see [ Overview of the IAM Service ] . For information about availability domains see [ Regions and Availability Domains ] . To get a list of availability domains use the ` ListAvailabilityDomains ` operation in the Identity and Access Management Service API . All Oracle Cloud Infrastructure Services resources including mount targets get an Oracle - assigned unique ID called an Oracle Cloud Identifier ( [ OCID ] ) . When you create a resource you can find its OCID in the response . You can also retrieve a resource ' s OCID by using a List API operation on that resource type or by viewing the resource in the Console .
def create_mount_target(create_mount_target_details, opts = {})
      logger.debug 'Calling operation FileStorageClient#create_mount_target.' if logger
      raise "Missing the required parameter 'create_mount_target_details' when calling create_mount_target." if create_mount_target_details.nil?
      path = '/mountTargets'
      operation_signing_strategy = :standard
      query_params = {}
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
      header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
      header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
      post_body = @api_client.object_to_http_body(create_mount_target_details)
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'FileStorageClient#create_mount_target') do
        @api_client.call_api(
          :POST,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::FileStorage::Models::MountTarget'
        )
      end
    end
def create_mount_target ( create_mount_target_details , opts = { } ) logger . debug 'Calling operation FileStorageClient#create_mount_target.' if logger raise "Missing the required parameter 'create_mount_target_details' when calling create_mount_target." if create_mount_target_details . nil? path = '/mountTargets' operation_signing_strategy = :standard query_params = { } header_params = { } header_params [ :accept ] = 'application/json' header_params [ :' content-type ' ] = 'application/json' header_params [ :' opc-retry-token ' ] = opts [ :opc_retry_token ] if opts [ :opc_retry_token ] header_params [ :' opc-request-id ' ] = opts [ :opc_request_id ] if opts [ :opc_request_id ] header_params [ :' opc-retry-token ' ] ||= OCI :: Retry . generate_opc_retry_token post_body = @api_client . object_to_http_body ( create_mount_target_details ) OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'FileStorageClient#create_mount_target' ) do @api_client . call_api ( :POST , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body , return_type : 'OCI::FileStorage::Models::MountTarget' ) end end
Creates a new mount target in the specified compartment and
subnet.
Creates a new mount target in the specified compartment and subnet .
# rubocop:disable Style/NegatedIf # Query Params # Header Params # rubocop:enable Style/NegatedIf # rubocop:disable Metrics/BlockLength # rubocop:enable Metrics/BlockLength
A Response object with data of type {OCI::FileStorage::Models::MountTarget MountTarget}
A Response object with data of type { OCI :: FileStorage :: Models :: MountTarget MountTarget }
Response
create_mount_target_details
opts
:opc_request_id Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
: opc_request_id Unique identifier for the request . If you need to contact Oracle about a particular request please provide the request ID .
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use create_mount_target API.
Click [ here ] to see an example of how to use create_mount_target API .