Amster

CorsConfiguration

Global Operations

Resource path:

/global-config/services/CorsService/configuration

Resource version: 1.0

create

Usage

am> create CorsConfiguration --global --id id --body body

Parameters

--id

The unique identifier for the resource.

--body

The resource in JSON format, described by the following JSON schema:

{
  "type" : "object",
  "properties" : {
    "acceptedHeaders" : {
      "title" : "Accepted Headers",
      "description" : "The set of (non-simple) accepted headers, included in the pre-flight response in the header Access-Control-Allow-Headers.",
      "propertyOrder" : 30,
      "required" : true,
      "items" : {
        "type" : "string"
      },
      "type" : "array",
      "exampleValue" : ""
    },
    "acceptedMethods" : {
      "title" : "Accepted Methods",
      "description" : "The set of (non-simple) accepted methods, included in the pre-flight response in the header Access-Control-Allow-Methods.",
      "propertyOrder" : 20,
      "required" : true,
      "items" : {
        "type" : "string"
      },
      "type" : "array",
      "exampleValue" : ""
    },
    "acceptedOrigins" : {
      "title" : "Accepted Origins",
      "description" : "The set of accepted origins.",
      "propertyOrder" : 10,
      "required" : true,
      "items" : {
        "type" : "string"
      },
      "type" : "array",
      "exampleValue" : ""
    },
    "allowCredentials" : {
      "title" : "Allow Credentials",
      "description" : "Whether to transmit the Access-Control-Allow-Credentials: true header in the response.",
      "propertyOrder" : 60,
      "required" : true,
      "type" : "boolean",
      "exampleValue" : ""
    },
    "maxAge" : {
      "title" : "Max Age",
      "description" : "The max age (in seconds) for caching, included in the pre-flight response in the header Access-Control-Max-Age.",
      "propertyOrder" : 50,
      "required" : true,
      "type" : "integer",
      "exampleValue" : ""
    },
    "exposedHeaders" : {
      "title" : "Exposed Headers",
      "description" : "The set of headers to transmit in the header Access-Control-Expose-Headers.",
      "propertyOrder" : 40,
      "required" : true,
      "items" : {
        "type" : "string"
      },
      "type" : "array",
      "exampleValue" : ""
    },
    "enabled" : {
      "title" : "Enable the CORS filter",
      "description" : "If disable, no CORS headers will be added to responses.",
      "propertyOrder" : 2,
      "required" : true,
      "type" : "boolean",
      "exampleValue" : ""
    }
  }
}

delete

Usage

am> delete CorsConfiguration --global --id id

Parameters

--id

The unique identifier for the resource.

getAllTypes

Obtain the collection of all secondary configuration types related to the resource.

Usage

am> action CorsConfiguration --global --actionName getAllTypes

getCreatableTypes

Obtain the collection of secondary configuration types that have yet to be added to the resource.

Usage

am> action CorsConfiguration --global --actionName getCreatableTypes

nextdescendents

Obtain the collection of secondary configuration instances that have been added to the resource.

Usage

am> action CorsConfiguration --global --actionName nextdescendents

query

Get the full list of instances of this collection. This query only supports _queryFilter=true filter.

Usage

am> query CorsConfiguration --global --filter filter

Parameters

--filter

A CREST formatted query filter, where "true" will query all.

read

Usage

am> read CorsConfiguration --global --id id

Parameters

--id

The unique identifier for the resource.

update

Usage

am> update CorsConfiguration --global --id id --body body

Parameters

--id

The unique identifier for the resource.

--body

The resource in JSON format, described by the following JSON schema:

{
  "type" : "object",
  "properties" : {
    "acceptedHeaders" : {
      "title" : "Accepted Headers",
      "description" : "The set of (non-simple) accepted headers, included in the pre-flight response in the header Access-Control-Allow-Headers.",
      "propertyOrder" : 30,
      "required" : true,
      "items" : {
        "type" : "string"
      },
      "type" : "array",
      "exampleValue" : ""
    },
    "acceptedMethods" : {
      "title" : "Accepted Methods",
      "description" : "The set of (non-simple) accepted methods, included in the pre-flight response in the header Access-Control-Allow-Methods.",
      "propertyOrder" : 20,
      "required" : true,
      "items" : {
        "type" : "string"
      },
      "type" : "array",
      "exampleValue" : ""
    },
    "acceptedOrigins" : {
      "title" : "Accepted Origins",
      "description" : "The set of accepted origins.",
      "propertyOrder" : 10,
      "required" : true,
      "items" : {
        "type" : "string"
      },
      "type" : "array",
      "exampleValue" : ""
    },
    "allowCredentials" : {
      "title" : "Allow Credentials",
      "description" : "Whether to transmit the Access-Control-Allow-Credentials: true header in the response.",
      "propertyOrder" : 60,
      "required" : true,
      "type" : "boolean",
      "exampleValue" : ""
    },
    "maxAge" : {
      "title" : "Max Age",
      "description" : "The max age (in seconds) for caching, included in the pre-flight response in the header Access-Control-Max-Age.",
      "propertyOrder" : 50,
      "required" : true,
      "type" : "integer",
      "exampleValue" : ""
    },
    "exposedHeaders" : {
      "title" : "Exposed Headers",
      "description" : "The set of headers to transmit in the header Access-Control-Expose-Headers.",
      "propertyOrder" : 40,
      "required" : true,
      "items" : {
        "type" : "string"
      },
      "type" : "array",
      "exampleValue" : ""
    },
    "enabled" : {
      "title" : "Enable the CORS filter",
      "description" : "If disable, no CORS headers will be added to responses.",
      "propertyOrder" : 2,
      "required" : true,
      "type" : "boolean",
      "exampleValue" : ""
    }
  }
}
Copyright © 2010-2024 ForgeRock, all rights reserved.