lib/oci/tenant_manager_control_plane/recipient_invitation_client.rb
# Return a (paginated) list of recipient invitations.
#
# @param [String] compartment_id The ID of the compartment in which to list resources.
# @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] :sender_tenancy_id The tenancy that sent the invitation.
# @option opts [String] :lifecycle_state The lifecycle state of the resource.
# @option opts [String] :status The status of the recipient invitation.
# @option opts [String] :opc_request_id The client request ID for tracing.
# @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
# @return [Response] A Response object with data of type {OCI::TenantManagerControlPlane::Models::RecipientInvitationCollection RecipientInvitationCollection}
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/tenantmanagercontrolplane/list_recipient_invitations.rb.html) to see an example of how to use list_recipient_invitations API.
Return a (paginated) list of recipient invitations.
Return a ( paginated ) list of recipient invitations .
def list_recipient_invitations(compartment_id, opts = {})
      logger.debug 'Calling operation RecipientInvitationClient#list_recipient_invitations.' if logger
      raise "Missing the required parameter 'compartment_id' when calling list_recipient_invitations." if compartment_id.nil?
      if opts[:lifecycle_state] && !OCI::TenantManagerControlPlane::Models::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
        raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::TenantManagerControlPlane::Models::LIFECYCLE_STATE_ENUM.'
      end
      if opts[:status] && !OCI::TenantManagerControlPlane::Models::RECIPIENT_INVITATION_STATUS_ENUM.include?(opts[:status])
        raise 'Invalid value for "status", must be one of the values in OCI::TenantManagerControlPlane::Models::RECIPIENT_INVITATION_STATUS_ENUM.'
      end
      path = '/recipientInvitations'
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:compartmentId] = compartment_id
      query_params[:senderTenancyId] = opts[:sender_tenancy_id] if opts[:sender_tenancy_id]
      query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
      query_params[:status] = opts[:status] if opts[:status]
      query_params[:page] = opts[:page] if opts[:page]
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
      post_body = nil
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'RecipientInvitationClient#list_recipient_invitations') do
        @api_client.call_api(
          :GET,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::TenantManagerControlPlane::Models::RecipientInvitationCollection'
        )
      end
    end
def list_recipient_invitations ( compartment_id , opts = { } ) logger . debug 'Calling operation RecipientInvitationClient#list_recipient_invitations.' if logger raise "Missing the required parameter 'compartment_id' when calling list_recipient_invitations." if compartment_id . nil? if opts [ :lifecycle_state ] && ! OCI :: TenantManagerControlPlane :: Models :: LIFECYCLE_STATE_ENUM . include? ( opts [ :lifecycle_state ] ) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::TenantManagerControlPlane::Models::LIFECYCLE_STATE_ENUM.' end if opts [ :status ] && ! OCI :: TenantManagerControlPlane :: Models :: RECIPIENT_INVITATION_STATUS_ENUM . include? ( opts [ :status ] ) raise 'Invalid value for "status", must be one of the values in OCI::TenantManagerControlPlane::Models::RECIPIENT_INVITATION_STATUS_ENUM.' end path = '/recipientInvitations' operation_signing_strategy = :standard query_params = { } query_params [ :compartmentId ] = compartment_id query_params [ :senderTenancyId ] = opts [ :sender_tenancy_id ] if opts [ :sender_tenancy_id ] query_params [ :lifecycleState ] = opts [ :lifecycle_state ] if opts [ :lifecycle_state ] query_params [ :status ] = opts [ :status ] if opts [ :status ] query_params [ :page ] = opts [ :page ] if opts [ :page ] header_params = { } header_params [ :accept ] = 'application/json' header_params [ :' content-type ' ] = 'application/json' header_params [ :' opc-request-id ' ] = opts [ :opc_request_id ] if opts [ :opc_request_id ] post_body = nil OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'RecipientInvitationClient#list_recipient_invitations' ) do @api_client . call_api ( :GET , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body , return_type : 'OCI::TenantManagerControlPlane::Models::RecipientInvitationCollection' ) end end
Return a (paginated) list of recipient invitations.
Return a ( paginated ) list of recipient invitations .
# 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::TenantManagerControlPlane::Models::RecipientInvitationCollection RecipientInvitationCollection}
A Response object with data of type { OCI :: TenantManagerControlPlane :: Models :: RecipientInvitationCollection RecipientInvitationCollection }
Response
compartment_id
opts
:page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
: page The page token representing the page at which to start retrieving results . This is usually retrieved from a previous list call .
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use list_recipient_invitations API.
Click [ here ] to see an example of how to use list_recipient_invitations API .