Sha256: 4bb219602bfbee7779e7cf56e4eeeef05291cc1fc4ed917c595129f2512c5c3d

Contents?: true

Size: 414 Bytes

Versions: 13

Compression:

Stored size: 414 Bytes

Contents

# Create role returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::RolesAPI.new

body = DatadogAPIClient::V2::RoleCreateRequest.new({
  data: DatadogAPIClient::V2::RoleCreateData.new({
    type: DatadogAPIClient::V2::RolesType::ROLES,
    attributes: DatadogAPIClient::V2::RoleCreateAttributes.new({
      name: "Example-Role",
    }),
  }),
})
p api_instance.create_role(body)

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
datadog_api_client-2.22.0 examples/v2/roles/CreateRole.rb
datadog_api_client-2.21.0 examples/v2/roles/CreateRole.rb
datadog_api_client-2.20.0 examples/v2/roles/CreateRole.rb
datadog_api_client-2.19.0 examples/v2/roles/CreateRole.rb
datadog_api_client-2.18.0 examples/v2/roles/CreateRole.rb
datadog_api_client-2.17.0 examples/v2/roles/CreateRole.rb
datadog_api_client-2.16.0 examples/v2/roles/CreateRole.rb
datadog_api_client-2.15.0 examples/v2/roles/CreateRole.rb
datadog_api_client-2.14.0 examples/v2/roles/CreateRole.rb
datadog_api_client-2.13.0 examples/v2/roles/CreateRole.rb
datadog_api_client-2.12.0 examples/v2/roles/CreateRole.rb
datadog_api_client-2.11.0 examples/v2/roles/CreateRole.rb
datadog_api_client-2.10.0 examples/v2/roles/CreateRole.rb