---
title: CorsConfiguration
description: Resource path:
component: pingam
version: 8.1
page_id: pingam:entity-reference:sec-amster-entity-corsconfiguration
canonical_url: https://docs.pingidentity.com/pingam/8.1/entity-reference/sec-amster-entity-corsconfiguration.html
section_ids:
  sec-amster-entity-corsconfiguration-global-ops: Global Operations
  sec-amster-entity-corsconfiguration-global-ops-create: create
  sec-amster-entity-corsconfiguration-global-ops-delete: delete
  sec-amster-entity-corsconfiguration-global-ops-getalltypes: getAllTypes
  sec-amster-entity-corsconfiguration-global-ops-getcreatabletypes: getCreatableTypes
  sec-amster-entity-corsconfiguration-global-ops-nextdescendents: nextdescendents
  sec-amster-entity-corsconfiguration-global-ops-query: query
  sec-amster-entity-corsconfiguration-global-ops-read: read
  sec-amster-entity-corsconfiguration-global-ops-update: update
---

# 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:

  ```json
  {
    "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" : ""
      },
      "enabled" : {
        "title" : "Enable the CORS filter",
        "description" : "If disable, no CORS headers will be added to responses.",
        "propertyOrder" : 2,
        "required" : true,
        "type" : "boolean",
        "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" : ""
      },
      "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" : ""
      },
      "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" : ""
      },
      "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" : ""
      }
    }
  }
  ```

### 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:

  ```json
  {
    "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" : ""
      },
      "enabled" : {
        "title" : "Enable the CORS filter",
        "description" : "If disable, no CORS headers will be added to responses.",
        "propertyOrder" : 2,
        "required" : true,
        "type" : "boolean",
        "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" : ""
      },
      "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" : ""
      },
      "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" : ""
      },
      "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" : ""
      }
    }
  }
  ```
