Chilkat Online Tools

Perl / Core Services API / WithdrawByoipRange

Back to Collection Items

use chilkat();

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

$http = chilkat::CkHttp->new();

$http->SetRequestHeader("opc-request-id","8wF");
$http->SetRequestHeader("x-content-sha256","{{content_sha256}}");
$http->SetRequestHeader("Authorization","{{signature}}");
$http->SetRequestHeader("Date","{{date}}");

# resp is a HttpResponse
$resp = $http->QuickRequest("POST","https://iaas.{{region}}.oraclecloud.com/20160918/byoipRanges/:byoipRangeId/actions/withdraw");
if ($http->get_LastMethodSuccess() == 0) {
    print $http->lastErrorText() . "\r\n";
    exit;
}

$respStatusCode = $resp->get_StatusCode();
print "Response Status Code = " . $respStatusCode . "\r\n";
if ($respStatusCode != 204) {
    print "Response Header:" . "\r\n";
    print $resp->header() . "\r\n";
    print "Response Body:" . "\r\n";
    print $resp->bodyStr() . "\r\n";
    print "Failed." . "\r\n";

    exit;
}

print "Success." . "\r\n";

Curl Command

curl -X POST
	-H "opc-request-id: 8wF"
	-H "Date: {{date}}"
	-H "Authorization: {{signature}}"
	-H "x-content-sha256: {{content_sha256}}"
https://iaas.{{region}}.oraclecloud.com/20160918/byoipRanges/:byoipRangeId/actions/withdraw

Postman Collection Item JSON

{
  "name": "WithdrawByoipRange",
  "request": {
    "method": "POST",
    "header": [
      {
        "description": "Unique identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
        "key": "opc-request-id",
        "value": "8wF"
      },
      {
        "key": "Date",
        "value": "{{date}}",
        "description": "(Required) Current Date",
        "type": "text"
      },
      {
        "key": "Authorization",
        "value": "{{signature}}",
        "description": "(Required) Signature Authentication on Authorization header",
        "type": "text"
      },
      {
        "key": "x-content-sha256",
        "value": "{{content_sha256}}",
        "description": "(Required) Content sha256 for POST, PUT and PATCH operations",
        "type": "text"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/byoipRanges/:byoipRangeId/actions/withdraw",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "byoipRanges",
        ":byoipRangeId",
        "actions",
        "withdraw"
      ],
      "variable": [
        {
          "key": "byoipRangeId",
          "value": "amet ut",
          "description": "(Required) The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource containing the BYOIP CIDR block."
        }
      ]
    },
    "description": "Withdraws BGP route advertisement for the BYOIP CIDR block.\n"
  },
  "response": [
    {
      "name": "The BYOIP CIDR block was withdrawn from BGP advertisement.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Unique identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
            "key": "opc-request-id",
            "value": "8wF"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/byoipRanges/:byoipRangeId/actions/withdraw",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "byoipRanges",
            ":byoipRangeId",
            "actions",
            "withdraw"
          ],
          "variable": [
            {
              "key": "byoipRangeId"
            }
          ]
        }
      },
      "status": "No Content",
      "code": 204,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "opc-request-id",
          "value": "officia sed",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact\nOracle about a particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "Bad Request",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Unique identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
            "key": "opc-request-id",
            "value": "8wF"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/byoipRanges/:byoipRangeId/actions/withdraw",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "byoipRanges",
            ":byoipRangeId",
            "actions",
            "withdraw"
          ],
          "variable": [
            {
              "key": "byoipRangeId"
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "officia sed",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact\nOracle about a particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"et exercitation Excepteur\",\n \"message\": \"irure sit\"\n}"
    },
    {
      "name": "Unauthorized",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Unique identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
            "key": "opc-request-id",
            "value": "8wF"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/byoipRanges/:byoipRangeId/actions/withdraw",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "byoipRanges",
            ":byoipRangeId",
            "actions",
            "withdraw"
          ],
          "variable": [
            {
              "key": "byoipRangeId"
            }
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "officia sed",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact\nOracle about a particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"et exercitation Excepteur\",\n \"message\": \"irure sit\"\n}"
    },
    {
      "name": "Internal Server Error",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Unique identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
            "key": "opc-request-id",
            "value": "8wF"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/byoipRanges/:byoipRangeId/actions/withdraw",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "byoipRanges",
            ":byoipRangeId",
            "actions",
            "withdraw"
          ],
          "variable": [
            {
              "key": "byoipRangeId"
            }
          ]
        }
      },
      "status": "Internal Server Error",
      "code": 500,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "officia sed",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact\nOracle about a particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"et exercitation Excepteur\",\n \"message\": \"irure sit\"\n}"
    },
    {
      "name": "An error has occurred.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Unique identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
            "key": "opc-request-id",
            "value": "8wF"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/byoipRanges/:byoipRangeId/actions/withdraw",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "byoipRanges",
            ":byoipRangeId",
            "actions",
            "withdraw"
          ],
          "variable": [
            {
              "key": "byoipRangeId"
            }
          ]
        }
      },
      "status": "Internal Server Error",
      "code": 500,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "officia sed",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact\nOracle about a particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"et exercitation Excepteur\",\n \"message\": \"irure sit\"\n}"
    }
  ]
}