Skip to content
  • Auto
  • Light
  • Dark
Get Started

Create

Create App Access Requests Defaults
client.Apps.AccessRequestDefaults.New(ctx, appID, body) (*AppIDstringCatalogIDsarrayDefaultsEnabledboolDurationGrantstringDurationUnsetanyEmergencyGrantEnabledboolEmergencyGrantPolicyIDstringRequestPolicyIDstringResourceTypeIDsarrayStateC1APIAppV1AppAccessRequestDefaultsStateC1APIAppV1AppAccessRequestDefaults, error)
post/api/v1/apps/{app_id}/access_request_defaults

Invokes the c1.api.app.v1.AppAccessRequestsDefaultsService.CreateAppAccessRequestsDefaults method.

Parameters
appIDstring

The app id for the app access request rule

bodyCatalogIDsfieldDefaultsEnabledfieldDurationGrantfieldDurationUnsetfieldEmergencyGrantEnabledfieldEmergencyGrantPolicyIDfieldRequestPolicyIDfieldResourceTypeIDsfieldStatefieldAppAccessRequestDefaultNewParams
Hide ParametersShow Parameters
CatalogIDsfield
optional
param.Field[[]string]

The request catalog ids for the app access request rule.

DefaultsEnabledfield
optional
param.Field[bool]

If true the app level request configuration will be applied to specified resource types.

DurationGrantfield
optional
param.Field[string]
formatduration
DurationUnsetfield
optional
param.Field[any]
EmergencyGrantEnabledfield
optional
param.Field[bool]

If emergency grants are enabled for this app access request rule.

EmergencyGrantPolicyIDfield
optional
param.Field[string]

The policy id for the emergency grant policy.

RequestPolicyIDfield
optional
param.Field[string]

The requestPolicyId field.

ResourceTypeIDsfield
optional
param.Field[[]string]

The app resource type ids for which the app access request defaults are applied.

Statefield
optional

The last applied state of the app access request defaults.

Hide ParametersShow Parameters
AppAccessRequestDefaultNewParamsStateAppAccessRequestDefaultsLastApplyStateUnspecifiedconst
"APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_UNSPECIFIED"
AppAccessRequestDefaultNewParamsStateAppAccessRequestDefaultsLastApplyStateRunningconst
"APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_RUNNING"
AppAccessRequestDefaultNewParamsStateAppAccessRequestDefaultsLastApplyStateSuccessconst
"APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_SUCCESS"
AppAccessRequestDefaultNewParamsStateAppAccessRequestDefaultsLastApplyStateFailedconst
"APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_FAILED"
AppAccessRequestDefaultNewParamsStateAppAccessRequestDefaultsLastApplyStateCancelingconst
"APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_CANCELING"
AppAccessRequestDefaultNewParamsStateAppAccessRequestDefaultsLastApplyStateCancelSuccessconst
"APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_CANCEL_SUCCESS"
AppAccessRequestDefaultNewParamsStateAppAccessRequestDefaultsLastApplyStateCancelErrorconst
"APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_CANCEL_ERROR"
Returns
AppIDstringCatalogIDsarrayDefaultsEnabledboolDurationGrantstringDurationUnsetanyEmergencyGrantEnabledboolEmergencyGrantPolicyIDstringRequestPolicyIDstringResourceTypeIDsarrayStateC1APIAppV1AppAccessRequestDefaultsStateC1APIAppV1AppAccessRequestDefaults
Request example Go
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := conductoronesdk.NewClient(
    option.WithAPIKey("My API Key"),
  )
  c1APIAppV1AppAccessRequestDefaults, err := client.Apps.AccessRequestDefaults.New(
    context.TODO(),
    "app_id",
    conductoronesdk.AppAccessRequestDefaultNewParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", c1APIAppV1AppAccessRequestDefaults.AppID)
}
200 Example
{
  "appId": "appId",
  "catalogIds": [
    "string"
  ],
  "defaultsEnabled": true,
  "durationGrant": "durationGrant",
  "durationUnset": {},
  "emergencyGrantEnabled": true,
  "emergencyGrantPolicyId": "emergencyGrantPolicyId",
  "requestPolicyId": "requestPolicyId",
  "resourceTypeIds": [
    "string"
  ],
  "state": "APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_UNSPECIFIED"
}