openapi: 3.0.1 info: title: Nutanix Identity and Access Management APIs description: "Nutanix APIs for managing users, user-groups, directory services,\ \ identity providers, roles and authorization policies." version: 1.0.0-beta-2 x-repo-name: iam x-logo: altText: Iam Logo url: https://developers.nutanix.com/api/v1/namespaces/iam/images/iam-logo-img.svg x-minimum-negotiation-version: v4.1.b2 servers: - url: "https://{host}:{port}/api" security: - basicAuthScheme: [] - apiKeyAuthScheme: [] tags: - name: DirectoryServices description: | These APIs configure the AD or OpenLDAP directories for user authentication. Users can create, list, fetch, update, and delete directory services. x-displayName: Directory Services - name: SAMLIdentityProviders description: | These APIs configure SAML identity providers such as ADFS or OKTA for user authentication. Users can create, list, delete, update, and fetch SAML identity providers and SAML sp-metadata. x-displayName: SAML Identity Providers - name: CertificateAuthenticationProviders description: | These APIs configure the certificate-based providers for user authentication. Users can create, list, fetch, update, and delete certificate-based authentication providers. x-displayName: Certificate Authentication Providers - name: LoginProviders description: | These APIs list down all the configured login providers. x-displayName: Login Providers - name: Users description: | These APIs configure local, SAML, LDAP, and external users. Users can: Create, list, fetch, update, and delete users. Create, list, and delete Bucket Access Keys. Change and reset user passwords and change status. x-displayName: Users - name: UserGroups description: | These APIs configure user groups which are a collection of IAM users. Users create, list, fetch, and delete user groups. x-displayName: User Groups - name: Clients description: | These APIs configure and manage service clients. Users can register, list, fetch, and update service clients. x-displayName: Clients - name: Entities description: | These APIs configure and manage entities representing the resources over which permissions are defined. Users can use these APIs to list and fetch entities. x-displayName: Entities - name: Operations description: | These APIs manage the operations that an identity can perform on a set of entities. Users can use these APIs to list and fetch operations. x-displayName: Operations - name: Roles description: | These APIs manage and configure roles for identities. The role represents a list of operations. Users can use these APIs to create, list, fetch, update, delete, migrate, and scan migration impacts for Roles. x-displayName: Roles - name: AuthorizationPolicies description: | These APIs configure authorization policies for identities, giving them access to perform a list of operations on certain entities. Users can create, list, fetch, update, and delete authorization policies. x-displayName: Authorization Policies - name: WelcomeBanner description: | These APIs configure and manage the banner shown during Login screen. x-displayName: Welcome Banner paths: /iam/v4.1.b2/authz/authorization-policies: get: tags: - AuthorizationPolicies summary: List authorization policies description: Lists all the authorization policies. operationId: listAuthorizationPolicies parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: authorizationPolicyType example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$filter=authorizationPolicyType\ \ eq Iam.Authz.AuthorizationPolicyType'USER_DEFINED'" - name: clientName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$filter=clientName\ \ eq 'Prism'" - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$filter=createdBy\ \ eq '390b7801-7a80-5c94-8a07-8de63651b27b'" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$filter=createdTime\ \ eq '2009-09-23T14:30:00-07:00'" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$filter=displayName\ \ eq 'Policy1'" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$filter=extId\ \ eq 'a0469b2b-6bc3-4d9a-ad5f-9f7529b07a77'" - name: isSystemDefined example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$filter=isSystemDefined\ \ eq true" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$filter=lastUpdatedTime\ \ eq '2009-09-23T14:30:00-07:00'" - name: role example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$filter=role\ \ eq '6e9e1f10-8937-4687-91e6-8da9f9b7ede8'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$orderby=createdTime" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$orderby=displayName" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$orderby=extId" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$orderby=lastUpdatedTime" - name: role example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$orderby=role" - name: $expand in: query description: "A URL query parameter that allows clients to request related\ \ resources when a resource that satisfies a particular request is retrieved.\ \ Each expanded item is evaluated relative to the entity containing the\ \ property being expanded. Other query options can be applied to an expanded\ \ property by appending a semicolon-separated list of query options, enclosed\ \ in parentheses, to the property name. Permissible system query options\ \ are $filter, $select and $orderby." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: role example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$expand=role" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: assignedUserGroupsCount example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=assignedUserGroupsCount" - name: assignedUsersCount example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=assignedUsersCount" - name: authorizationPolicyType example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=authorizationPolicyType" - name: clientName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=clientName" - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=createdBy" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=createdTime" - name: description example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=description" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=displayName" - name: entities example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=entities" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=extId" - name: identities example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=identities" - name: isSystemDefined example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=isSystemDefined" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=lastUpdatedTime" - name: role example: "https://{host}:{port}/api/iam/v4.1.b2/authz/authorization-policies?$select=role" responses: "200": description: Returns a list of authorization policies. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthorizationPolicy' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies Get operation x-permissions: operationName: View Authorization Policy deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 10 timeUnit: seconds - type: Small count: 10 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 20 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.AuthorizationPoliciesApi;\nimport\ \ com.nutanix.dp1.iam.iam.v4.request.AuthorizationPolicies.ListAuthorizationPoliciesRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authz.ListAuthorizationPoliciesApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ AuthorizationPoliciesApi authorizationPoliciesApi = new AuthorizationPoliciesApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListAuthorizationPoliciesApiResponse\ \ listAuthorizationPoliciesApiResponse = authorizationPoliciesApi.listAuthorizationPolicies(ListAuthorizationPoliciesRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$expand(null)\n .$select(null)\n .build());\n\ \n System.out.println(listAuthorizationPoliciesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, AuthorizationPoliciesApi } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let authorizationPoliciesApi = new AuthorizationPoliciesApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$expand"] = "string_sample_data"; opts["$select"] = "string_sample_data"; authorizationPoliciesApi.listAuthorizationPolicies(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n authorization_policies_api\ \ = ntnx_iam_py_client.AuthorizationPoliciesApi(api_client=client)\n \ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = authorization_policies_api.list_authorization_policies(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/authorizationpolicies\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authz\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n AuthorizationPoliciesServiceApiInstance\ \ *api.AuthorizationPoliciesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ AuthorizationPoliciesServiceApiInstance = api.NewAuthorizationPoliciesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := authorizationpolicies.ListAuthorizationPoliciesRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil, Expand_:\ \ nil, Select_: nil }\n response, error := AuthorizationPoliciesServiceApiInstance.ListAuthorizationPolicies(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.AuthorizationPolicy)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authz/authorization-policies?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authz/authorization-policies?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$expand=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authz;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n AuthorizationPoliciesApi\ \ authorizationPoliciesApi = new AuthorizationPoliciesApi(client);\n\n \ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String expand =\ \ \"string_sample_data\";\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListAuthorizationPoliciesRequest {\n Page = page,\n \ \ Limit = limit,\n Filter = filter,\n Orderby\ \ = orderby,\n Expand = expand,\n Select = select\n\ \ };\n try {\n ListAuthorizationPoliciesApiResponse\ \ listAuthorizationPoliciesApiResponse = authorizationPoliciesApi.ListAuthorizationPolicies(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" post: tags: - AuthorizationPolicies summary: Create authorization policy description: Creates an authorization policy. operationId: createAuthorizationPolicy requestBody: description: "Information for the create authorization policy request. It\ \ requires the role, identity and entities attributes." content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthorizationPolicy' required: true responses: "201": description: Authorization policy created. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthorizationPolicy' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies Post operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies Post operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies Post operation x-permissions: operationName: Create Authorization Policy deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.iam.java.client.ApiClient; import com.nutanix.iam.java.client.api.AuthorizationPoliciesApi; import com.nutanix.dp1.iam.iam.v4.request.AuthorizationPolicies.CreateAuthorizationPolicyRequest; import com.nutanix.dp1.iam.iam.v4.authz.AuthorizationPolicy; import com.nutanix.dp1.iam.iam.v4.authz.CreateAuthorizationPolicyApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. AuthorizationPoliciesApi authorizationPoliciesApi = new AuthorizationPoliciesApi(apiClient); AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy(); // AuthorizationPolicy object initializations here... try { // Pass in parameters using the request builder object associated with the operation. CreateAuthorizationPolicyApiResponse createAuthorizationPolicyApiResponse = authorizationPoliciesApi.createAuthorizationPolicy(CreateAuthorizationPolicyRequest.builder() .build(), authorizationPolicy); System.out.println(createAuthorizationPolicyApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, AuthorizationPoliciesApi, AuthorizationPolicy } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let authorizationPoliciesApi = new AuthorizationPoliciesApi(apiClientInstance); function sample() { let authorizationPolicy = new AuthorizationPolicy(); // AuthorizationPolicy object initializations here... authorizationPolicy = JSON.stringify(authorizationPolicy); authorizationPoliciesApi.createAuthorizationPolicy(authorizationPolicy).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_iam_py_client if __name__ == "__main__": # Configure the client config = ntnx_iam_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_iam_py_client.ApiClient(configuration=config) authorization_policies_api = ntnx_iam_py_client.AuthorizationPoliciesApi(api_client=client) authorizationPolicy = ntnx_iam_py_client.AuthorizationPolicy() # AuthorizationPolicy object initializations here... try: api_response = authorization_policies_api.create_authorization_policy(body=authorizationPolicy) print(api_response) except ntnx_iam_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/authorizationpolicies" import1 "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authz" ) var ( ApiClientInstance *client.ApiClient AuthorizationPoliciesServiceApiInstance *api.AuthorizationPoliciesServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. AuthorizationPoliciesServiceApiInstance = api.NewAuthorizationPoliciesServiceApi(ApiClientInstance) ctx := context.Background() authorizationPolicy := import1.NewAuthorizationPolicy() // AuthorizationPolicy object initializations here... request := authorizationpolicies.CreateAuthorizationPolicyRequest{ Body: authorizationPolicy } response, error := AuthorizationPoliciesServiceApiInstance.CreateAuthorizationPolicy(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import1.AuthorizationPolicy) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authz/authorization-policies" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"displayName":"Policy1","description":"Authorizationpolicy-1","clientName":"Prism","entities":[{"$objectType":"iam.v4.authz.EntityFilter"}],"role":"string","identities":[{"$objectType":"iam.v4.authz.IdentityFilter"}],"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","isSystemDefined":true,"authorizationPolicyType":"$UNKNOWN","assignedUsersCount":0,"assignedUserGroupsCount":0,"$objectType":"iam.v4.authz.AuthorizationPolicy"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"displayName":"Policy1","description":"Authorizationpolicy-1","clientName":"Prism","entities":[{"$objectType":"iam.v4.authz.EntityFilter"}],"role":"string","identities":[{"$objectType":"iam.v4.authz.IdentityFilter"}],"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","isSystemDefined":true,"authorizationPolicyType":"$UNKNOWN","assignedUsersCount":0,"assignedUserGroupsCount":0,"$objectType":"iam.v4.authz.AuthorizationPolicy"} \ - "https://host:port/api/iam/v4.1.b2/authz/authorization-policies" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authz;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n AuthorizationPoliciesApi\ \ authorizationPoliciesApi = new AuthorizationPoliciesApi(client);\n\n \ \ AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();\n\ \n // AuthorizationPolicy object initializations here...\n\n\n \ \ // Create request object with parameters\n var request = new\ \ CreateAuthorizationPolicyRequest {\n Body = authorizationPolicy\n\ \ };\n try {\n CreateAuthorizationPolicyApiResponse\ \ createAuthorizationPolicyApiResponse = authorizationPoliciesApi.CreateAuthorizationPolicy(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /iam/v4.1.b2/authz/authorization-policies/{extId}: get: tags: - AuthorizationPolicies summary: Get authorization policy description: Displays an authorization policy based on the provided external identifier. operationId: getAuthorizationPolicyById parameters: - name: extId in: path description: External identifier for the role. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 4f650fee-0fcd-4544-a8d3-0941f91ab2d2 responses: "200": description: Returned requested authorization policy. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthorizationPolicy' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies/{extId}\ \ Get operation" x-permissions: operationName: View Authorization Policy deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 10 timeUnit: seconds - type: Small count: 10 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.AuthorizationPoliciesApi;\nimport\ \ com.nutanix.dp1.iam.iam.v4.request.AuthorizationPolicies.GetAuthorizationPolicyByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authz.GetAuthorizationPolicyApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ AuthorizationPoliciesApi authorizationPoliciesApi = new AuthorizationPoliciesApi(apiClient);\n\ \n \n String extId = \"AaEf1A2d-4De5-efBc-8e18-cB5E5389EF7a\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetAuthorizationPolicyApiResponse\ \ getAuthorizationPolicyApiResponse = authorizationPoliciesApi.getAuthorizationPolicyById(GetAuthorizationPolicyByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getAuthorizationPolicyApiResponse.toString());\n\n\ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, AuthorizationPoliciesApi } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let authorizationPoliciesApi = new AuthorizationPoliciesApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"bE7dcBDa-147b-aDDA-Ff3d-0EcEa97D17de\"\ ;\n\n\n\n\n\n authorizationPoliciesApi.getAuthorizationPolicyById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n authorization_policies_api\ \ = ntnx_iam_py_client.AuthorizationPoliciesApi(api_client=client)\n \ \ \n ext_id = \"b8B73F4a-0aee-1F7D-8A2b-6C778cCaCbBf\"\n\n\n try:\n\ \ api_response = authorization_policies_api.get_authorization_policy_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/authorizationpolicies\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authz\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n AuthorizationPoliciesServiceApiInstance\ \ *api.AuthorizationPoliciesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ AuthorizationPoliciesServiceApiInstance = api.NewAuthorizationPoliciesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"BC5BfbdB-FaeA-cedA-CACE-aFD6Bba4eDe6\"\ \n\n\n request := authorizationpolicies.GetAuthorizationPolicyByIdRequest{\ \ ExtId: &extId }\n response, error := AuthorizationPoliciesServiceApiInstance.GetAuthorizationPolicyById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.AuthorizationPolicy)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authz/authorization-policies/8A1bBD23-0BEb-9cEF-b1EB-9F2dcEd9fb7E" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authz/authorization-policies/99B1cD6f-3d8c-6cdC-CBC0-f7aBB2eBb4FF" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authz;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n AuthorizationPoliciesApi\ \ authorizationPoliciesApi = new AuthorizationPoliciesApi(client);\n\n \ \ String extId = \"ea2dbFf0-BfE5-7c9A-DcD1-ddddbFF3bfFd\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetAuthorizationPolicyByIdRequest {\n ExtId = extId\n \ \ };\n try {\n GetAuthorizationPolicyApiResponse getAuthorizationPolicyApiResponse\ \ = authorizationPoliciesApi.GetAuthorizationPolicyById(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - AuthorizationPolicies summary: Update authorization policy description: Updates an authorization policy based on the provided external identifier. operationId: updateAuthorizationPolicyById parameters: - name: extId in: path description: External identifier for the role. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: f6378a0b-7199-4f55-9228-b3f6c1e3d543 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string requestBody: description: Information for the update authorization policy request. content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthorizationPolicy' required: true responses: "200": description: Requested authorization policy updated. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/common.v1.0.config.Message' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies/{extId}\ \ Put operation" x-permissions: operationName: Update Authorization Policy deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.AuthorizationPoliciesApi;\nimport\ \ com.nutanix.dp1.iam.iam.v4.request.AuthorizationPolicies.UpdateAuthorizationPolicyByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.request.AuthorizationPolicies.GetAuthorizationPolicyByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.iam.iam.v4.authz.AuthorizationPolicy;\n\ import com.nutanix.dp1.iam.iam.v4.authz.GetAuthorizationPolicyApiResponse;\n\ import com.nutanix.dp1.iam.iam.v4.authz.UpdateAuthorizationPolicyApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ AuthorizationPoliciesApi authorizationPoliciesApi = new AuthorizationPoliciesApi(apiClient);\n\ \n AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();\n\ \n // AuthorizationPolicy object initializations here...\n \ \ \n String extId = \"13DcdDb4-Bc9b-DDe4-A0df-6ddAd5ABcF7b\";\n\n\ \ // perform GET call\n GetAuthorizationPolicyApiResponse\ \ getResponse = null;\n try {\n getResponse = authorizationPoliciesApi.getAuthorizationPolicyById(GetAuthorizationPolicyByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n UpdateAuthorizationPolicyApiResponse\ \ updateAuthorizationPolicyApiResponse = authorizationPoliciesApi.updateAuthorizationPolicyById(UpdateAuthorizationPolicyByIdRequest.builder()\n\ \ .extId(extId)\n .build(), authorizationPolicy,\ \ opts);\n\n System.out.println(updateAuthorizationPolicyApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, AuthorizationPoliciesApi, AuthorizationPolicy,\ \ GetAuthorizationPolicyApiResponse } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let authorizationPoliciesApi = new AuthorizationPoliciesApi(apiClientInstance);\n\ \nfunction sample() {\n let authorizationPolicy = new AuthorizationPolicy();\n\ \n // AuthorizationPolicy object initializations here...\n authorizationPolicy\ \ = JSON.stringify(authorizationPolicy);\n\n \n let extId = \"7ae8afDb-9AbB-6E7a-749b-FFCEE3edDBdf\"\ ;\n\n\n // Perform Get call\n authorizationPoliciesApi.getAuthorizationPolicyById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n authorizationPoliciesApi.updateAuthorizationPolicyById(extId,\ \ authorizationPolicy, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n authorization_policies_api\ \ = ntnx_iam_py_client.AuthorizationPoliciesApi(api_client=client)\n \ \ authorizationPolicy = ntnx_iam_py_client.AuthorizationPolicy()\n\n \ \ # AuthorizationPolicy object initializations here...\n \n ext_id\ \ = \"EedA5fDB-Ba7A-B8bC-FdaE-9b39BFD0d41E\"\n\n try:\n api_response\ \ = authorization_policies_api.get_authorization_policy_by_id(extId=ext_id)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_iam_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = authorization_policies_api.update_authorization_policy_by_id(extId=ext_id,\ \ body=authorizationPolicy, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/authorizationpolicies\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authz\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/common/v1/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n AuthorizationPoliciesServiceApiInstance\ \ *api.AuthorizationPoliciesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ AuthorizationPoliciesServiceApiInstance = api.NewAuthorizationPoliciesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n authorizationPolicy := import1.NewAuthorizationPolicy()\n\ \n // AuthorizationPolicy object initializations here...\n\n \n \ \ extId := \"BaDedfdA-9ECF-cA7E-F7f7-A3ecDc84dEDf\"\n\n getRequest :=\ \ authorizationpolicies.GetAuthorizationPolicyByIdRequest{ extId: &extId\ \ }\n getResponse, err := AuthorizationPoliciesServiceApiInstance.GetAuthorizationPolicyById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := authorizationpolicies.UpdateAuthorizationPolicyByIdRequest{\ \ ExtId: &extId, Body: authorizationPolicy }\n response, error := AuthorizationPoliciesServiceApiInstance.UpdateAuthorizationPolicyById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.Message)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/iam/v4.1.b2/authz/authorization-policies/afadAf92-cAfE-a9Af-bADF-aBad8Db7D2ab" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"displayName":"Policy1","description":"Authorizationpolicy-1","clientName":"Prism","entities":[{"$objectType":"iam.v4.authz.EntityFilter"}],"role":"string","identities":[{"$objectType":"iam.v4.authz.IdentityFilter"}],"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","isSystemDefined":true,"authorizationPolicyType":"$UNKNOWN","assignedUsersCount":0,"assignedUserGroupsCount":0,"$objectType":"iam.v4.authz.AuthorizationPolicy"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"displayName":"Policy1","description":"Authorizationpolicy-1","clientName":"Prism","entities":[{"$objectType":"iam.v4.authz.EntityFilter"}],"role":"string","identities":[{"$objectType":"iam.v4.authz.IdentityFilter"}],"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","isSystemDefined":true,"authorizationPolicyType":"$UNKNOWN","assignedUsersCount":0,"assignedUserGroupsCount":0,"$objectType":"iam.v4.authz.AuthorizationPolicy"} \ - "https://host:port/api/iam/v4.1.b2/authz/authorization-policies/e4Cf9CfE-dcA7-a0Ca-0AaC-dEBd90d8DF4e" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authz;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n AuthorizationPoliciesApi\ \ authorizationPoliciesApi = new AuthorizationPoliciesApi(client);\n\n \ \ AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();\n\ \n // AuthorizationPolicy object initializations here...\n\n String\ \ extId = \"caeadBce-95d6-2acc-bCab-E3fe4D5AaaAb\";\n\n // perform\ \ GET call\n var getRequest = new GetAuthorizationPolicyByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetAuthorizationPolicyApiResponse\ \ getResponse = authorizationPoliciesApi.GetAuthorizationPolicyById(getRequest);\n\ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateAuthorizationPolicyByIdRequest {\n ExtId\ \ = extId,\n Body = authorizationPolicy,\n \n \ \ \n };\n try {\n UpdateAuthorizationPolicyApiResponse\ \ updateAuthorizationPolicyApiResponse = authorizationPoliciesApi.UpdateAuthorizationPolicyById(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - AuthorizationPolicies summary: Delete authorization policy description: Deletes an authorization policy based on the provided external identifier. operationId: deleteAuthorizationPolicyById parameters: - name: extId in: path description: External identifier for the role. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 5b1011ec-f154-4e5b-9702-e1f7f6f6e2f0 - name: If-Match in: header description: | The If-Match request header makes the request conditional. When not provided the server will respond with an HTTP 428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP 412 (Precondition Failed) response required: true style: simple explode: false schema: type: string example: string responses: "204": description: Requested authorization policy deleted. content: application/json: {} "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies/{extId}\ \ Delete operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies/{extId}\ \ Delete operation" x-permissions: operationName: Delete Authorization Policy deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" /iam/v4.1.b2/authn/cert-auth-providers: get: tags: - CertificateAuthenticationProviders summary: List certificate-based authentication providers description: Lists all configured certificate-based authentication providers. operationId: listCertAuthProviders parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 responses: "200": description: Certificate-based authentication providers returned. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.CertAuthProvider' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers Get operation x-permissions: operationName: View Certificate Authentication deploymentList: - ON_PREM - CLOUD roleList: - name: Project Admin - name: Prism Admin - name: Prism Viewer - name: Super Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.CertificateAuthenticationProvidersApi;\n\ import com.nutanix.dp1.iam.iam.v4.request.CertificateAuthenticationProviders.ListCertAuthProvidersRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.ListCertAuthProvidersApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ CertificateAuthenticationProvidersApi certificateAuthenticationProvidersApi\ \ = new CertificateAuthenticationProvidersApi(apiClient);\n\n \n\ \ int page = 0;\n \n int limit = 50;\n\n try\ \ {\n // Pass in parameters using the request builder object\ \ associated with the operation.\n ListCertAuthProvidersApiResponse\ \ listCertAuthProvidersApiResponse = certificateAuthenticationProvidersApi.listCertAuthProviders(ListCertAuthProvidersRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .build());\n\n System.out.println(listCertAuthProvidersApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, CertificateAuthenticationProvidersApi } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let certificateAuthenticationProvidersApi = new CertificateAuthenticationProvidersApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; certificateAuthenticationProvidersApi.listCertAuthProviders(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n certificate_authentication_providers_api\ \ = ntnx_iam_py_client.CertificateAuthenticationProvidersApi(api_client=client)\n\ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = certificate_authentication_providers_api.list_cert_auth_providers(_page=page,\ \ _limit=limit)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/certificateauthenticationproviders\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n CertificateAuthenticationProvidersServiceApiInstance\ \ *api.CertificateAuthenticationProvidersServiceApi\n)\n\nfunc main() {\n\ \ ApiClientInstance = client.NewApiClient()\n // IPv4/IPv6 address\ \ or FQDN of the cluster\n ApiClientInstance.Host = \"localhost\"\n \ \ // Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n ApiClientInstance.Port = 9440\n //\ \ Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ CertificateAuthenticationProvidersServiceApiInstance = api.NewCertificateAuthenticationProvidersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := certificateauthenticationproviders.ListCertAuthProvidersRequest{\ \ Page_: &page_, Limit_: &limit_ }\n response, error := CertificateAuthenticationProvidersServiceApiInstance.ListCertAuthProviders(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.CertAuthProvider)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/cert-auth-providers?$limit=50&$page=0" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/cert-auth-providers?$limit=50&$page=0" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n CertificateAuthenticationProvidersApi\ \ certificateAuthenticationProvidersApi = new CertificateAuthenticationProvidersApi(client);\n\ \n int page = 0;\n int limit = 50;\n\n // Create request\ \ object with parameters\n var request = new ListCertAuthProvidersRequest\ \ {\n Page = page,\n Limit = limit\n };\n \ \ try {\n ListCertAuthProvidersApiResponse listCertAuthProvidersApiResponse\ \ = certificateAuthenticationProvidersApi.ListCertAuthProviders(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" post: tags: - CertificateAuthenticationProviders summary: Create certificate-based authentication provider description: Creates a certificate-based authentication provider. operationId: createCertAuthProvider requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.CertAuthProvider' required: true responses: "201": description: Certificate-based authentication providers created. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.CertAuthProvider' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers Post operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers Post operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers Post operation x-permissions: operationName: Create Certificate Authentication deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 5 timeUnit: seconds - type: XLarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.iam.java.client.ApiClient; import com.nutanix.iam.java.client.api.CertificateAuthenticationProvidersApi; import com.nutanix.dp1.iam.iam.v4.request.CertificateAuthenticationProviders.CreateCertAuthProviderRequest; import com.nutanix.dp1.iam.iam.v4.authn.CertAuthProvider; import com.nutanix.dp1.iam.iam.v4.authn.CreateCertAuthProviderApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. CertificateAuthenticationProvidersApi certificateAuthenticationProvidersApi = new CertificateAuthenticationProvidersApi(apiClient); CertAuthProvider certAuthProvider = new CertAuthProvider(); // CertAuthProvider object initializations here... try { // Pass in parameters using the request builder object associated with the operation. CreateCertAuthProviderApiResponse createCertAuthProviderApiResponse = certificateAuthenticationProvidersApi.createCertAuthProvider(CreateCertAuthProviderRequest.builder() .build()); System.out.println(createCertAuthProviderApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: "\nimport { ApiClient, CertificateAuthenticationProvidersApi, CertAuthProvider\ \ } from \"@nutanix-api/iam-js-client\";\n\n// Configure the client\nlet\ \ apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let certificateAuthenticationProvidersApi = new CertificateAuthenticationProvidersApi(apiClientInstance);\n\ \nfunction sample() {\n let certAuthProvider = new CertAuthProvider();\n\ \n // CertAuthProvider object initializations here...\n \n\n\n\n\n\ \n\n certificateAuthenticationProvidersApi.createCertAuthProvider().then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: |2+ import ntnx_iam_py_client if __name__ == "__main__": # Configure the client config = ntnx_iam_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_iam_py_client.ApiClient(configuration=config) certificate_authentication_providers_api = ntnx_iam_py_client.CertificateAuthenticationProvidersApi(api_client=client) certAuthProvider = ntnx_iam_py_client.CertAuthProvider() # CertAuthProvider object initializations here... try: api_response = certificate_authentication_providers_api.create_cert_auth_provider() print(api_response) except ntnx_iam_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/certificateauthenticationproviders" import1 "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn" ) var ( ApiClientInstance *client.ApiClient CertificateAuthenticationProvidersServiceApiInstance *api.CertificateAuthenticationProvidersServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. CertificateAuthenticationProvidersServiceApiInstance = api.NewCertificateAuthenticationProvidersServiceApi(ApiClientInstance) ctx := context.Background() certAuthProvider := import1.NewCertAuthProvider() // CertAuthProvider object initializations here... request := certificateauthenticationproviders.CreateCertAuthProviderRequest{ } response, error := CertificateAuthenticationProvidersServiceApiInstance.CreateCertAuthProvider(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import1.CertAuthProvider) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authn/cert-auth-providers" \ --header 'Accept: application/json' \ --header 'Content-Type: multipart/form-data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data_binary @SOME_BINARY_DATA \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: multipart/form-data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --post-file @SOME_BINARY_DATA \ - "https://host:port/api/iam/v4.1.b2/authn/cert-auth-providers" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n CertificateAuthenticationProvidersApi\ \ certificateAuthenticationProvidersApi = new CertificateAuthenticationProvidersApi(client);\n\ \n CertAuthProvider certAuthProvider = new CertAuthProvider();\n\n\ \ // CertAuthProvider object initializations here...\n\n\n try\ \ {\n CreateCertAuthProviderApiResponse createCertAuthProviderApiResponse\ \ = certificateAuthenticationProvidersApi.CreateCertAuthProvider();\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /iam/v4.1.b2/authn/cert-auth-providers/{extId}: get: tags: - CertificateAuthenticationProviders summary: Get certificate-based authentication provider description: Fetches a certificate-based authentication provider by its UUID. operationId: getCertAuthProviderById parameters: - name: extId in: path description: UUID V5 created for the certificate-based authentication provider. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 85862dfb-8887-486c-aae8-049b468bef71 responses: "200": description: Certificate-based authentication provider returned. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.CertAuthProvider' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers/{extId}\ \ Get operation" x-permissions: operationName: View Certificate Authentication deploymentList: - ON_PREM - CLOUD roleList: - name: Project Admin - name: Prism Admin - name: Prism Viewer - name: Super Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 5 timeUnit: seconds - type: XLarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.CertificateAuthenticationProvidersApi;\n\ import com.nutanix.dp1.iam.iam.v4.request.CertificateAuthenticationProviders.GetCertAuthProviderByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.GetCertAuthProviderApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ CertificateAuthenticationProvidersApi certificateAuthenticationProvidersApi\ \ = new CertificateAuthenticationProvidersApi(apiClient);\n\n \n\ \ String extId = \"D5e1DE4F-83C0-DE3a-efff-E0A08dFCBd9b\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n GetCertAuthProviderApiResponse\ \ getCertAuthProviderApiResponse = certificateAuthenticationProvidersApi.getCertAuthProviderById(GetCertAuthProviderByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getCertAuthProviderApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, CertificateAuthenticationProvidersApi } from\ \ \"@nutanix-api/iam-js-client\";\n\n// Configure the client\nlet apiClientInstance\ \ = new ApiClient();\n// IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host\ \ = 'localhost';\n// Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\napiClientInstance.port = '9440';\n\ // Max retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let certificateAuthenticationProvidersApi = new CertificateAuthenticationProvidersApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"cAC2b4e1-2bBe-D8f5-eBEa-Fb0B4ab4Ea01\"\ ;\n\n\n\n\n\n certificateAuthenticationProvidersApi.getCertAuthProviderById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n certificate_authentication_providers_api\ \ = ntnx_iam_py_client.CertificateAuthenticationProvidersApi(api_client=client)\n\ \ \n ext_id = \"55ECB5C7-aBa8-f503-a0dC-B94B9EC12Ead\"\n\n\n try:\n\ \ api_response = certificate_authentication_providers_api.get_cert_auth_provider_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/certificateauthenticationproviders\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n CertificateAuthenticationProvidersServiceApiInstance\ \ *api.CertificateAuthenticationProvidersServiceApi\n)\n\nfunc main() {\n\ \ ApiClientInstance = client.NewApiClient()\n // IPv4/IPv6 address\ \ or FQDN of the cluster\n ApiClientInstance.Host = \"localhost\"\n \ \ // Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n ApiClientInstance.Port = 9440\n //\ \ Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ CertificateAuthenticationProvidersServiceApiInstance = api.NewCertificateAuthenticationProvidersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"7BdFC5Fb-BbFb-3cB2-eFCa-DfbCEdec3db2\"\ \n\n\n request := certificateauthenticationproviders.GetCertAuthProviderByIdRequest{\ \ ExtId: &extId }\n response, error := CertificateAuthenticationProvidersServiceApiInstance.GetCertAuthProviderById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.CertAuthProvider)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/cert-auth-providers/1CBefFea-cCBA-b7aC-fD3A-8D44aF094b5B" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/cert-auth-providers/DdAFc289-d7b8-5ABD-3de5-eFa5fcc73E73" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n CertificateAuthenticationProvidersApi\ \ certificateAuthenticationProvidersApi = new CertificateAuthenticationProvidersApi(client);\n\ \n String extId = \"da6fbebd-Bb17-6deC-4aa9-b4AFa2BE3AAa\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetCertAuthProviderByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetCertAuthProviderApiResponse getCertAuthProviderApiResponse\ \ = certificateAuthenticationProvidersApi.GetCertAuthProviderById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - CertificateAuthenticationProviders summary: Update certificate-based authentication provider description: Updates a certificate-based authentication provider configuration. operationId: updateCertAuthProviderById parameters: - name: extId in: path description: UUID V5 created for the certificate-based authentication provider. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: b3ce05d9-87d5-4bb1-8491-e20da849cc32 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.CertAuthProvider' responses: "200": description: Updated certificate-based authentication provider. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.CertAuthProvider' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers/{extId}\ \ Put operation" x-permissions: operationName: Update Certificate Authentication deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 5 timeUnit: seconds - type: XLarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.CertificateAuthenticationProvidersApi;\n\ import com.nutanix.dp1.iam.iam.v4.request.CertificateAuthenticationProviders.UpdateCertAuthProviderByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.request.CertificateAuthenticationProviders.GetCertAuthProviderByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.iam.iam.v4.authn.CertAuthProvider;\n\ import com.nutanix.dp1.iam.iam.v4.authn.GetCertAuthProviderApiResponse;\n\ import com.nutanix.dp1.iam.iam.v4.authn.UpdateCertAuthProviderApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ CertificateAuthenticationProvidersApi certificateAuthenticationProvidersApi\ \ = new CertificateAuthenticationProvidersApi(apiClient);\n\n CertAuthProvider\ \ certAuthProvider = new CertAuthProvider();\n\n // CertAuthProvider\ \ object initializations here...\n \n String extId = \"CbfF74Ef-6aBd-cACF-c0Aa-AcD4c80eCCBA\"\ ;\n\n // perform GET call\n GetCertAuthProviderApiResponse\ \ getResponse = null;\n try {\n getResponse = certificateAuthenticationProvidersApi.getCertAuthProviderById(GetCertAuthProviderByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n UpdateCertAuthProviderApiResponse\ \ updateCertAuthProviderApiResponse = certificateAuthenticationProvidersApi.updateCertAuthProviderById(UpdateCertAuthProviderByIdRequest.builder()\n\ \ .extId(extId)\n .build(), opts);\n\n \ \ System.out.println(updateCertAuthProviderApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, CertificateAuthenticationProvidersApi, CertAuthProvider,\ \ GetCertAuthProviderApiResponse } from \"@nutanix-api/iam-js-client\";\n\ \n// Configure the client\nlet apiClientInstance = new ApiClient();\n//\ \ IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let certificateAuthenticationProvidersApi = new CertificateAuthenticationProvidersApi(apiClientInstance);\n\ \nfunction sample() {\n let certAuthProvider = new CertAuthProvider();\n\ \n // CertAuthProvider object initializations here...\n \n\n \n\ \ let extId = \"AAECBFe8-ECf2-DAea-9dee-cD1dfB7ea90a\";\n\n\n // Perform\ \ Get call\n certificateAuthenticationProvidersApi.getCertAuthProviderById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n certificateAuthenticationProvidersApi.updateCertAuthProviderById(extId,\ \ args).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n certificate_authentication_providers_api\ \ = ntnx_iam_py_client.CertificateAuthenticationProvidersApi(api_client=client)\n\ \ certAuthProvider = ntnx_iam_py_client.CertAuthProvider()\n\n # CertAuthProvider\ \ object initializations here...\n \n ext_id = \"db86eAFe-4c58-7E5E-EA03-6f97CaDf5ACc\"\ \n\n try:\n api_response = certificate_authentication_providers_api.get_cert_auth_provider_by_id(extId=ext_id)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_iam_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = certificate_authentication_providers_api.update_cert_auth_provider_by_id(extId=ext_id,\ \ if_match=etag_value)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/certificateauthenticationproviders\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n CertificateAuthenticationProvidersServiceApiInstance\ \ *api.CertificateAuthenticationProvidersServiceApi\n)\n\nfunc main() {\n\ \ ApiClientInstance = client.NewApiClient()\n // IPv4/IPv6 address\ \ or FQDN of the cluster\n ApiClientInstance.Host = \"localhost\"\n \ \ // Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n ApiClientInstance.Port = 9440\n //\ \ Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ CertificateAuthenticationProvidersServiceApiInstance = api.NewCertificateAuthenticationProvidersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n certAuthProvider := import1.NewCertAuthProvider()\n\ \n // CertAuthProvider object initializations here...\n\n \n extId\ \ := \"Edd78D8d-dCDA-aE9D-12ad-bFdf5CADf5ef\"\n\n getRequest := certificateauthenticationproviders.GetCertAuthProviderByIdRequest{\ \ extId: &extId }\n getResponse, err := CertificateAuthenticationProvidersServiceApiInstance.GetCertAuthProviderById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := certificateauthenticationproviders.UpdateCertAuthProviderByIdRequest{\ \ ExtId: &extId }\n response, error := CertificateAuthenticationProvidersServiceApiInstance.UpdateCertAuthProviderById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.CertAuthProvider)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/iam/v4.1.b2/authn/cert-auth-providers/32aBCBae-4BFC-3F7D-5aC5-Bd92E4308FF1" \ --header 'Accept: application/json' \ --header 'Content-Type: multipart/form-data' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data_binary @SOME_BINARY_DATA \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: multipart/form-data' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --post-file @SOME_BINARY_DATA \ - "https://host:port/api/iam/v4.1.b2/authn/cert-auth-providers/6beAEC2f-938c-D1B1-3b4A-c4fc3c85e0af" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n CertificateAuthenticationProvidersApi\ \ certificateAuthenticationProvidersApi = new CertificateAuthenticationProvidersApi(client);\n\ \n CertAuthProvider certAuthProvider = new CertAuthProvider();\n\n\ \ // CertAuthProvider object initializations here...\n\n String\ \ extId = \"F3cFdDfE-ea2D-6DeC-66ba-8F8a2956d1aC\";\n\n // perform\ \ GET call\n var getRequest = new GetCertAuthProviderByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetCertAuthProviderApiResponse\ \ getResponse = certificateAuthenticationProvidersApi.GetCertAuthProviderById(getRequest);\n\ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateCertAuthProviderByIdRequest {\n ExtId =\ \ extId,\n \n \n };\n try {\n \ \ UpdateCertAuthProviderApiResponse updateCertAuthProviderApiResponse\ \ = certificateAuthenticationProvidersApi.UpdateCertAuthProviderById(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - CertificateAuthenticationProviders summary: Delete certificate-based authentication provider description: Deletes a certificate-based authentication provider configuration for the given UUID. operationId: deleteCertAuthProviderById parameters: - name: extId in: path description: UUID V5 created for the certificate-based authentication provider. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7408a9f7-3bf1-4960-9ebe-16d38613d2a0 - name: If-Match in: header description: | The If-Match request header makes the request conditional. When not provided the server will respond with an HTTP 428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP 412 (Precondition Failed) response required: true style: simple explode: false schema: type: string example: string responses: "204": description: Certificate-based authentication provider deleted. content: application/json: {} "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers/{extId}\ \ Delete operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers/{extId}\ \ Delete operation" x-permissions: operationName: Delete Certificate Authentication deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" /iam/v4.1.b2/authz/clients/{extId}: get: tags: - Clients summary: Get client description: Fetches a registered client information. operationId: getRegisteredClientById parameters: - name: extId in: path description: External identifier of the client. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: fc2cd804-911f-42d5-b730-f8cd6310ef20 responses: "200": description: Returns the registered client information. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authz.Client' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/clients/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/clients/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/clients/{extId}\ \ Get operation" x-permissions: operationName: View Client deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 5 timeUnit: seconds - type: XLarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.ClientsApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Clients.GetRegisteredClientByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authz.GetClientApiResponse;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ ClientsApi clientsApi = new ClientsApi(apiClient);\n\n \n \ \ String extId = \"fbe6CDd7-0e39-EEbE-5Bea-BEeFB8eAB734\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n GetClientApiResponse\ \ getClientApiResponse = clientsApi.getRegisteredClientById(GetRegisteredClientByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getClientApiResponse.toString());\n\n } catch\ \ (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, ClientsApi } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let clientsApi = new ClientsApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"487ae51C-BEA0-32af-cB38-0ecEC5F0b5A5\";\n\ \n\n\n\n\n clientsApi.getRegisteredClientById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n clients_api\ \ = ntnx_iam_py_client.ClientsApi(api_client=client)\n \n ext_id =\ \ \"DDEDF68A-4c5d-0bFC-0499-cEBeeFDA7Ec9\"\n\n\n try:\n api_response\ \ = clients_api.get_registered_client_by_id(extId=ext_id)\n print(api_response)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/clients\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authz\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n ClientsServiceApiInstance\ \ *api.ClientsServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ ClientsServiceApiInstance = api.NewClientsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"F0eb48Eb-abA8-4AE0-CEFa-fbBBFB14ee9d\"\ \n\n\n request := clients.GetRegisteredClientByIdRequest{ ExtId: &extId\ \ }\n response, error := ClientsServiceApiInstance.GetRegisteredClientById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.Client)\n \ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authz/clients/d9dd0CCe-ee8c-5bC4-ABa2-dBBa064fdf30" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authz/clients/FE2Df93C-3d78-2d3d-B591-fDeBa4EEa6cb" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authz;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n ClientsApi clientsApi\ \ = new ClientsApi(client);\n\n String extId = \"Abe09CCb-BC14-bAa4-A4Ea-DCA6aa3C6b02\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetRegisteredClientByIdRequest {\n ExtId = extId\n \ \ };\n try {\n GetClientApiResponse getClientApiResponse\ \ = clientsApi.GetRegisteredClientById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /iam/v4.1.b2/authn/directory-services: get: tags: - DirectoryServices summary: List directory services description: Lists all directory service(s). operationId: listDirectoryServices parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$filter=createdBy\ \ eq '390b7801-7a80-5c94-8a07-8de63651b27b'" - name: domainName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$filter=domainName\ \ eq 'domain1.com'" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$filter=extId\ \ eq 'a0469b2b-6bc3-4d9a-ad5f-9f7529b07a77'" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$filter=name\ \ eq 'AD1'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$orderby=createdTime" - name: domainName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$orderby=domainName" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$orderby=lastUpdatedTime" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$orderby=name" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$select=createdBy" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$select=createdTime" - name: directoryType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$select=directoryType" - name: domainName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$select=domainName" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$select=extId" - name: groupSearchType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$select=groupSearchType" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$select=lastUpdatedTime" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$select=name" - name: openLdapConfiguration example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$select=openLdapConfiguration" - name: serviceAccount example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$select=serviceAccount" - name: tenantId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$select=tenantId" - name: url example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$select=url" - name: whiteListedGroups example: "https://{host}:{port}/api/iam/v4.1.b2/authn/directory-services?$select=whiteListedGroups" responses: "200": description: Returned list of directory service(s). content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryService' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services Get operation x-permissions: operationName: View Directory Service deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Flow Admin - name: Flow Viewer - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 15 timeUnit: seconds - type: Small count: 15 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.DirectoryServicesApi;\nimport com.nutanix.dp1.iam.iam.v4.request.DirectoryServices.ListDirectoryServicesRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.ListDirectoryServicesApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ DirectoryServicesApi directoryServicesApi = new DirectoryServicesApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListDirectoryServicesApiResponse\ \ listDirectoryServicesApiResponse = directoryServicesApi.listDirectoryServices(ListDirectoryServicesRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listDirectoryServicesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, DirectoryServicesApi } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let directoryServicesApi = new DirectoryServicesApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$select"] = "string_sample_data"; directoryServicesApi.listDirectoryServices(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n directory_services_api\ \ = ntnx_iam_py_client.DirectoryServicesApi(api_client=client)\n \n \ \ page = 0\n \n limit = 50\n\n\n try:\n api_response =\ \ directory_services_api.list_directory_services(_page=page, _limit=limit)\n\ \ print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/directoryservices\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n DirectoryServicesServiceApiInstance\ \ *api.DirectoryServicesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ DirectoryServicesServiceApiInstance = api.NewDirectoryServicesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := directoryservices.ListDirectoryServicesRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil, Select_:\ \ nil }\n response, error := DirectoryServicesServiceApiInstance.ListDirectoryServices(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.DirectoryService)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/directory-services?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/directory-services?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n DirectoryServicesApi\ \ directoryServicesApi = new DirectoryServicesApi(client);\n\n int\ \ page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String select =\ \ \"string_sample_data\";\n\n // Create request object with parameters\n\ \ var request = new ListDirectoryServicesRequest {\n Page\ \ = page,\n Limit = limit,\n Filter = filter,\n \ \ Orderby = orderby,\n Select = select\n };\n\ \ try {\n ListDirectoryServicesApiResponse listDirectoryServicesApiResponse\ \ = directoryServicesApi.ListDirectoryServices(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" post: tags: - DirectoryServices summary: Create directory service description: Creates a directory service. operationId: createDirectoryService requestBody: description: Creates a directory service. content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryService' required: true responses: "201": description: Directory service created. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryService' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services Post operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services Post operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services Post operation x-permissions: operationName: Create Directory Service deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.iam.java.client.ApiClient; import com.nutanix.iam.java.client.api.DirectoryServicesApi; import com.nutanix.dp1.iam.iam.v4.request.DirectoryServices.CreateDirectoryServiceRequest; import com.nutanix.dp1.iam.iam.v4.authn.DirectoryService; import com.nutanix.dp1.iam.iam.v4.authn.CreateDirectoryServiceApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. DirectoryServicesApi directoryServicesApi = new DirectoryServicesApi(apiClient); DirectoryService directoryService = new DirectoryService(); // DirectoryService object initializations here... try { // Pass in parameters using the request builder object associated with the operation. CreateDirectoryServiceApiResponse createDirectoryServiceApiResponse = directoryServicesApi.createDirectoryService(CreateDirectoryServiceRequest.builder() .build(), directoryService); System.out.println(createDirectoryServiceApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, DirectoryServicesApi, DirectoryService } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let directoryServicesApi = new DirectoryServicesApi(apiClientInstance); function sample() { let directoryService = new DirectoryService(); // DirectoryService object initializations here... directoryService = JSON.stringify(directoryService); directoryServicesApi.createDirectoryService(directoryService).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_iam_py_client if __name__ == "__main__": # Configure the client config = ntnx_iam_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_iam_py_client.ApiClient(configuration=config) directory_services_api = ntnx_iam_py_client.DirectoryServicesApi(api_client=client) directoryService = ntnx_iam_py_client.DirectoryService() # DirectoryService object initializations here... try: api_response = directory_services_api.create_directory_service(body=directoryService) print(api_response) except ntnx_iam_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/directoryservices" import1 "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn" ) var ( ApiClientInstance *client.ApiClient DirectoryServicesServiceApiInstance *api.DirectoryServicesServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. DirectoryServicesServiceApiInstance = api.NewDirectoryServicesServiceApi(ApiClientInstance) ctx := context.Background() directoryService := import1.NewDirectoryService() // DirectoryService object initializations here... request := directoryservices.CreateDirectoryServiceRequest{ Body: directoryService } response, error := DirectoryServicesServiceApiInstance.CreateDirectoryService(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import1.DirectoryService) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authn/directory-services" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"name":"AD1","url":"ldap://{{host_name}}","secondaryUrls":["ldap://{{secondary_host_name}}"],"domainName":"domain1.com","directoryType":"$UNKNOWN","serviceAccount":{"username":"Administrator@domain1.com","password":"Pa*******rd","$objectType":"iam.v4.authn.DsServiceAccount"},"openLdapConfiguration":{"userConfiguration":{"userObjectClass":"inetOrgPerson","userSearchBase":"ou=ldap_search_ou,dc=domain1,dc=com","usernameAttribute":"uid","$objectType":"iam.v4.authn.UserConfiguration"},"userGroupConfiguration":{"groupObjectClass":"posixGroup","groupSearchBase":"ou=ldap_search_ou,dc=domain1,dc=com","groupMemberAttribute":"memberUid","groupMemberAttributeValue":"uid","$objectType":"iam.v4.authn.UserGroupConfiguration"},"$objectType":"iam.v4.authn.OpenLdapConfig"},"groupSearchType":"$UNKNOWN","whiteListedGroups":["cn=group1"],"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","$objectType":"iam.v4.authn.DirectoryService"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"name":"AD1","url":"ldap://{{host_name}}","secondaryUrls":["ldap://{{secondary_host_name}}"],"domainName":"domain1.com","directoryType":"$UNKNOWN","serviceAccount":{"username":"Administrator@domain1.com","password":"Pa*******rd","$objectType":"iam.v4.authn.DsServiceAccount"},"openLdapConfiguration":{"userConfiguration":{"userObjectClass":"inetOrgPerson","userSearchBase":"ou=ldap_search_ou,dc=domain1,dc=com","usernameAttribute":"uid","$objectType":"iam.v4.authn.UserConfiguration"},"userGroupConfiguration":{"groupObjectClass":"posixGroup","groupSearchBase":"ou=ldap_search_ou,dc=domain1,dc=com","groupMemberAttribute":"memberUid","groupMemberAttributeValue":"uid","$objectType":"iam.v4.authn.UserGroupConfiguration"},"$objectType":"iam.v4.authn.OpenLdapConfig"},"groupSearchType":"$UNKNOWN","whiteListedGroups":["cn=group1"],"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","$objectType":"iam.v4.authn.DirectoryService"} \ - "https://host:port/api/iam/v4.1.b2/authn/directory-services" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n DirectoryServicesApi\ \ directoryServicesApi = new DirectoryServicesApi(client);\n\n DirectoryService\ \ directoryService = new DirectoryService();\n\n // DirectoryService\ \ object initializations here...\n\n\n // Create request object with\ \ parameters\n var request = new CreateDirectoryServiceRequest {\n\ \ Body = directoryService\n };\n try {\n \ \ CreateDirectoryServiceApiResponse createDirectoryServiceApiResponse\ \ = directoryServicesApi.CreateDirectoryService(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /iam/v4.1.b2/authn/directory-services/{extId}: get: tags: - DirectoryServices summary: Get directory service description: Fetches a directory service. operationId: getDirectoryServiceById parameters: - name: extId in: path description: External identifier of the directory service. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 89212687-df94-4ad4-8998-3e65caf7f967 responses: "200": description: Returns directory service. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryService' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}\ \ Get operation" x-permissions: operationName: View Directory Service deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Flow Admin - name: Flow Viewer - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.DirectoryServicesApi;\nimport com.nutanix.dp1.iam.iam.v4.request.DirectoryServices.GetDirectoryServiceByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.GetDirectoryServiceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ DirectoryServicesApi directoryServicesApi = new DirectoryServicesApi(apiClient);\n\ \n \n String extId = \"81eBCF8E-6B61-f11d-CaED-fF1fd2fb6ba0\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetDirectoryServiceApiResponse\ \ getDirectoryServiceApiResponse = directoryServicesApi.getDirectoryServiceById(GetDirectoryServiceByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getDirectoryServiceApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, DirectoryServicesApi } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let directoryServicesApi = new DirectoryServicesApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"dAcFCFCF-5F6B-bC7D-78dA-7bcB0AF37Ee5\"\ ;\n\n\n\n\n\n directoryServicesApi.getDirectoryServiceById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n directory_services_api\ \ = ntnx_iam_py_client.DirectoryServicesApi(api_client=client)\n \n \ \ ext_id = \"Cd2f3Ba9-0ede-eebA-1f74-DCEc80EdFeBF\"\n\n\n try:\n \ \ api_response = directory_services_api.get_directory_service_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/directoryservices\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n DirectoryServicesServiceApiInstance\ \ *api.DirectoryServicesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ DirectoryServicesServiceApiInstance = api.NewDirectoryServicesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"dCbfB240-fd99-A8d7-fBDC-fAFCED5921cF\"\ \n\n\n request := directoryservices.GetDirectoryServiceByIdRequest{ ExtId:\ \ &extId }\n response, error := DirectoryServicesServiceApiInstance.GetDirectoryServiceById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.DirectoryService)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/directory-services/BaDcFF68-ECDc-4fCf-9da1-6e6DDCfFeB6B" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/directory-services/25BB8CcB-eC4D-7DeF-b83e-Ebdf4A157C03" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n DirectoryServicesApi\ \ directoryServicesApi = new DirectoryServicesApi(client);\n\n String\ \ extId = \"cb30feEb-712c-eec5-C666-36fdC26d8EaC\";\n\n // Create\ \ request object with parameters\n var request = new GetDirectoryServiceByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetDirectoryServiceApiResponse\ \ getDirectoryServiceApiResponse = directoryServicesApi.GetDirectoryServiceById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - DirectoryServices summary: Update directory service description: Updates a directory service. operationId: updateDirectoryServiceById parameters: - name: extId in: path description: External identifier of the directory service. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 17382f00-73a5-42c6-a4e1-069596dee6bf - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string requestBody: description: Updates a directory service. content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryService' required: true responses: "200": description: Directory service updated. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryService' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}\ \ Put operation" x-permissions: operationName: Update Directory Service deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.DirectoryServicesApi;\nimport com.nutanix.dp1.iam.iam.v4.request.DirectoryServices.UpdateDirectoryServiceByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.request.DirectoryServices.GetDirectoryServiceByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.iam.iam.v4.authn.DirectoryService;\n\ import com.nutanix.dp1.iam.iam.v4.authn.GetDirectoryServiceApiResponse;\n\ import com.nutanix.dp1.iam.iam.v4.authn.UpdateDirectoryServiceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ DirectoryServicesApi directoryServicesApi = new DirectoryServicesApi(apiClient);\n\ \n DirectoryService directoryService = new DirectoryService();\n\n\ \ // DirectoryService object initializations here...\n \n\ \ String extId = \"fa2BE5AC-BB88-f79F-EbAE-FC6d601DA7Cd\";\n\n \ \ // perform GET call\n GetDirectoryServiceApiResponse getResponse\ \ = null;\n try {\n getResponse = directoryServicesApi.getDirectoryServiceById(GetDirectoryServiceByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n UpdateDirectoryServiceApiResponse\ \ updateDirectoryServiceApiResponse = directoryServicesApi.updateDirectoryServiceById(UpdateDirectoryServiceByIdRequest.builder()\n\ \ .extId(extId)\n .build(), directoryService,\ \ opts);\n\n System.out.println(updateDirectoryServiceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, DirectoryServicesApi, DirectoryService, GetDirectoryServiceApiResponse\ \ } from \"@nutanix-api/iam-js-client\";\n\n// Configure the client\nlet\ \ apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let directoryServicesApi = new DirectoryServicesApi(apiClientInstance);\n\ \nfunction sample() {\n let directoryService = new DirectoryService();\n\ \n // DirectoryService object initializations here...\n directoryService\ \ = JSON.stringify(directoryService);\n\n \n let extId = \"EadcA58B-DeCe-fAb9-0aBb-2A8BFA22D2C7\"\ ;\n\n\n // Perform Get call\n directoryServicesApi.getDirectoryServiceById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n directoryServicesApi.updateDirectoryServiceById(extId,\ \ directoryService, args).then(({data, response}) => {\n console.log(`API\ \ returned the following status code: ${response.status}`);\n \ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n directory_services_api\ \ = ntnx_iam_py_client.DirectoryServicesApi(api_client=client)\n directoryService\ \ = ntnx_iam_py_client.DirectoryService()\n\n # DirectoryService object\ \ initializations here...\n \n ext_id = \"EBF92C01-8A0C-bC4A-cEBc-5defc5ddCC8C\"\ \n\n try:\n api_response = directory_services_api.get_directory_service_by_id(extId=ext_id)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_iam_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = directory_services_api.update_directory_service_by_id(extId=ext_id,\ \ body=directoryService, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/directoryservices\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n DirectoryServicesServiceApiInstance\ \ *api.DirectoryServicesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ DirectoryServicesServiceApiInstance = api.NewDirectoryServicesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n directoryService := import1.NewDirectoryService()\n\ \n // DirectoryService object initializations here...\n\n \n extId\ \ := \"dEb706cb-D4EF-2fDb-cceB-cabEfBeDeC7A\"\n\n getRequest := directoryservices.GetDirectoryServiceByIdRequest{\ \ extId: &extId }\n getResponse, err := DirectoryServicesServiceApiInstance.GetDirectoryServiceById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := directoryservices.UpdateDirectoryServiceByIdRequest{ ExtId:\ \ &extId, Body: directoryService }\n response, error := DirectoryServicesServiceApiInstance.UpdateDirectoryServiceById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.DirectoryService)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/iam/v4.1.b2/authn/directory-services/ABd342eA-BE8B-A85e-e6f4-FcbDeAdA67fE" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"name":"AD1","url":"ldap://{{host_name}}","secondaryUrls":["ldap://{{secondary_host_name}}"],"domainName":"domain1.com","directoryType":"$UNKNOWN","serviceAccount":{"username":"Administrator@domain1.com","password":"Pa*******rd","$objectType":"iam.v4.authn.DsServiceAccount"},"openLdapConfiguration":{"userConfiguration":{"userObjectClass":"inetOrgPerson","userSearchBase":"ou=ldap_search_ou,dc=domain1,dc=com","usernameAttribute":"uid","$objectType":"iam.v4.authn.UserConfiguration"},"userGroupConfiguration":{"groupObjectClass":"posixGroup","groupSearchBase":"ou=ldap_search_ou,dc=domain1,dc=com","groupMemberAttribute":"memberUid","groupMemberAttributeValue":"uid","$objectType":"iam.v4.authn.UserGroupConfiguration"},"$objectType":"iam.v4.authn.OpenLdapConfig"},"groupSearchType":"$UNKNOWN","whiteListedGroups":["cn=group1"],"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","$objectType":"iam.v4.authn.DirectoryService"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"name":"AD1","url":"ldap://{{host_name}}","secondaryUrls":["ldap://{{secondary_host_name}}"],"domainName":"domain1.com","directoryType":"$UNKNOWN","serviceAccount":{"username":"Administrator@domain1.com","password":"Pa*******rd","$objectType":"iam.v4.authn.DsServiceAccount"},"openLdapConfiguration":{"userConfiguration":{"userObjectClass":"inetOrgPerson","userSearchBase":"ou=ldap_search_ou,dc=domain1,dc=com","usernameAttribute":"uid","$objectType":"iam.v4.authn.UserConfiguration"},"userGroupConfiguration":{"groupObjectClass":"posixGroup","groupSearchBase":"ou=ldap_search_ou,dc=domain1,dc=com","groupMemberAttribute":"memberUid","groupMemberAttributeValue":"uid","$objectType":"iam.v4.authn.UserGroupConfiguration"},"$objectType":"iam.v4.authn.OpenLdapConfig"},"groupSearchType":"$UNKNOWN","whiteListedGroups":["cn=group1"],"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","$objectType":"iam.v4.authn.DirectoryService"} \ - "https://host:port/api/iam/v4.1.b2/authn/directory-services/CfdD5D22-F59b-E0da-C40e-bF2fd4bA1ef8" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n DirectoryServicesApi\ \ directoryServicesApi = new DirectoryServicesApi(client);\n\n DirectoryService\ \ directoryService = new DirectoryService();\n\n // DirectoryService\ \ object initializations here...\n\n String extId = \"F5369C61-abCb-DEaA-AbD2-B7BD47edc6fB\"\ ;\n\n // perform GET call\n var getRequest = new GetDirectoryServiceByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetDirectoryServiceApiResponse\ \ getResponse = directoryServicesApi.GetDirectoryServiceById(getRequest);\n\ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateDirectoryServiceByIdRequest {\n ExtId =\ \ extId,\n Body = directoryService,\n \n \ \ \n };\n try {\n UpdateDirectoryServiceApiResponse\ \ updateDirectoryServiceApiResponse = directoryServicesApi.UpdateDirectoryServiceById(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - DirectoryServices summary: Delete directory service description: Deletes a directory service. operationId: deleteDirectoryServiceById parameters: - name: extId in: path description: External identifier of the directory service. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 6c7b3b24-5c09-43ce-82cb-f77c717a7469 - name: If-Match in: header description: | The If-Match request header makes the request conditional. When not provided the server will respond with an HTTP 428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP 412 (Precondition Failed) response required: true style: simple explode: false schema: type: string example: string responses: "204": description: Directory service deleted. content: application/json: {} "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}\ \ Delete operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}\ \ Delete operation" x-permissions: operationName: Delete Directory Service deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" /iam/v4.1.b2/authn/directory-services/{extId}/$actions/search: post: tags: - DirectoryServices summary: Search user/group in directory service description: Searches a user or group in the directory service through its external identifier. operationId: searchDirectoryService parameters: - name: extId in: path description: External identifier of the directory service. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 5b24da6d-3b59-490d-bc76-8eb3347691cd requestBody: description: Searches a user or group in the directory service through its external identifier. content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryServiceSearchQuery' required: true responses: "200": description: Returns the requested user or group in the directory service. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryServiceSearchResult' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}/$actions/search\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}/$actions/search\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}/$actions/search\ \ Post operation" x-permissions: operationName: Search Directory Service deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Project Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Flow Admin - name: Flow Viewer - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.DirectoryServicesApi;\nimport com.nutanix.dp1.iam.iam.v4.request.DirectoryServices.SearchDirectoryServiceRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.DirectoryServiceSearchQuery;\nimport\ \ com.nutanix.dp1.iam.iam.v4.authn.SearchDirectoryServiceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ DirectoryServicesApi directoryServicesApi = new DirectoryServicesApi(apiClient);\n\ \n DirectoryServiceSearchQuery directoryServiceSearchQuery = new\ \ DirectoryServiceSearchQuery();\n\n // DirectoryServiceSearchQuery\ \ object initializations here...\n directoryServiceSearchQuery.setQuery(\"\ user\"); // required field\n \n String extId = \"a675F1fD-3a3C-8AAc-bbF2-aEc8b2FDeB02\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n SearchDirectoryServiceApiResponse\ \ searchDirectoryServiceApiResponse = directoryServicesApi.searchDirectoryService(SearchDirectoryServiceRequest.builder()\n\ \ .extId(extId)\n .build(), directoryServiceSearchQuery);\n\ \n System.out.println(searchDirectoryServiceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, DirectoryServicesApi, DirectoryServiceSearchQuery\ \ } from \"@nutanix-api/iam-js-client\";\n\n// Configure the client\nlet\ \ apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let directoryServicesApi = new DirectoryServicesApi(apiClientInstance);\n\ \nfunction sample() {\n let directoryServiceSearchQuery = new DirectoryServiceSearchQuery();\n\ \n // DirectoryServiceSearchQuery object initializations here...\n \ \ directoryServiceSearchQuery.setQuery(\"user\"); // required field\n\ \ directoryServiceSearchQuery = JSON.stringify(directoryServiceSearchQuery);\n\ \n \n let extId = \"bEd7afE4-CB59-2eae-B994-D21EAFbA24FE\";\n\n\n\n\ \n\n directoryServicesApi.searchDirectoryService(extId, directoryServiceSearchQuery).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n directory_services_api\ \ = ntnx_iam_py_client.DirectoryServicesApi(api_client=client)\n directoryServiceSearchQuery\ \ = ntnx_iam_py_client.DirectoryServiceSearchQuery()\n\n # DirectoryServiceSearchQuery\ \ object initializations here...\n directoryServiceSearchQuery.query\ \ = \"user\" # required field\n \n ext_id = \"8B34C4fA-eEDB-ceeB-8dB6-EC2de1dEb052\"\ \n\n\n try:\n api_response = directory_services_api.search_directory_service(extId=ext_id,\ \ body=directoryServiceSearchQuery)\n print(api_response)\n except\ \ ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/directoryservices\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n DirectoryServicesServiceApiInstance\ \ *api.DirectoryServicesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ DirectoryServicesServiceApiInstance = api.NewDirectoryServicesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n directoryServiceSearchQuery := import1.NewDirectoryServiceSearchQuery()\n\ \n // DirectoryServiceSearchQuery object initializations here...\n\n\ \ \n extId := \"CDE7eada-6F7e-4eC5-aeFA-ce938deFf3A7\"\n\n\n request\ \ := directoryservices.SearchDirectoryServiceRequest{ ExtId: &extId, Body:\ \ directoryServiceSearchQuery }\n response, error := DirectoryServicesServiceApiInstance.SearchDirectoryService(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.DirectoryServiceSearchResult)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authn/directory-services/7Cc053e8-751c-e72A-aac7-91b2D71B8dEF/$actions/search" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"query":"user","searchedAttributes":["userPrincipalName"],"returnedAttributes":["memberOf"],"isWildcardSearch":true,"$objectType":"iam.v4.authn.DirectoryServiceSearchQuery"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"query":"user","searchedAttributes":["userPrincipalName"],"returnedAttributes":["memberOf"],"isWildcardSearch":true,"$objectType":"iam.v4.authn.DirectoryServiceSearchQuery"} \ - "https://host:port/api/iam/v4.1.b2/authn/directory-services/2feE21e9-Be5a-Cbd6-A1Eb-c12cAdFc0Bea/$actions/search" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n DirectoryServicesApi\ \ directoryServicesApi = new DirectoryServicesApi(client);\n\n DirectoryServiceSearchQuery\ \ directoryServiceSearchQuery = new DirectoryServiceSearchQuery();\n\n \ \ // DirectoryServiceSearchQuery object initializations here...\n \ \ directoryServiceSearchQuery.Query = \"user\"; // required field\n\n\ \ String extId = \"be1BBB87-4dbF-C8d5-a3A0-DaCCBCDFD4eb\";\n\n \ \ // Create request object with parameters\n var request = new\ \ SearchDirectoryServiceRequest {\n ExtId = extId,\n \ \ Body = directoryServiceSearchQuery\n };\n try {\n \ \ SearchDirectoryServiceApiResponse searchDirectoryServiceApiResponse\ \ = directoryServicesApi.SearchDirectoryService(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /iam/v4.1.b2/authn/directory-services/{extId}/$actions/verify-connection-status: post: tags: - DirectoryServices summary: Check directory service connection description: Checks the connection to the directory service. operationId: connectionStatusDirectoryService parameters: - name: extId in: path description: External identifier of the directory service. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 1f704628-0d66-427f-a123-a5716179c3a7 requestBody: description: Checks the connection to the directory service. content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryServiceConnectionRequest' required: true responses: "200": description: Returns the checked connection to the directory service. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryServiceConnectionResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}/$actions/verify-connection-status\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}/$actions/verify-connection-status\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}/$actions/verify-connection-status\ \ Post operation" x-permissions: operationName: View Directory Service Connection Status deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.DirectoryServicesApi;\nimport com.nutanix.dp1.iam.iam.v4.request.DirectoryServices.ConnectionStatusDirectoryServiceRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.DirectoryServiceConnectionRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.ConnectionDirectoryServiceApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ DirectoryServicesApi directoryServicesApi = new DirectoryServicesApi(apiClient);\n\ \n DirectoryServiceConnectionRequest directoryServiceConnectionRequest\ \ = new DirectoryServiceConnectionRequest();\n\n // DirectoryServiceConnectionRequest\ \ object initializations here...\n directoryServiceConnectionRequest.setPassword(\"\ string_sample_data\"); // required field\n directoryServiceConnectionRequest.setUsername(\"\ string_sample_data\"); // required field\n \n String extId\ \ = \"5F8beCd9-bfCC-EDFd-Bce9-AAAB72Cbd5C4\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n ConnectionDirectoryServiceApiResponse\ \ connectionDirectoryServiceApiResponse = directoryServicesApi.connectionStatusDirectoryService(ConnectionStatusDirectoryServiceRequest.builder()\n\ \ .extId(extId)\n .build(), directoryServiceConnectionRequest);\n\ \n System.out.println(connectionDirectoryServiceApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, DirectoryServicesApi, DirectoryServiceConnectionRequest\ \ } from \"@nutanix-api/iam-js-client\";\n\n// Configure the client\nlet\ \ apiClientInstance = new ApiClient();\n// IPv4/IPv6 address or FQDN of\ \ the cluster\napiClientInstance.host = 'localhost';\n// Port used for the\ \ connection. PC products typically use port 9440, while NC products typically\ \ use port 443. See the product-specific documentation for accurate configuration.\n\ apiClientInstance.port = '9440';\n// Max retry attempts while reconnecting\ \ on a loss of connection\napiClientInstance.maxRetryAttempts = 5;\n// Interval\ \ in ms to use during retry attempts\napiClientInstance.retryInterval =\ \ 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let directoryServicesApi = new DirectoryServicesApi(apiClientInstance);\n\ \nfunction sample() {\n let directoryServiceConnectionRequest = new DirectoryServiceConnectionRequest();\n\ \n // DirectoryServiceConnectionRequest object initializations here...\n\ \ directoryServiceConnectionRequest.setPassword(\"string_sample_data\"\ ); // required field\n directoryServiceConnectionRequest.setUsername(\"\ string_sample_data\"); // required field\n directoryServiceConnectionRequest\ \ = JSON.stringify(directoryServiceConnectionRequest);\n\n \n let\ \ extId = \"A5df2cBc-c0Cf-eE1F-c72e-3eeBfdAcBEFD\";\n\n\n\n\n\n directoryServicesApi.connectionStatusDirectoryService(extId,\ \ directoryServiceConnectionRequest).then(({data, response}) => {\n \ \ console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n directory_services_api\ \ = ntnx_iam_py_client.DirectoryServicesApi(api_client=client)\n directoryServiceConnectionRequest\ \ = ntnx_iam_py_client.DirectoryServiceConnectionRequest()\n\n # DirectoryServiceConnectionRequest\ \ object initializations here...\n directoryServiceConnectionRequest.password\ \ = \"string_sample_data\" # required field\n directoryServiceConnectionRequest.username\ \ = \"string_sample_data\" # required field\n \n ext_id = \"dCC5E16c-ceb4-9beC-d03a-fBDBabBeB2DD\"\ \n\n\n try:\n api_response = directory_services_api.connection_status_directory_service(extId=ext_id,\ \ body=directoryServiceConnectionRequest)\n print(api_response)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/directoryservices\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n DirectoryServicesServiceApiInstance\ \ *api.DirectoryServicesServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ DirectoryServicesServiceApiInstance = api.NewDirectoryServicesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n directoryServiceConnectionRequest\ \ := import1.NewDirectoryServiceConnectionRequest()\n\n // DirectoryServiceConnectionRequest\ \ object initializations here...\n\n \n extId := \"db7BC7A1-B9ab-F72f-40fF-EEdD70ddD7a2\"\ \n\n\n request := directoryservices.ConnectionStatusDirectoryServiceRequest{\ \ ExtId: &extId, Body: directoryServiceConnectionRequest }\n response,\ \ error := DirectoryServicesServiceApiInstance.ConnectionStatusDirectoryService(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.DirectoryServiceConnectionResponse)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authn/directory-services/3ea3f0fd-dC77-5ac8-8EeB-4AA0EBbdfdcc/$actions/verify-connection-status" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"username":"string","password":"string","$objectType":"iam.v4.authn.DirectoryServiceConnectionRequest"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"username":"string","password":"string","$objectType":"iam.v4.authn.DirectoryServiceConnectionRequest"} \ - "https://host:port/api/iam/v4.1.b2/authn/directory-services/beD70d70-2cdF-64F8-7e8A-F21fEd5bbeF1/$actions/verify-connection-status" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n DirectoryServicesApi\ \ directoryServicesApi = new DirectoryServicesApi(client);\n\n DirectoryServiceConnectionRequest\ \ directoryServiceConnectionRequest = new DirectoryServiceConnectionRequest();\n\ \n // DirectoryServiceConnectionRequest object initializations here...\n\ \ directoryServiceConnectionRequest.Password = \"string_sample_data\"\ ; // required field\n directoryServiceConnectionRequest.Username =\ \ \"string_sample_data\"; // required field\n\n String extId = \"\ 8BcfDFCe-cefB-100E-2B0b-f33BbB3ccBD3\";\n\n // Create request object\ \ with parameters\n var request = new ConnectionStatusDirectoryServiceRequest\ \ {\n ExtId = extId,\n Body = directoryServiceConnectionRequest\n\ \ };\n try {\n ConnectionDirectoryServiceApiResponse\ \ connectionDirectoryServiceApiResponse = directoryServicesApi.ConnectionStatusDirectoryService(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /iam/v4.1.b2/authz/entities: get: tags: - Entities summary: List entities description: Fetches a list of all the entities. operationId: listEntities parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$filter=createdBy\ \ eq '390b7801-7a80-5c94-8a07-8de63651b27b'" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$filter=createdTime\ \ eq '2009-09-23T14:30:00-07:00'" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$filter=displayName\ \ eq 'Role'" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$filter=extId\ \ eq 'a0469b2b-6bc3-4d9a-ad5f-9f7529b07a77'" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$filter=lastUpdatedTime\ \ eq '2009-09-23T14:30:00-07:00'" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$filter=name\ \ eq 'role'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$orderby=createdTime" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$orderby=displayName" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$orderby=extId" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$orderby=lastUpdatedTime" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$orderby=name" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clientName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$select=clientName" - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$select=createdBy" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$select=createdTime" - name: description example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$select=description" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$select=displayName" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$select=extId" - name: isLogicalAndSupportedForAttributes example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$select=isLogicalAndSupportedForAttributes" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$select=lastUpdatedTime" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authz/entities?$select=name" responses: "200": description: Returns a list of entities. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authz.Entity' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/entities Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/entities Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/entities Get operation x-permissions: operationName: View Entity deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.EntitiesApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Entities.ListEntitiesRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authz.ListEntitiesApiResponse;\nimport\ \ org.springframework.web.client.RestClientException;\n\npublic class JavaSdkSample\ \ {\n public static void main(String[] args) {\n // Configure\ \ the client\n ApiClient apiClient = new ApiClient();\n //\ \ IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ EntitiesApi entitiesApi = new EntitiesApi(apiClient);\n\n \n\ \ int page = 0;\n \n int limit = 50;\n\n try\ \ {\n // Pass in parameters using the request builder object\ \ associated with the operation.\n ListEntitiesApiResponse listEntitiesApiResponse\ \ = entitiesApi.listEntities(ListEntitiesRequest.builder()\n \ \ .$page(page)\n .$limit(limit)\n .$filter(null)\n\ \ .$orderby(null)\n .$select(null)\n \ \ .build());\n\n System.out.println(listEntitiesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, EntitiesApi } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let entitiesApi = new EntitiesApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$select"] = "string_sample_data"; entitiesApi.listEntities(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n entities_api\ \ = ntnx_iam_py_client.EntitiesApi(api_client=client)\n \n page =\ \ 0\n \n limit = 50\n\n\n try:\n api_response = entities_api.list_entities(_page=page,\ \ _limit=limit)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/entities\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authz\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n EntitiesServiceApiInstance\ \ *api.EntitiesServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ EntitiesServiceApiInstance = api.NewEntitiesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := entities.ListEntitiesRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Orderby_: nil, Select_: nil }\n response,\ \ error := EntitiesServiceApiInstance.ListEntities(ctx, &request)\n if\ \ error != nil {\n fmt.Println(error)\n return\n }\n \ \ data, _ := response.GetData().([]import1.Entity)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authz/entities?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authz/entities?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authz;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n EntitiesApi entitiesApi\ \ = new EntitiesApi(client);\n\n int page = 0;\n int limit = 50;\n\ \ String filter = \"string_sample_data\";\n String orderby = \"\ string_sample_data\";\n String select = \"string_sample_data\";\n\n\ \ // Create request object with parameters\n var request =\ \ new ListEntitiesRequest {\n Page = page,\n Limit\ \ = limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Select = select\n };\n try {\n ListEntitiesApiResponse\ \ listEntitiesApiResponse = entitiesApi.ListEntities(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /iam/v4.1.b2/authz/entities/{extId}: get: tags: - Entities summary: Get entity description: Fetches the description of an entity based on the provided external identifier. operationId: getEntityById parameters: - name: extId in: path description: External identifier for the client entity. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: ed6a9c12-f6ff-4562-a1a0-89c69d62dc8a responses: "200": description: Returns response for the entity requests. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authz.Entity' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/entities/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/entities/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/entities/{extId}\ \ Get operation" x-permissions: operationName: View Entity deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 10 timeUnit: seconds - type: Small count: 10 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.EntitiesApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Entities.GetEntityByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authz.GetEntityApiResponse;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ EntitiesApi entitiesApi = new EntitiesApi(apiClient);\n\n \n\ \ String extId = \"3695BefC-BCdb-6BAC-6dfc-4Dfef39c9DA7\";\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n GetEntityApiResponse\ \ getEntityApiResponse = entitiesApi.getEntityById(GetEntityByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getEntityApiResponse.toString());\n\n } catch\ \ (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, EntitiesApi } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let entitiesApi = new EntitiesApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"0FD92bA7-Edb7-EEe6-D3F9-EAEFeAAEb8d1\";\n\ \n\n\n\n\n entitiesApi.getEntityById(extId).then(({data, response}) =>\ \ {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n entities_api\ \ = ntnx_iam_py_client.EntitiesApi(api_client=client)\n \n ext_id\ \ = \"7Fa1bfE6-BEf4-52A2-5dC5-eE2eDCe3baac\"\n\n\n try:\n api_response\ \ = entities_api.get_entity_by_id(extId=ext_id)\n print(api_response)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/entities\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authz\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n EntitiesServiceApiInstance\ \ *api.EntitiesServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ EntitiesServiceApiInstance = api.NewEntitiesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"b74cdcAb-bFbD-dbbD-De60-0b02a5EbFf93\"\ \n\n\n request := entities.GetEntityByIdRequest{ ExtId: &extId }\n \ \ response, error := EntitiesServiceApiInstance.GetEntityById(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().(import1.Entity)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authz/entities/5aA4CCC1-3E7E-0aa9-E5Ff-5bb9253FF81C" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authz/entities/6eA7f7Ad-0cbB-fdeb-3ea5-Ed8a13cCeccC" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authz;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n EntitiesApi entitiesApi\ \ = new EntitiesApi(client);\n\n String extId = \"f7CEb02B-3aaF-Fda3-af7A-e86EA8D6eE7D\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetEntityByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetEntityApiResponse getEntityApiResponse =\ \ entitiesApi.GetEntityById(request);\n } catch (ApiException ex)\ \ {\n Console.WriteLine(ex.Message);\n }\n }\n }\n\ }\n" /iam/v4.1.b2/authn/login-providers: get: tags: - LoginProviders summary: List login providers description: Lists all the configured login providers. operationId: listLoginProviders parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/login-providers?$filter=extId\ \ eq 'a0469b2b-6bc3-4d9a-ad5f-9f7529b07a77'" - name: isBrowserLoginSupported example: "https://{host}:{port}/api/iam/v4.1.b2/authn/login-providers?$filter=isBrowserLoginSupported\ \ eq true" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/login-providers?$filter=name\ \ eq 'string'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/login-providers?$orderby=createdTime" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/login-providers?$orderby=lastUpdatedTime" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/login-providers?$orderby=name" - name: type example: "https://{host}:{port}/api/iam/v4.1.b2/authn/login-providers?$orderby=type" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/login-providers?$select=createdTime" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/login-providers?$select=extId" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/login-providers?$select=lastUpdatedTime" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/login-providers?$select=name" - name: type example: "https://{host}:{port}/api/iam/v4.1.b2/authn/login-providers?$select=type" responses: "200": description: Returns the list of login providers. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.LoginProvider' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/login-providers Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/login-providers Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/login-providers Get operation x-rate-limit: - type: xsmall count: 15 timeUnit: seconds - type: Small count: 15 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.LoginProvidersApi;\nimport com.nutanix.dp1.iam.iam.v4.request.LoginProviders.ListLoginProvidersRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.ListLoginProvidersApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ LoginProvidersApi loginProvidersApi = new LoginProvidersApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListLoginProvidersApiResponse\ \ listLoginProvidersApiResponse = loginProvidersApi.listLoginProviders(ListLoginProvidersRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listLoginProvidersApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, LoginProvidersApi } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let loginProvidersApi = new LoginProvidersApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$select"] = "string_sample_data"; loginProvidersApi.listLoginProviders(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n login_providers_api\ \ = ntnx_iam_py_client.LoginProvidersApi(api_client=client)\n \n page\ \ = 0\n \n limit = 50\n\n\n try:\n api_response = login_providers_api.list_login_providers(_page=page,\ \ _limit=limit)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/loginproviders\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n LoginProvidersServiceApiInstance\ \ *api.LoginProvidersServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ LoginProvidersServiceApiInstance = api.NewLoginProvidersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := loginproviders.ListLoginProvidersRequest{ Page_:\ \ &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil, Select_: nil }\n\ \ response, error := LoginProvidersServiceApiInstance.ListLoginProviders(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.LoginProvider)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/login-providers?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/login-providers?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n LoginProvidersApi\ \ loginProvidersApi = new LoginProvidersApi(client);\n\n int page =\ \ 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String select =\ \ \"string_sample_data\";\n\n // Create request object with parameters\n\ \ var request = new ListLoginProvidersRequest {\n Page\ \ = page,\n Limit = limit,\n Filter = filter,\n \ \ Orderby = orderby,\n Select = select\n };\n\ \ try {\n ListLoginProvidersApiResponse listLoginProvidersApiResponse\ \ = loginProvidersApi.ListLoginProviders(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /iam/v4.1.b2/authz/operations/{extId}: get: tags: - Operations summary: Get operation description: Fetches an operation based on the external identifier. operationId: getOperationById parameters: - name: extId in: path description: External identifier of the operation. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: dd5e89c3-2b38-49a3-a36f-6d0cf62b4720 responses: "200": description: Returns operation. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authz.Operation' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/operations/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/operations/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/operations/{extId}\ \ Get operation" x-permissions: operationName: View Operation deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 10 timeUnit: seconds - type: Small count: 10 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.OperationsApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Operations.GetOperationByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authz.GetOperationApiResponse;\nimport\ \ org.springframework.web.client.RestClientException;\n\npublic class JavaSdkSample\ \ {\n public static void main(String[] args) {\n // Configure\ \ the client\n ApiClient apiClient = new ApiClient();\n //\ \ IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ OperationsApi operationsApi = new OperationsApi(apiClient);\n\n \ \ \n String extId = \"bECffEd6-c392-dafd-7fC0-bDacc2AE1e2b\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetOperationApiResponse\ \ getOperationApiResponse = operationsApi.getOperationById(GetOperationByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getOperationApiResponse.toString());\n\n }\ \ catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, OperationsApi } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let operationsApi = new OperationsApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"aBD0F0AC-ceE9-A4da-E66B-3CA19eE02A01\";\n\ \n\n\n\n\n operationsApi.getOperationById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n operations_api\ \ = ntnx_iam_py_client.OperationsApi(api_client=client)\n \n ext_id\ \ = \"2eCB4ce0-e5be-DC9E-BFbd-0a8E4abe0ECF\"\n\n\n try:\n api_response\ \ = operations_api.get_operation_by_id(extId=ext_id)\n print(api_response)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/operations\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authz\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n OperationsServiceApiInstance\ \ *api.OperationsServiceApi\n)\n\nfunc main() {\n ApiClientInstance =\ \ client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ OperationsServiceApiInstance = api.NewOperationsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"De2411E2-da40-97A1-ba55-1F1BED15825C\"\ \n\n\n request := operations.GetOperationByIdRequest{ ExtId: &extId }\n\ \ response, error := OperationsServiceApiInstance.GetOperationById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.Operation)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authz/operations/Cab6341a-99De-f9e5-Cafa-caCf86f2Ca5c" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authz/operations/43eBbbaF-f6eC-ae63-0F3f-F0AFe9B7E7e4" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authz;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n OperationsApi operationsApi\ \ = new OperationsApi(client);\n\n String extId = \"EfFEbeCF-efBa-EBFc-FaC2-cdAfEf9EcFea\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetOperationByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetOperationApiResponse getOperationApiResponse\ \ = operationsApi.GetOperationById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /iam/v4.1.b2/authz/operations: get: tags: - Operations summary: List operation(s) description: Fetches a list of all the operation(s). operationId: listOperations parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clientName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$filter=clientName\ \ eq 'IAM'" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$filter=createdTime\ \ eq '2009-09-23T14:30:00-07:00'" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$filter=displayName\ \ eq 'Create_Role'" - name: entityType example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$filter=entityType\ \ eq 'role'" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$filter=extId\ \ eq 'a0469b2b-6bc3-4d9a-ad5f-9f7529b07a77'" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$filter=lastUpdatedTime\ \ eq '2009-09-23T14:30:00-07:00'" - name: operationType example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$filter=operationType\ \ eq Iam.Authz.OperationType'INTERNAL'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$orderby=createdTime" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$orderby=displayName" - name: entityType example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$orderby=entityType" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$orderby=extId" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$orderby=lastUpdatedTime" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: associatedEndpointList example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$select=associatedEndpointList" - name: clientName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$select=clientName" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$select=createdTime" - name: description example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$select=description" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$select=displayName" - name: entityType example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$select=entityType" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$select=extId" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$select=lastUpdatedTime" - name: operationType example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$select=operationType" - name: relatedOperationList example: "https://{host}:{port}/api/iam/v4.1.b2/authz/operations?$select=relatedOperationList" responses: "200": description: Returns a list of operations. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authz.Operation' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/operations Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/operations Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/operations Get operation x-permissions: operationName: View Operation deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.OperationsApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Operations.ListOperationsRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authz.ListOperationsApiResponse;\nimport\ \ org.springframework.web.client.RestClientException;\n\npublic class JavaSdkSample\ \ {\n public static void main(String[] args) {\n // Configure\ \ the client\n ApiClient apiClient = new ApiClient();\n //\ \ IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ OperationsApi operationsApi = new OperationsApi(apiClient);\n\n \ \ \n int page = 0;\n \n int limit = 50;\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListOperationsApiResponse\ \ listOperationsApiResponse = operationsApi.listOperations(ListOperationsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listOperationsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, OperationsApi } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let operationsApi = new OperationsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$select"] = "string_sample_data"; operationsApi.listOperations(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n operations_api\ \ = ntnx_iam_py_client.OperationsApi(api_client=client)\n \n page\ \ = 0\n \n limit = 50\n\n\n try:\n api_response = operations_api.list_operations(_page=page,\ \ _limit=limit)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/operations\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authz\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n OperationsServiceApiInstance\ \ *api.OperationsServiceApi\n)\n\nfunc main() {\n ApiClientInstance =\ \ client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ OperationsServiceApiInstance = api.NewOperationsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := operations.ListOperationsRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Orderby_: nil, Select_: nil }\n response,\ \ error := OperationsServiceApiInstance.ListOperations(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.Operation)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authz/operations?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authz/operations?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authz;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n OperationsApi operationsApi\ \ = new OperationsApi(client);\n\n int page = 0;\n int limit =\ \ 50;\n String filter = \"string_sample_data\";\n String orderby\ \ = \"string_sample_data\";\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListOperationsRequest {\n Page = page,\n Limit\ \ = limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Select = select\n };\n try {\n ListOperationsApiResponse\ \ listOperationsApiResponse = operationsApi.ListOperations(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /iam/v4.1.b2/authz/roles: get: tags: - Roles summary: List role(s) description: Fetches a list of all the role(s). operationId: listRoles parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: clientName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$filter=clientName\ \ eq 'Prism'" - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$filter=createdBy\ \ eq '390b7801-7a80-5c94-8a07-8de63651b27b'" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$filter=createdTime\ \ eq '2009-09-23T14:30:00-07:00'" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$filter=displayName\ \ eq 'custom_role1'" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$filter=extId\ \ eq 'a0469b2b-6bc3-4d9a-ad5f-9f7529b07a77'" - name: isSystemDefined example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$filter=isSystemDefined\ \ eq true" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$filter=lastUpdatedTime\ \ eq '2009-09-23T14:30:00-07:00'" - name: operationSchemaChangeImpact example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$filter=operationSchemaChangeImpact\ \ eq Iam.Authz.OperationSchemaChangeImpact'IMPACTED'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$orderby=createdTime" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$orderby=displayName" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$orderby=extId" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$orderby=lastUpdatedTime" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: accessibleClients example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=accessibleClients" - name: accessibleEntityTypes example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=accessibleEntityTypes" - name: assignedUserGroupsCount example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=assignedUserGroupsCount" - name: assignedUsersCount example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=assignedUsersCount" - name: clientName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=clientName" - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=createdBy" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=createdTime" - name: description example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=description" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=displayName" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=extId" - name: isSystemDefined example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=isSystemDefined" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=lastUpdatedTime" - name: operationSchemaChangeImpact example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=operationSchemaChangeImpact" - name: operations example: "https://{host}:{port}/api/iam/v4.1.b2/authz/roles?$select=operations" responses: "200": description: Returns a list of role(s). content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authz.Role' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/roles Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/roles Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/roles Get operation x-permissions: operationName: View Role deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 10 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 20 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.RolesApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Roles.ListRolesRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authz.ListRolesApiResponse;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RolesApi rolesApi = new RolesApi(apiClient);\n\n \n int\ \ page = 0;\n \n int limit = 50;\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n ListRolesApiResponse listRolesApiResponse\ \ = rolesApi.listRoles(ListRolesRequest.builder()\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .$select(null)\n \ \ .build());\n\n System.out.println(listRolesApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, RolesApi } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let rolesApi = new RolesApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$select"] = "string_sample_data"; rolesApi.listRoles(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n roles_api\ \ = ntnx_iam_py_client.RolesApi(api_client=client)\n \n page = 0\n\ \ \n limit = 50\n\n\n try:\n api_response = roles_api.list_roles(_page=page,\ \ _limit=limit)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/roles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authz\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RolesServiceApiInstance\ \ *api.RolesServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ RolesServiceApiInstance = api.NewRolesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := roles.ListRolesRequest{ Page_: &page_, Limit_:\ \ &limit_, Filter_: nil, Orderby_: nil, Select_: nil }\n response, error\ \ := RolesServiceApiInstance.ListRoles(ctx, &request)\n if error != nil\ \ {\n fmt.Println(error)\n return\n }\n data, _ := response.GetData().([]import1.Role)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authz/roles?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authz/roles?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authz;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n RolesApi rolesApi\ \ = new RolesApi(client);\n\n int page = 0;\n int limit = 50;\n\ \ String filter = \"string_sample_data\";\n String orderby = \"\ string_sample_data\";\n String select = \"string_sample_data\";\n\n\ \ // Create request object with parameters\n var request =\ \ new ListRolesRequest {\n Page = page,\n Limit =\ \ limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Select = select\n };\n try {\n ListRolesApiResponse\ \ listRolesApiResponse = rolesApi.ListRoles(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - Roles summary: Create role description: Creates a role. operationId: createRole requestBody: description: Creates a role. content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authz.Role' required: true responses: "201": description: Role is created. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authz.Role' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/roles Post operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/roles Post operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/roles Post operation x-permissions: operationName: Create Role deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.iam.java.client.ApiClient; import com.nutanix.iam.java.client.api.RolesApi; import com.nutanix.dp1.iam.iam.v4.request.Roles.CreateRoleRequest; import com.nutanix.dp1.iam.iam.v4.authz.Role; import com.nutanix.dp1.iam.iam.v4.authz.CreateRoleApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. RolesApi rolesApi = new RolesApi(apiClient); Role role = new Role(); // Role object initializations here... try { // Pass in parameters using the request builder object associated with the operation. CreateRoleApiResponse createRoleApiResponse = rolesApi.createRole(CreateRoleRequest.builder() .build(), role); System.out.println(createRoleApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, RolesApi, Role } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let rolesApi = new RolesApi(apiClientInstance); function sample() { let role = new Role(); // Role object initializations here... role = JSON.stringify(role); rolesApi.createRole(role).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_iam_py_client if __name__ == "__main__": # Configure the client config = ntnx_iam_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_iam_py_client.ApiClient(configuration=config) roles_api = ntnx_iam_py_client.RolesApi(api_client=client) role = ntnx_iam_py_client.Role() # Role object initializations here... try: api_response = roles_api.create_role(body=role) print(api_response) except ntnx_iam_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/roles" import1 "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authz" ) var ( ApiClientInstance *client.ApiClient RolesServiceApiInstance *api.RolesServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. RolesServiceApiInstance = api.NewRolesServiceApi(ApiClientInstance) ctx := context.Background() role := import1.NewRole() // Role object initializations here... request := roles.CreateRoleRequest{ Body: role } response, error := RolesServiceApiInstance.CreateRole(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import1.Role) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authz/roles" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"displayName":"custom_role1","clientName":"Prism","description":"Adminforcluster-X","operations":["string"],"accessibleClients":["Prism"],"accessibleEntityTypes":["role"],"accessibleClientsCount":10,"accessibleEntityTypesCount":20,"assignedUsersCount":0,"assignedUserGroupsCount":0,"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","isSystemDefined":true,"operationSchemaChangeImpact":"$UNKNOWN","$objectType":"iam.v4.authz.Role"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"displayName":"custom_role1","clientName":"Prism","description":"Adminforcluster-X","operations":["string"],"accessibleClients":["Prism"],"accessibleEntityTypes":["role"],"accessibleClientsCount":10,"accessibleEntityTypesCount":20,"assignedUsersCount":0,"assignedUserGroupsCount":0,"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","isSystemDefined":true,"operationSchemaChangeImpact":"$UNKNOWN","$objectType":"iam.v4.authz.Role"} \ - "https://host:port/api/iam/v4.1.b2/authz/roles" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authz;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n RolesApi rolesApi\ \ = new RolesApi(client);\n\n Role role = new Role();\n\n // Role\ \ object initializations here...\n\n\n // Create request object with\ \ parameters\n var request = new CreateRoleRequest {\n \ \ Body = role\n };\n try {\n CreateRoleApiResponse\ \ createRoleApiResponse = rolesApi.CreateRole(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /iam/v4.1.b2/authz/roles/{extId}: get: tags: - Roles summary: Get role description: Fetches a role based on the provided external identifier. operationId: getRoleById parameters: - name: extId in: path description: External identifier for the role. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: f6f59a3f-b33b-442f-bd4c-30f4eb5d5ea3 responses: "200": description: Returns the requested role. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authz.Role' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/roles/{extId}\ \ Get operation" "304": description: Role content not modified. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/roles/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/roles/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/roles/{extId}\ \ Get operation" x-permissions: operationName: View Role deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Account Owner - name: Administrator - name: User - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 10 timeUnit: seconds - type: Small count: 10 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.RolesApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Roles.GetRoleByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authz.GetRoleApiResponse;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RolesApi rolesApi = new RolesApi(apiClient);\n\n \n String\ \ extId = \"Cfd5BbBc-eFfF-399f-2F99-bfe5DE6ccac7\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n GetRoleApiResponse getRoleApiResponse\ \ = rolesApi.getRoleById(GetRoleByIdRequest.builder()\n .extId(extId)\n\ \ .build());\n\n System.out.println(getRoleApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RolesApi } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let rolesApi = new RolesApi(apiClientInstance);\n\nfunction sample() {\n\ \n \n let extId = \"e7c3E8eb-dAC9-a9AF-27cF-Ac2Eb7dA8C10\";\n\n\n\n\ \n\n rolesApi.getRoleById(extId).then(({data, response}) => {\n \ \ console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n roles_api\ \ = ntnx_iam_py_client.RolesApi(api_client=client)\n \n ext_id = \"\ 3CDb7f1F-c98B-aEAa-B35A-b23A5f6ed0b9\"\n\n\n try:\n api_response\ \ = roles_api.get_role_by_id(extId=ext_id)\n print(api_response)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/roles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authz\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RolesServiceApiInstance\ \ *api.RolesServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ RolesServiceApiInstance = api.NewRolesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"FcfbC0B9-DEe5-8A8c-9D2a-CedDCBBcaeC1\"\ \n\n\n request := roles.GetRoleByIdRequest{ ExtId: &extId }\n response,\ \ error := RolesServiceApiInstance.GetRoleById(ctx, &request)\n if error\ \ != nil {\n fmt.Println(error)\n return\n }\n data,\ \ _ := response.GetData().(import1.Role)\n fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authz/roles/f6eFCFCE-bc5B-0dDc-a1Cf-7DDCADAaFc76" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authz/roles/4dC17A04-3fEC-F2EE-5eCD-AA0AB72d84F9" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authz;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n RolesApi rolesApi\ \ = new RolesApi(client);\n\n String extId = \"f8AfBFdd-1c8a-EC1F-Fab4-c9fF967Cb47d\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetRoleByIdRequest {\n ExtId = extId\n };\n \ \ try {\n GetRoleApiResponse getRoleApiResponse = rolesApi.GetRoleById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - Roles summary: Update role description: Updates a role based on the provided external identifier. operationId: updateRoleById parameters: - name: extId in: path description: External identifier for the role. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 66b0320d-98aa-46b3-8c8c-b9d9f10c43cb - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string requestBody: description: Information for the update role request. content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authz.Role' required: true responses: "200": description: Role is updated. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/common.v1.0.config.Message' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/roles/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/roles/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/roles/{extId}\ \ Put operation" x-permissions: operationName: Update Role deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.RolesApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Roles.UpdateRoleByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.request.Roles.GetRoleByIdRequest;\nimport\ \ java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.iam.iam.v4.authz.Role;\n\ import com.nutanix.dp1.iam.iam.v4.authz.GetRoleApiResponse;\nimport com.nutanix.dp1.iam.iam.v4.authz.UpdateRoleApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ RolesApi rolesApi = new RolesApi(apiClient);\n\n Role role =\ \ new Role();\n\n // Role object initializations here...\n \ \ \n String extId = \"Ee8CbCDf-C55a-3FDF-AdcD-EeFDDcDdFEAb\";\n\n\ \ // perform GET call\n GetRoleApiResponse getResponse = null;\n\ \ try {\n getResponse = rolesApi.getRoleById(GetRoleByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n UpdateRoleApiResponse\ \ updateRoleApiResponse = rolesApi.updateRoleById(UpdateRoleByIdRequest.builder()\n\ \ .extId(extId)\n .build(), role, opts);\n\ \n System.out.println(updateRoleApiResponse.toString());\n\n\ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, RolesApi, Role, GetRoleApiResponse } from \"\ @nutanix-api/iam-js-client\";\n\n// Configure the client\nlet apiClientInstance\ \ = new ApiClient();\n// IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host\ \ = 'localhost';\n// Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\napiClientInstance.port = '9440';\n\ // Max retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let rolesApi = new RolesApi(apiClientInstance);\n\nfunction sample() {\n\ \ let role = new Role();\n\n // Role object initializations here...\n\ \ role = JSON.stringify(role);\n\n \n let extId = \"BF3A51fd-D16E-F0B6-DD55-E622716BaC4a\"\ ;\n\n\n // Perform Get call\n rolesApi.getRoleById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n rolesApi.updateRoleById(extId, role, args).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n roles_api\ \ = ntnx_iam_py_client.RolesApi(api_client=client)\n role = ntnx_iam_py_client.Role()\n\ \n # Role object initializations here...\n \n ext_id = \"dAfcAafB-F35C-DED9-1fEA-BebAbc0C192C\"\ \n\n try:\n api_response = roles_api.get_role_by_id(extId=ext_id)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_iam_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = roles_api.update_role_by_id(extId=ext_id,\ \ body=role, if_match=etag_value)\n print(api_response)\n except\ \ ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/roles\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authz\"\ \n import2 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/common/v1/config\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n RolesServiceApiInstance\ \ *api.RolesServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ RolesServiceApiInstance = api.NewRolesServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n role := import1.NewRole()\n\n \ \ // Role object initializations here...\n\n \n extId := \"5fdaD87D-bdCb-9A32-dDB0-049EFC6FCBCA\"\ \n\n getRequest := roles.GetRoleByIdRequest{ extId: &extId }\n getResponse,\ \ err := RolesServiceApiInstance.GetRoleById(ctx, &getRequest)\n if err\ \ != nil {\n fmt.Println(err)\n return\n }\n\n // Extract\ \ E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := roles.UpdateRoleByIdRequest{ ExtId: &extId, Body: role\ \ }\n response, error := RolesServiceApiInstance.UpdateRoleById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import2.Message)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/iam/v4.1.b2/authz/roles/AABB1c1a-dbCb-CBF4-fF51-69DA38C3af3B" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"displayName":"custom_role1","clientName":"Prism","description":"Adminforcluster-X","operations":["string"],"accessibleClients":["Prism"],"accessibleEntityTypes":["role"],"accessibleClientsCount":10,"accessibleEntityTypesCount":20,"assignedUsersCount":0,"assignedUserGroupsCount":0,"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","isSystemDefined":true,"operationSchemaChangeImpact":"$UNKNOWN","$objectType":"iam.v4.authz.Role"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"displayName":"custom_role1","clientName":"Prism","description":"Adminforcluster-X","operations":["string"],"accessibleClients":["Prism"],"accessibleEntityTypes":["role"],"accessibleClientsCount":10,"accessibleEntityTypesCount":20,"assignedUsersCount":0,"assignedUserGroupsCount":0,"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","isSystemDefined":true,"operationSchemaChangeImpact":"$UNKNOWN","$objectType":"iam.v4.authz.Role"} \ - "https://host:port/api/iam/v4.1.b2/authz/roles/5BE68c6B-fe52-679C-86dc-CdeCcd5eC9fd" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authz;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n RolesApi rolesApi\ \ = new RolesApi(client);\n\n Role role = new Role();\n\n // Role\ \ object initializations here...\n\n String extId = \"b7ed8CeB-a687-3ABc-F96c-EF866ECBfFae\"\ ;\n\n // perform GET call\n var getRequest = new GetRoleByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetRoleApiResponse\ \ getResponse = rolesApi.GetRoleById(getRequest);\n } catch(ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n \ \ // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateRoleByIdRequest {\n ExtId = extId,\n \ \ Body = role,\n \n \n };\n \ \ try {\n UpdateRoleApiResponse updateRoleApiResponse = rolesApi.UpdateRoleById(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - Roles summary: Delete role description: Deletes a role based on the provided external identifier. operationId: deleteRoleById parameters: - name: extId in: path description: External identifier for the role. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 49196bf6-34aa-4896-81f6-f3d6a5ec7745 - name: If-Match in: header description: | The If-Match request header makes the request conditional. When not provided the server will respond with an HTTP 428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP 412 (Precondition Failed) response required: true style: simple explode: false schema: type: string example: string responses: "204": description: Role deleted. content: application/json: {} "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/roles/{extId}\ \ Delete operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/roles/{extId}\ \ Delete operation" x-permissions: operationName: Delete Role deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" /iam/v4.1.b2/authn/saml-identity-providers: get: tags: - SAMLIdentityProviders summary: List SAML identity providers description: Lists all SAML identity providers configured in the system. operationId: listSamlIdentityProviders parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$filter=createdBy\ \ eq '390b7801-7a80-5c94-8a07-8de63651b27b'" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$filter=extId\ \ eq 'a0469b2b-6bc3-4d9a-ad5f-9f7529b07a77'" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$filter=name\ \ eq 'saml1'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$orderby=createdTime" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$orderby=lastUpdatedTime" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$orderby=name" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$select=createdBy" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$select=createdTime" - name: customAttributes example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$select=customAttributes" - name: emailAttribute example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$select=emailAttribute" - name: entityIssuer example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$select=entityIssuer" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$select=extId" - name: groupsAttribute example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$select=groupsAttribute" - name: groupsDelim example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$select=groupsDelim" - name: idpMetadata example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$select=idpMetadata" - name: isSignedAuthnReqEnabled example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$select=isSignedAuthnReqEnabled" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$select=lastUpdatedTime" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$select=name" - name: usernameAttribute example: "https://{host}:{port}/api/iam/v4.1.b2/authn/saml-identity-providers?$select=usernameAttribute" responses: "200": description: Returns SAML identity providers list. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.SamlIdentityProvider' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers Get operation x-permissions: operationName: View Saml Identity Provider deploymentList: - ON_PREM - CLOUD roleList: - name: Project Admin - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.SAMLIdentityProvidersApi;\nimport\ \ com.nutanix.dp1.iam.iam.v4.request.SAMLIdentityProviders.ListSamlIdentityProvidersRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.ListSamlIdentityProvidersApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ SAMLIdentityProvidersApi sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(apiClient);\n\ \n \n int page = 0;\n \n int limit = 50;\n\n\ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListSamlIdentityProvidersApiResponse\ \ listSamlIdentityProvidersApiResponse = sAMLIdentityProvidersApi.listSamlIdentityProviders(ListSamlIdentityProvidersRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listSamlIdentityProvidersApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, SAMLIdentityProvidersApi } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$select"] = "string_sample_data"; sAMLIdentityProvidersApi.listSamlIdentityProviders(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n s_aml_identity_providers_api\ \ = ntnx_iam_py_client.SAMLIdentityProvidersApi(api_client=client)\n \ \ \n page = 0\n \n limit = 50\n\n\n try:\n api_response\ \ = s_aml_identity_providers_api.list_saml_identity_providers(_page=page,\ \ _limit=limit)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/samlidentityproviders\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SAMLIdentityProvidersServiceApiInstance\ \ *api.SAMLIdentityProvidersServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ SAMLIdentityProvidersServiceApiInstance = api.NewSAMLIdentityProvidersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := samlidentityproviders.ListSamlIdentityProvidersRequest{\ \ Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_: nil, Select_:\ \ nil }\n response, error := SAMLIdentityProvidersServiceApiInstance.ListSamlIdentityProviders(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.SamlIdentityProvider)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/saml-identity-providers?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/saml-identity-providers?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n SAMLIdentityProvidersApi\ \ sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(client);\n\n \ \ int page = 0;\n int limit = 50;\n String filter = \"string_sample_data\"\ ;\n String orderby = \"string_sample_data\";\n String select =\ \ \"string_sample_data\";\n\n // Create request object with parameters\n\ \ var request = new ListSamlIdentityProvidersRequest {\n \ \ Page = page,\n Limit = limit,\n Filter = filter,\n\ \ Orderby = orderby,\n Select = select\n };\n\ \ try {\n ListSamlIdentityProvidersApiResponse listSamlIdentityProvidersApiResponse\ \ = sAMLIdentityProvidersApi.ListSamlIdentityProviders(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" post: tags: - SAMLIdentityProviders summary: Create SAML identity provider description: Create a SAML identity provider from the given request payload. operationId: createSamlIdentityProvider requestBody: description: Information for the create SAML identity provider request. content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.SamlIdentityProvider' required: true responses: "201": description: SAML identity provider created. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.SamlIdentityProvider' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers Post operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers Post operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers Post operation x-permissions: operationName: Create Saml Identity Provider deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.iam.java.client.ApiClient; import com.nutanix.iam.java.client.api.SAMLIdentityProvidersApi; import com.nutanix.dp1.iam.iam.v4.request.SAMLIdentityProviders.CreateSamlIdentityProviderRequest; import com.nutanix.dp1.iam.iam.v4.authn.SamlIdentityProvider; import com.nutanix.dp1.iam.iam.v4.authn.CreateSamlIdentityProviderApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. SAMLIdentityProvidersApi sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(apiClient); SamlIdentityProvider samlIdentityProvider = new SamlIdentityProvider(); // SamlIdentityProvider object initializations here... try { // Pass in parameters using the request builder object associated with the operation. CreateSamlIdentityProviderApiResponse createSamlIdentityProviderApiResponse = sAMLIdentityProvidersApi.createSamlIdentityProvider(CreateSamlIdentityProviderRequest.builder() .build(), samlIdentityProvider); System.out.println(createSamlIdentityProviderApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, SAMLIdentityProvidersApi, SamlIdentityProvider } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(apiClientInstance); function sample() { let samlIdentityProvider = new SamlIdentityProvider(); // SamlIdentityProvider object initializations here... samlIdentityProvider = JSON.stringify(samlIdentityProvider); sAMLIdentityProvidersApi.createSamlIdentityProvider(samlIdentityProvider).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_iam_py_client if __name__ == "__main__": # Configure the client config = ntnx_iam_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_iam_py_client.ApiClient(configuration=config) s_aml_identity_providers_api = ntnx_iam_py_client.SAMLIdentityProvidersApi(api_client=client) samlIdentityProvider = ntnx_iam_py_client.SamlIdentityProvider() # SamlIdentityProvider object initializations here... try: api_response = s_aml_identity_providers_api.create_saml_identity_provider(body=samlIdentityProvider) print(api_response) except ntnx_iam_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/samlidentityproviders" import1 "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn" ) var ( ApiClientInstance *client.ApiClient SAMLIdentityProvidersServiceApiInstance *api.SAMLIdentityProvidersServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. SAMLIdentityProvidersServiceApiInstance = api.NewSAMLIdentityProvidersServiceApi(ApiClientInstance) ctx := context.Background() samlIdentityProvider := import1.NewSamlIdentityProvider() // SamlIdentityProvider object initializations here... request := samlidentityproviders.CreateSamlIdentityProviderRequest{ Body: samlIdentityProvider } response, error := SAMLIdentityProvidersServiceApiInstance.CreateSamlIdentityProvider(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import1.SamlIdentityProvider) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authn/saml-identity-providers" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"idpMetadataUrl":"http://{{idp_host}}/idp_metadata","idpMetadataXml":"string","idpMetadata":{"entityId":"http://{{idp_host}}/entity","loginUrl":"http://{{idp_host}}/loginUrl","logoutUrl":"http://{{idp_host}}/logoutUrl","errorUrl":"http://{{idp_host}}/errorUrl","certificate":"string","nameIdPolicyFormat":"$UNKNOWN","$objectType":"iam.v4.authn.IdpMetadata"},"name":"saml1","usernameAttribute":"name","emailAttribute":"email","groupsAttribute":"grpAttribute1","groupsDelim":"string","redirectURL":"string","customAttributes":["Attribute1"],"entityIssuer":"issuer1","isSignedAuthnReqEnabled":true,"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","$objectType":"iam.v4.authn.SamlIdentityProvider"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"idpMetadataUrl":"http://{{idp_host}}/idp_metadata","idpMetadataXml":"string","idpMetadata":{"entityId":"http://{{idp_host}}/entity","loginUrl":"http://{{idp_host}}/loginUrl","logoutUrl":"http://{{idp_host}}/logoutUrl","errorUrl":"http://{{idp_host}}/errorUrl","certificate":"string","nameIdPolicyFormat":"$UNKNOWN","$objectType":"iam.v4.authn.IdpMetadata"},"name":"saml1","usernameAttribute":"name","emailAttribute":"email","groupsAttribute":"grpAttribute1","groupsDelim":"string","redirectURL":"string","customAttributes":["Attribute1"],"entityIssuer":"issuer1","isSignedAuthnReqEnabled":true,"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","$objectType":"iam.v4.authn.SamlIdentityProvider"} \ - "https://host:port/api/iam/v4.1.b2/authn/saml-identity-providers" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n SAMLIdentityProvidersApi\ \ sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(client);\n\n \ \ SamlIdentityProvider samlIdentityProvider = new SamlIdentityProvider();\n\ \n // SamlIdentityProvider object initializations here...\n\n\n \ \ // Create request object with parameters\n var request = new\ \ CreateSamlIdentityProviderRequest {\n Body = samlIdentityProvider\n\ \ };\n try {\n CreateSamlIdentityProviderApiResponse\ \ createSamlIdentityProviderApiResponse = sAMLIdentityProvidersApi.CreateSamlIdentityProvider(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /iam/v4.1.b2/authn/saml-identity-providers/{extId}: get: tags: - SAMLIdentityProviders summary: Get SAML identity provider description: Fetches a SAML identity provider based on its external identifier. operationId: getSamlIdentityProviderById parameters: - name: extId in: path description: External identifier of the SAML identity provider. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 8af62523-4e19-4fa1-b3f4-cdf18f54fbe8 responses: "200": description: Returns SAML identity provider. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.SamlIdentityProvider' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}\ \ Get operation" x-permissions: operationName: View Saml Identity Provider deploymentList: - ON_PREM - CLOUD roleList: - name: Project Admin - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.SAMLIdentityProvidersApi;\nimport\ \ com.nutanix.dp1.iam.iam.v4.request.SAMLIdentityProviders.GetSamlIdentityProviderByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.GetSamlIdentityProviderApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ SAMLIdentityProvidersApi sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(apiClient);\n\ \n \n String extId = \"Ed9e0ddb-aaBd-cD1F-BaFF-4EDEf7BEaDDa\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetSamlIdentityProviderApiResponse\ \ getSamlIdentityProviderApiResponse = sAMLIdentityProvidersApi.getSamlIdentityProviderById(GetSamlIdentityProviderByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getSamlIdentityProviderApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, SAMLIdentityProvidersApi } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"cB3AcCB8-8a4c-Cd1f-FA3f-C0EAaB2D8C83\"\ ;\n\n\n\n\n\n sAMLIdentityProvidersApi.getSamlIdentityProviderById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n s_aml_identity_providers_api\ \ = ntnx_iam_py_client.SAMLIdentityProvidersApi(api_client=client)\n \ \ \n ext_id = \"bfc75eC5-fcE4-babA-AF90-EdEDDbF63Fb0\"\n\n\n try:\n\ \ api_response = s_aml_identity_providers_api.get_saml_identity_provider_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/samlidentityproviders\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SAMLIdentityProvidersServiceApiInstance\ \ *api.SAMLIdentityProvidersServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ SAMLIdentityProvidersServiceApiInstance = api.NewSAMLIdentityProvidersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"47Ae1Caf-AdDC-c1bB-EF0B-2FDE5A30bfeD\"\ \n\n\n request := samlidentityproviders.GetSamlIdentityProviderByIdRequest{\ \ ExtId: &extId }\n response, error := SAMLIdentityProvidersServiceApiInstance.GetSamlIdentityProviderById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.SamlIdentityProvider)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/saml-identity-providers/88a2CE0d-Dc3A-D6Bd-f4d2-8Fb67B1ddbF7" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/saml-identity-providers/b4d2c9ef-bf6F-a71D-74fB-6c9d58Cf3ef1" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n SAMLIdentityProvidersApi\ \ sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(client);\n\n \ \ String extId = \"Feb8Cb3E-cAD6-Ad7e-FfEC-AAccecd0b7c4\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetSamlIdentityProviderByIdRequest {\n ExtId = extId\n \ \ };\n try {\n GetSamlIdentityProviderApiResponse getSamlIdentityProviderApiResponse\ \ = sAMLIdentityProvidersApi.GetSamlIdentityProviderById(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - SAMLIdentityProviders summary: Update SAML identity provider description: Updates a SAML identity provider based on its external identifier. operationId: updateSamlIdentityProviderById parameters: - name: extId in: path description: External identifier of the SAML identity provider. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: d585b3bc-b944-4586-a3ad-f7adfbf62b15 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string requestBody: description: Information for the update SAML identity provider request. content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.SamlIdentityProvider' required: true responses: "200": description: Requested SAML identity provider updated. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.SamlIdentityProvider' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}\ \ Put operation" x-permissions: operationName: Update Saml Identity Provider deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.SAMLIdentityProvidersApi;\nimport\ \ com.nutanix.dp1.iam.iam.v4.request.SAMLIdentityProviders.UpdateSamlIdentityProviderByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.request.SAMLIdentityProviders.GetSamlIdentityProviderByIdRequest;\n\ import java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.iam.iam.v4.authn.SamlIdentityProvider;\n\ import com.nutanix.dp1.iam.iam.v4.authn.GetSamlIdentityProviderApiResponse;\n\ import com.nutanix.dp1.iam.iam.v4.authn.UpdateSamlIdentityProviderApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ SAMLIdentityProvidersApi sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(apiClient);\n\ \n SamlIdentityProvider samlIdentityProvider = new SamlIdentityProvider();\n\ \n // SamlIdentityProvider object initializations here...\n \ \ \n String extId = \"C5A5cbED-CEa2-efeC-abE6-cBB4a2d6b3ac\";\n\ \n // perform GET call\n GetSamlIdentityProviderApiResponse\ \ getResponse = null;\n try {\n getResponse = sAMLIdentityProvidersApi.getSamlIdentityProviderById(GetSamlIdentityProviderByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n UpdateSamlIdentityProviderApiResponse\ \ updateSamlIdentityProviderApiResponse = sAMLIdentityProvidersApi.updateSamlIdentityProviderById(UpdateSamlIdentityProviderByIdRequest.builder()\n\ \ .extId(extId)\n .build(), samlIdentityProvider,\ \ opts);\n\n System.out.println(updateSamlIdentityProviderApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, SAMLIdentityProvidersApi, SamlIdentityProvider,\ \ GetSamlIdentityProviderApiResponse } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(apiClientInstance);\n\ \nfunction sample() {\n let samlIdentityProvider = new SamlIdentityProvider();\n\ \n // SamlIdentityProvider object initializations here...\n samlIdentityProvider\ \ = JSON.stringify(samlIdentityProvider);\n\n \n let extId = \"4CecfAE3-EdD3-6ECD-49F5-deFA445b0ADD\"\ ;\n\n\n // Perform Get call\n sAMLIdentityProvidersApi.getSamlIdentityProviderById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n sAMLIdentityProvidersApi.updateSamlIdentityProviderById(extId,\ \ samlIdentityProvider, args).then(({data, response}) => {\n \ \ console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n\ \ console.log(`Error is: ${error}`);\n });\n });\n\n\ }\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n s_aml_identity_providers_api\ \ = ntnx_iam_py_client.SAMLIdentityProvidersApi(api_client=client)\n \ \ samlIdentityProvider = ntnx_iam_py_client.SamlIdentityProvider()\n\n \ \ # SamlIdentityProvider object initializations here...\n \n ext_id\ \ = \"F389D105-dDDb-8aaa-3fac-b4E8E08Ed13F\"\n\n try:\n api_response\ \ = s_aml_identity_providers_api.get_saml_identity_provider_by_id(extId=ext_id)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_iam_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = s_aml_identity_providers_api.update_saml_identity_provider_by_id(extId=ext_id,\ \ body=samlIdentityProvider, if_match=etag_value)\n print(api_response)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/samlidentityproviders\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SAMLIdentityProvidersServiceApiInstance\ \ *api.SAMLIdentityProvidersServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ SAMLIdentityProvidersServiceApiInstance = api.NewSAMLIdentityProvidersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n samlIdentityProvider := import1.NewSamlIdentityProvider()\n\ \n // SamlIdentityProvider object initializations here...\n\n \n \ \ extId := \"2897FE7c-adad-cCAB-B0Dd-d6ACEa2FeCF3\"\n\n getRequest\ \ := samlidentityproviders.GetSamlIdentityProviderByIdRequest{ extId: &extId\ \ }\n getResponse, err := SAMLIdentityProvidersServiceApiInstance.GetSamlIdentityProviderById(ctx,\ \ &getRequest)\n if err != nil {\n fmt.Println(err)\n return\n\ \ }\n\n // Extract E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := samlidentityproviders.UpdateSamlIdentityProviderByIdRequest{\ \ ExtId: &extId, Body: samlIdentityProvider }\n response, error := SAMLIdentityProvidersServiceApiInstance.UpdateSamlIdentityProviderById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.SamlIdentityProvider)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/iam/v4.1.b2/authn/saml-identity-providers/ef2afB7d-AedE-a0a5-3BcB-49Df6Af5fbEa" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"idpMetadataUrl":"http://{{idp_host}}/idp_metadata","idpMetadataXml":"string","idpMetadata":{"entityId":"http://{{idp_host}}/entity","loginUrl":"http://{{idp_host}}/loginUrl","logoutUrl":"http://{{idp_host}}/logoutUrl","errorUrl":"http://{{idp_host}}/errorUrl","certificate":"string","nameIdPolicyFormat":"$UNKNOWN","$objectType":"iam.v4.authn.IdpMetadata"},"name":"saml1","usernameAttribute":"name","emailAttribute":"email","groupsAttribute":"grpAttribute1","groupsDelim":"string","redirectURL":"string","customAttributes":["Attribute1"],"entityIssuer":"issuer1","isSignedAuthnReqEnabled":true,"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","$objectType":"iam.v4.authn.SamlIdentityProvider"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"idpMetadataUrl":"http://{{idp_host}}/idp_metadata","idpMetadataXml":"string","idpMetadata":{"entityId":"http://{{idp_host}}/entity","loginUrl":"http://{{idp_host}}/loginUrl","logoutUrl":"http://{{idp_host}}/logoutUrl","errorUrl":"http://{{idp_host}}/errorUrl","certificate":"string","nameIdPolicyFormat":"$UNKNOWN","$objectType":"iam.v4.authn.IdpMetadata"},"name":"saml1","usernameAttribute":"name","emailAttribute":"email","groupsAttribute":"grpAttribute1","groupsDelim":"string","redirectURL":"string","customAttributes":["Attribute1"],"entityIssuer":"issuer1","isSignedAuthnReqEnabled":true,"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","$objectType":"iam.v4.authn.SamlIdentityProvider"} \ - "https://host:port/api/iam/v4.1.b2/authn/saml-identity-providers/FeaD6DC0-BeCd-fdDB-fFF4-5a71abDf05Ea" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n SAMLIdentityProvidersApi\ \ sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(client);\n\n \ \ SamlIdentityProvider samlIdentityProvider = new SamlIdentityProvider();\n\ \n // SamlIdentityProvider object initializations here...\n\n \ \ String extId = \"be5c8519-e9DF-c9f6-03F2-B0b4648AD1E6\";\n\n //\ \ perform GET call\n var getRequest = new GetSamlIdentityProviderByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetSamlIdentityProviderApiResponse\ \ getResponse = sAMLIdentityProvidersApi.GetSamlIdentityProviderById(getRequest);\n\ \ } catch(ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateSamlIdentityProviderByIdRequest {\n ExtId\ \ = extId,\n Body = samlIdentityProvider,\n \n \ \ \n };\n try {\n UpdateSamlIdentityProviderApiResponse\ \ updateSamlIdentityProviderApiResponse = sAMLIdentityProvidersApi.UpdateSamlIdentityProviderById(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" delete: tags: - SAMLIdentityProviders summary: Delete SAML identity provider description: Deletes a SAML identity provider based on its external identifier. operationId: deleteSamlIdentityProviderById parameters: - name: extId in: path description: External identifier of the SAML identity provider. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 6ad13788-5edb-4af7-8d1a-2e6c2d7ab7be - name: If-Match in: header description: | The If-Match request header makes the request conditional. When not provided the server will respond with an HTTP 428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP 412 (Precondition Failed) response required: true style: simple explode: false schema: type: string example: string responses: "204": description: Requested SAML identity provider deleted. content: application/json: {} "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}\ \ Delete operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}\ \ Delete operation" x-permissions: operationName: Delete Saml Identity Provider deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" /iam/v4.1.b2/authn/saml-identity-providers/{extId}/sp-metadata: get: tags: - SAMLIdentityProviders summary: Downloads SP-Metadata for SAML identity provider. description: Downloads SP-Metadata for SAML identity provider. operationId: getSamlIdpSpMetadataById parameters: - name: extId in: path description: External identifier of the SAML identity provider. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 3eab9461-5acc-49e5-9321-12ed999c8163 responses: "200": description: SP-Metadata for SAML identity provider downloaded. content: text/xml: schema: type: string format: byte "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}/sp-metadata\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}/sp-metadata\ \ Get operation" x-permissions: operationName: Get SAML IdP SP Metadata deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "7.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.SAMLIdentityProvidersApi;\nimport\ \ com.nutanix.dp1.iam.iam.v4.request.SAMLIdentityProviders.GetSamlIdpSpMetadataByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.GetSamlIdpSpMetadataApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ SAMLIdentityProvidersApi sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(apiClient);\n\ \n \n String extId = \"5A2BAfec-Abe0-EDB8-8F78-afB3eacdFA40\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetSamlIdpSpMetadataApiResponse\ \ getSamlIdpSpMetadataApiResponse = sAMLIdentityProvidersApi.getSamlIdpSpMetadataById(GetSamlIdpSpMetadataByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getSamlIdpSpMetadataApiResponse.toString());\n\n\ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, SAMLIdentityProvidersApi } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(apiClientInstance);\n\ \nfunction sample() {\n\n \n let extId = \"82EFFdf7-25ae-Cfea-Ace4-af3cD0Dae8cb\"\ ;\n\n\n\n\n\n sAMLIdentityProvidersApi.getSamlIdpSpMetadataById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n s_aml_identity_providers_api\ \ = ntnx_iam_py_client.SAMLIdentityProvidersApi(api_client=client)\n \ \ \n ext_id = \"e5f5fEcd-AC63-e502-a870-565CD8B2cd50\"\n\n\n try:\n\ \ api_response = s_aml_identity_providers_api.get_saml_idp_sp_metadata_by_id(extId=ext_id)\n\ \ print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/samlidentityproviders\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n SAMLIdentityProvidersServiceApiInstance\ \ *api.SAMLIdentityProvidersServiceApi\n)\n\nfunc main() {\n ApiClientInstance\ \ = client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ SAMLIdentityProvidersServiceApiInstance = api.NewSAMLIdentityProvidersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"0F4fCadb-8DdA-5fBa-e23E-dfaa826E8bdd\"\ \n\n\n request := samlidentityproviders.GetSamlIdpSpMetadataByIdRequest{\ \ ExtId: &extId }\n response, error := SAMLIdentityProvidersServiceApiInstance.GetSamlIdpSpMetadataById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import.)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/saml-identity-providers/C5CAaB5A-f1F6-c9c4-8BB3-D8F64D7DDC0a/sp-metadata" \ --header 'Accept: text/xml' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: text/xml' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/saml-identity-providers/c3b66aFD-bAdB-Add6-BbDE-28d47decFf29/sp-metadata" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n SAMLIdentityProvidersApi\ \ sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(client);\n\n \ \ String extId = \"ceCEBccB-6c9D-eFf4-ae59-3AD3b3bfc6a2\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetSamlIdpSpMetadataByIdRequest {\n ExtId = extId\n \ \ };\n try {\n GetSamlIdpSpMetadataApiResponse getSamlIdpSpMetadataApiResponse\ \ = sAMLIdentityProvidersApi.GetSamlIdpSpMetadataById(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /iam/v4.1.b2/authn/saml-sp-metadata: get: tags: - SAMLIdentityProviders summary: Get SP-Metadata for SAML identity provider description: Downloads SP-Metadata for SAML identity provider. operationId: getSamlSpMetadata responses: "200": description: SP-Metadata for SAML identity provider downloaded. content: text/xml: schema: type: string format: byte "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/saml-sp-metadata Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/saml-sp-metadata Get operation x-permissions: operationName: View SP Metadata For SAML IdP deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.iam.java.client.ApiClient; import com.nutanix.iam.java.client.api.SAMLIdentityProvidersApi; import com.nutanix.dp1.iam.iam.v4.request.SAMLIdentityProviders.GetSamlSpMetadataRequest; import com.nutanix.dp1.iam.iam.v4.authn.GetSamlSpMetadataApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. SAMLIdentityProvidersApi sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(apiClient); try { // Pass in parameters using the request builder object associated with the operation. GetSamlSpMetadataApiResponse getSamlSpMetadataApiResponse = sAMLIdentityProvidersApi.getSamlSpMetadata(GetSamlSpMetadataRequest.builder() .build()); System.out.println(getSamlSpMetadataApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, SAMLIdentityProvidersApi } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(apiClientInstance); function sample() { sAMLIdentityProvidersApi.getSamlSpMetadata().then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_iam_py_client if __name__ == "__main__": # Configure the client config = ntnx_iam_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_iam_py_client.ApiClient(configuration=config) s_aml_identity_providers_api = ntnx_iam_py_client.SAMLIdentityProvidersApi(api_client=client) try: api_response = s_aml_identity_providers_api.get_saml_sp_metadata() print(api_response) except ntnx_iam_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/samlidentityproviders" ) var ( ApiClientInstance *client.ApiClient SAMLIdentityProvidersServiceApiInstance *api.SAMLIdentityProvidersServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. SAMLIdentityProvidersServiceApiInstance = api.NewSAMLIdentityProvidersServiceApi(ApiClientInstance) ctx := context.Background() request := samlidentityproviders.GetSamlSpMetadataRequest{ } response, error := SAMLIdentityProvidersServiceApiInstance.GetSamlSpMetadata(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import.) fmt.Println(data) } - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/saml-sp-metadata" \ --header 'Accept: text/xml' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: text/xml' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/saml-sp-metadata" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n SAMLIdentityProvidersApi\ \ sAMLIdentityProvidersApi = new SAMLIdentityProvidersApi(client);\n\n\n\ \ try {\n GetSamlSpMetadataApiResponse getSamlSpMetadataApiResponse\ \ = sAMLIdentityProvidersApi.GetSamlSpMetadata();\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /iam/v4.1.b2/authn/user-groups: get: tags: - UserGroups summary: List user groups description: Lists all user group(s). operationId: listUserGroups parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$filter=createdBy\ \ eq '390b7801-7a80-5c94-8a07-8de63651b27b'" - name: distinguishedName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$filter=distinguishedName\ \ eq 'cn=Grp123,cn=users,dc=domain1,dc=com'" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$filter=extId\ \ eq 'a0469b2b-6bc3-4d9a-ad5f-9f7529b07a77'" - name: groupType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$filter=groupType\ \ eq Iam.Authn.GroupType'SAML'" - name: idpId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$filter=idpId\ \ eq 'e5f39f94-0097-4247-975a-e9ac471739b5'" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$filter=name\ \ eq 'grp123'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$orderby=createdTime" - name: distinguishedName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$orderby=distinguishedName" - name: groupType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$orderby=groupType" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$orderby=lastUpdatedTime" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$orderby=name" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$select=createdBy" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$select=createdTime" - name: distinguishedName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$select=distinguishedName" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$select=extId" - name: groupType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$select=groupType" - name: idpId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$select=idpId" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$select=lastUpdatedTime" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/user-groups?$select=name" responses: "200": description: Returns a list of user group(s). content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserGroup' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups Get operation x-permissions: operationName: View User Group deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Backup Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.UserGroupsApi;\nimport com.nutanix.dp1.iam.iam.v4.request.UserGroups.ListUserGroupsRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.ListUserGroupsApiResponse;\nimport\ \ org.springframework.web.client.RestClientException;\n\npublic class JavaSdkSample\ \ {\n public static void main(String[] args) {\n // Configure\ \ the client\n ApiClient apiClient = new ApiClient();\n //\ \ IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ UserGroupsApi userGroupsApi = new UserGroupsApi(apiClient);\n\n \ \ \n int page = 0;\n \n int limit = 50;\n\n \ \ try {\n // Pass in parameters using the request builder\ \ object associated with the operation.\n ListUserGroupsApiResponse\ \ listUserGroupsApiResponse = userGroupsApi.listUserGroups(ListUserGroupsRequest.builder()\n\ \ .$page(page)\n .$limit(limit)\n \ \ .$filter(null)\n .$orderby(null)\n \ \ .$select(null)\n .build());\n\n System.out.println(listUserGroupsApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, UserGroupsApi } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let userGroupsApi = new UserGroupsApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$select"] = "string_sample_data"; userGroupsApi.listUserGroups(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n user_groups_api\ \ = ntnx_iam_py_client.UserGroupsApi(api_client=client)\n \n page\ \ = 0\n \n limit = 50\n\n\n try:\n api_response = user_groups_api.list_user_groups(_page=page,\ \ _limit=limit)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/usergroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n UserGroupsServiceApiInstance\ \ *api.UserGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance =\ \ client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ UserGroupsServiceApiInstance = api.NewUserGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := usergroups.ListUserGroupsRequest{ Page_: &page_,\ \ Limit_: &limit_, Filter_: nil, Orderby_: nil, Select_: nil }\n response,\ \ error := UserGroupsServiceApiInstance.ListUserGroups(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().([]import1.UserGroup)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/user-groups?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/user-groups?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UserGroupsApi userGroupsApi\ \ = new UserGroupsApi(client);\n\n int page = 0;\n int limit =\ \ 50;\n String filter = \"string_sample_data\";\n String orderby\ \ = \"string_sample_data\";\n String select = \"string_sample_data\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ListUserGroupsRequest {\n Page = page,\n Limit\ \ = limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Select = select\n };\n try {\n ListUserGroupsApiResponse\ \ listUserGroupsApiResponse = userGroupsApi.ListUserGroups(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" post: tags: - UserGroups summary: Create user group description: Creates a user group. operationId: createUserGroup requestBody: description: "Information for the create user group request. It includes fields\ \ like name, groupType, idpId, etc." content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserGroup' required: true responses: "201": description: User group created. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserGroup' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups Post operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups Post operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups Post operation x-permissions: operationName: Create User Group deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Project Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 5 timeUnit: seconds - type: XLarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.iam.java.client.ApiClient; import com.nutanix.iam.java.client.api.UserGroupsApi; import com.nutanix.dp1.iam.iam.v4.request.UserGroups.CreateUserGroupRequest; import com.nutanix.dp1.iam.iam.v4.authn.UserGroup; import com.nutanix.dp1.iam.iam.v4.authn.CreateUserGroupApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. UserGroupsApi userGroupsApi = new UserGroupsApi(apiClient); UserGroup userGroup = new UserGroup(); // UserGroup object initializations here... try { // Pass in parameters using the request builder object associated with the operation. CreateUserGroupApiResponse createUserGroupApiResponse = userGroupsApi.createUserGroup(CreateUserGroupRequest.builder() .build(), userGroup); System.out.println(createUserGroupApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, UserGroupsApi, UserGroup } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let userGroupsApi = new UserGroupsApi(apiClientInstance); function sample() { let userGroup = new UserGroup(); // UserGroup object initializations here... userGroup = JSON.stringify(userGroup); userGroupsApi.createUserGroup(userGroup).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_iam_py_client if __name__ == "__main__": # Configure the client config = ntnx_iam_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_iam_py_client.ApiClient(configuration=config) user_groups_api = ntnx_iam_py_client.UserGroupsApi(api_client=client) userGroup = ntnx_iam_py_client.UserGroup() # UserGroup object initializations here... try: api_response = user_groups_api.create_user_group(body=userGroup) print(api_response) except ntnx_iam_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/usergroups" import1 "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn" ) var ( ApiClientInstance *client.ApiClient UserGroupsServiceApiInstance *api.UserGroupsServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. UserGroupsServiceApiInstance = api.NewUserGroupsServiceApi(ApiClientInstance) ctx := context.Background() userGroup := import1.NewUserGroup() // UserGroup object initializations here... request := usergroups.CreateUserGroupRequest{ Body: userGroup } response, error := UserGroupsServiceApiInstance.CreateUserGroup(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import1.UserGroup) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authn/user-groups" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"groupType":"$UNKNOWN","idpId":"string","name":"grp123","distinguishedName":"cn=Grp123,cn=users,dc=domain1,dc=com","createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","$objectType":"iam.v4.authn.UserGroup"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"groupType":"$UNKNOWN","idpId":"string","name":"grp123","distinguishedName":"cn=Grp123,cn=users,dc=domain1,dc=com","createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","$objectType":"iam.v4.authn.UserGroup"} \ - "https://host:port/api/iam/v4.1.b2/authn/user-groups" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UserGroupsApi userGroupsApi\ \ = new UserGroupsApi(client);\n\n UserGroup userGroup = new UserGroup();\n\ \n // UserGroup object initializations here...\n\n\n // Create\ \ request object with parameters\n var request = new CreateUserGroupRequest\ \ {\n Body = userGroup\n };\n try {\n \ \ CreateUserGroupApiResponse createUserGroupApiResponse = userGroupsApi.CreateUserGroup(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /iam/v4.1.b2/authn/user-groups/{extId}: get: tags: - UserGroups summary: Get user group description: Displays a user group based on the provided external identifier. operationId: getUserGroupById parameters: - name: extId in: path description: External identifier of the user group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: eb034bf9-3c7a-45ef-8dcc-c6e3c4ea828f responses: "200": description: Displays a user group. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserGroup' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups/{extId}\ \ Get operation" x-permissions: operationName: View User Group deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Backup Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.UserGroupsApi;\nimport com.nutanix.dp1.iam.iam.v4.request.UserGroups.GetUserGroupByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.GetUserGroupApiResponse;\nimport\ \ org.springframework.web.client.RestClientException;\n\npublic class JavaSdkSample\ \ {\n public static void main(String[] args) {\n // Configure\ \ the client\n ApiClient apiClient = new ApiClient();\n //\ \ IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ UserGroupsApi userGroupsApi = new UserGroupsApi(apiClient);\n\n \ \ \n String extId = \"dA4DE58f-cDE7-a711-f58E-18E43aC72e01\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n GetUserGroupApiResponse\ \ getUserGroupApiResponse = userGroupsApi.getUserGroupById(GetUserGroupByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n\n \ \ System.out.println(getUserGroupApiResponse.toString());\n\n }\ \ catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, UserGroupsApi } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let userGroupsApi = new UserGroupsApi(apiClientInstance);\n\nfunction sample()\ \ {\n\n \n let extId = \"c1aE7aEc-cedB-cDD9-ED34-6bdACecDdCfC\";\n\ \n\n\n\n\n userGroupsApi.getUserGroupById(extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n user_groups_api\ \ = ntnx_iam_py_client.UserGroupsApi(api_client=client)\n \n ext_id\ \ = \"C0334e49-Fa9E-dD2A-a9A6-a756D0Cffeff\"\n\n\n try:\n api_response\ \ = user_groups_api.get_user_group_by_id(extId=ext_id)\n print(api_response)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/usergroups\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n UserGroupsServiceApiInstance\ \ *api.UserGroupsServiceApi\n)\n\nfunc main() {\n ApiClientInstance =\ \ client.NewApiClient()\n // IPv4/IPv6 address or FQDN of the cluster\n\ \ ApiClientInstance.Host = \"localhost\"\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ ApiClientInstance.Port = 9440\n // Interval in ms to use during\ \ retry attempts\n ApiClientInstance.RetryInterval = 5 * time.Second\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ ApiClientInstance.MaxRetryAttempts = 5\n // UserName to connect\ \ to the cluster\n ApiClientInstance.Username = \"username\"\n //\ \ Password to connect to the cluster\n ApiClientInstance.Password = \"\ password\"\n // Please add authorization information here if needed.\n\ \ UserGroupsServiceApiInstance = api.NewUserGroupsServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"Aa2c2d1A-1E9B-0A4c-faCe-caD2Ca028eBf\"\ \n\n\n request := usergroups.GetUserGroupByIdRequest{ ExtId: &extId }\n\ \ response, error := UserGroupsServiceApiInstance.GetUserGroupById(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.UserGroup)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/user-groups/d4eDd5dc-8F3a-bacF-e5aa-8BCF5e8A6BdD" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/user-groups/Ff2Df5AA-C0a5-ff3F-fcEb-CF1cceaAa734" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UserGroupsApi userGroupsApi\ \ = new UserGroupsApi(client);\n\n String extId = \"5e3E9fCb-5afc-19Bc-f1fB-DADecEE1f2aB\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetUserGroupByIdRequest {\n ExtId = extId\n };\n\ \ try {\n GetUserGroupApiResponse getUserGroupApiResponse\ \ = userGroupsApi.GetUserGroupById(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" delete: tags: - UserGroups summary: Delete user group description: Deletes a user group based on the provided external identifier. operationId: deleteUserGroupById parameters: - name: extId in: path description: External identifier of the user group. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: bf5b2879-a3d4-4745-8376-c7640a93524e - name: If-Match in: header description: | The If-Match request header makes the request conditional. When not provided the server will respond with an HTTP 428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP 412 (Precondition Failed) response required: true style: simple explode: false schema: type: string example: string responses: "204": description: Requested user group deleted. content: application/json: {} "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups/{extId}\ \ Delete operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups/{extId}\ \ Delete operation" x-permissions: operationName: Delete User Group deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 5 timeUnit: seconds - type: XLarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" /iam/v4.1.b2/authn/users/{userExtId}/keys: get: tags: - Users summary: List keys for the user description: List all keys identified by the external identifier of a user. operationId: listUserKeys parameters: - name: userExtId in: path description: External identifier of a user of type service account. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: a7ec66c2-ef45-4a46-bf82-fce95e50152e - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: assignedTo example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$filter=assignedTo\ \ eq 'user2'" - name: creationType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$filter=creationType\ \ eq Iam.Authn.CreationType'PREDEFINED'" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$filter=extId\ \ eq 'a0469b2b-6bc3-4d9a-ad5f-9f7529b07a77'" - name: keyType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$filter=keyType\ \ eq Iam.Authn.KeyKind'API_KEY'" - name: lastUpdatedBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$filter=lastUpdatedBy\ \ eq '6998ae22-718d-48d5-9e93-44eb7d1a35b5'" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$filter=name\ \ eq 'ApiKey1'" - name: status example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$filter=status\ \ eq Iam.Authn.KeyStatus'VALID'" - name: tenantId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$filter=tenantId\ \ eq 'b80f638f-e35d-495e-b5e1-f88849683e24'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: assignedTo example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$orderby=assignedTo" - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$orderby=createdBy" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$orderby=createdTime" - name: expiryTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$orderby=expiryTime" - name: keyType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$orderby=keyType" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$orderby=lastUpdatedTime" - name: lastUsedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$orderby=lastUsedTime" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$orderby=name" - name: status example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$orderby=status" - name: tenantId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$orderby=tenantId" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: assignedTo example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=assignedTo" - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=createdBy" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=createdTime" - name: creationType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=creationType" - name: description example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=description" - name: expiryTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=expiryTime" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=extId" - name: keyType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=keyType" - name: lastUpdatedBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=lastUpdatedBy" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=lastUpdatedTime" - name: lastUsedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=lastUsedTime" - name: name example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=name" - name: status example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=status" - name: tenantId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users/{userExtId}/keys?$select=tenantId" responses: "200": description: Returns a list of keys for a user. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.Key' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys\ \ Get operation" x-permissions: operationName: View User Key deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 15 timeUnit: seconds - type: Small count: 15 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.UsersApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Users.ListUserKeysRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.ListUserKeysApiResponse;\nimport\ \ org.springframework.web.client.RestClientException;\n\npublic class JavaSdkSample\ \ {\n public static void main(String[] args) {\n // Configure\ \ the client\n ApiClient apiClient = new ApiClient();\n //\ \ IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ UsersApi usersApi = new UsersApi(apiClient);\n\n \n String\ \ userExtId = \"D32CfBa7-FCAe-AE4f-ac4F-b39ec15bceDb\";\n \n \ \ int page = 0;\n \n int limit = 50;\n\n try {\n\ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n ListUserKeysApiResponse listUserKeysApiResponse\ \ = usersApi.listUserKeys(ListUserKeysRequest.builder()\n \ \ .userExtId(userExtId)\n .$page(page)\n \ \ .$limit(limit)\n .$filter(null)\n .$orderby(null)\n\ \ .$select(null)\n .build());\n\n \ \ System.out.println(listUserKeysApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, UsersApi } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let usersApi = new UsersApi(apiClientInstance);\n\nfunction sample() {\n\ \n \n let userExtId = \"8dCAbFec-EE21-5FAf-1caD-b2f2AAa2e8b1\";\n\n\ \ // Construct Optional Parameters\n var opts = {};\n opts[\"$page\"\ ] = 0;\n opts[\"$limit\"] = 50;\n opts[\"$filter\"] = \"string_sample_data\"\ ;\n opts[\"$orderby\"] = \"string_sample_data\";\n opts[\"$select\"\ ] = \"string_sample_data\";\n\n\n\n\n usersApi.listUserKeys(userExtId,\ \ opts).then(({data, response}) => {\n console.log(`API returned\ \ the following status code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n users_api\ \ = ntnx_iam_py_client.UsersApi(api_client=client)\n \n user_ext_id\ \ = \"eaCf8eC7-cFBf-dBf7-A0cb-C4afCFdA0FbF\"\n \n page = 0\n \n\ \ limit = 50\n\n\n try:\n api_response = users_api.list_user_keys(userExtId=user_ext_id,\ \ _page=page, _limit=limit)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/users\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n UsersServiceApiInstance\ \ *api.UsersServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ UsersServiceApiInstance = api.NewUsersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n userExtId := \"b1dcfDde-b7ef-f98e-6dfC-a7EBB7be6aDf\"\ \n \n page_ := 0\n \n limit_ := 50\n\n\n request := users.ListUserKeysRequest{\ \ UserExtId: &userExtId, Page_: &page_, Limit_: &limit_, Filter_: nil, Orderby_:\ \ nil, Select_: nil }\n response, error := UsersServiceApiInstance.ListUserKeys(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().([]import1.Key)\n \ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/users/70e4Bc50-3FD5-D6ae-4560-9D9DA4DBCdf1/keys?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/users/E82c7B07-aAEA-cc3e-B8da-CFBe0EC6eAec/keys?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UsersApi usersApi\ \ = new UsersApi(client);\n\n String userExtId = \"e6f2F442-3f93-3aFA-caeD-fc09EbcAde85\"\ ;\n int page = 0;\n int limit = 50;\n String filter = \"\ string_sample_data\";\n String orderby = \"string_sample_data\";\n\ \ String select = \"string_sample_data\";\n\n // Create request\ \ object with parameters\n var request = new ListUserKeysRequest\ \ {\n UserExtId = userExtId,\n Page = page,\n \ \ Limit = limit,\n Filter = filter,\n Orderby\ \ = orderby,\n Select = select\n };\n try {\n \ \ ListUserKeysApiResponse listUserKeysApiResponse = usersApi.ListUserKeys(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" post: tags: - Users summary: Create a key of the requested key type for a user description: Create key of a requested type for a user. operationId: createUserKey parameters: - name: userExtId in: path description: External identifier of a user of type service account. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 8a3e510c-d693-42ea-a7c4-39802a36a748 requestBody: description: Create key of a requested type for a user. content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.Key' required: true responses: "201": description: Created key of the requested type. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.Key' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys\ \ Post operation" x-permissions: operationName: Create User Key deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 15 timeUnit: seconds - type: Small count: 15 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.UsersApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Users.CreateUserKeyRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.KeyKind;\nimport com.nutanix.dp1.iam.iam.v4.authn.Key;\n\ import com.nutanix.dp1.iam.iam.v4.authn.CreateKeyApiResponse;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ UsersApi usersApi = new UsersApi(apiClient);\n\n Key key = new\ \ Key();\n\n // Key object initializations here...\n key.setKeyType(KeyKind.UNKNOWN);\ \ // required field\n key.setName(\"ApiKey1\"); // required field\n\ \ \n String userExtId = \"eBbe2e1f-CA01-6fBC-90ca-dAF4EC77c62a\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n CreateKeyApiResponse\ \ createKeyApiResponse = usersApi.createUserKey(CreateUserKeyRequest.builder()\n\ \ .userExtId(userExtId)\n .build(), key);\n\ \n System.out.println(createKeyApiResponse.toString());\n\n \ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, UsersApi, KeyKind, Key } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let usersApi = new UsersApi(apiClientInstance);\n\nfunction sample() {\n\ \ let key = new Key();\n\n // Key object initializations here...\n\ \ key.setKeyType(KeyKind.UNKNOWN); // required field\n key.setName(\"\ ApiKey1\"); // required field\n key = JSON.stringify(key);\n\n \n\ \ let userExtId = \"6FbfC5B5-9da8-8aDE-6eFb-BBbA0C9cdbd1\";\n\n\n\n\n\ \n usersApi.createUserKey(userExtId, key).then(({data, response}) =>\ \ {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n users_api\ \ = ntnx_iam_py_client.UsersApi(api_client=client)\n key = ntnx_iam_py_client.Key()\n\ \n # Key object initializations here...\n key.key_type = ntnx_iam_py_client.KeyKind._UNKNOWN\ \ # required field\n key.name = \"ApiKey1\" # required field\n \n\ \ user_ext_id = \"aCE11eeF-C8ac-FDe1-FDE7-A4bF0A2Fc8CF\"\n\n\n try:\n\ \ api_response = users_api.create_user_key(userExtId=user_ext_id,\ \ body=key)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/users\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n UsersServiceApiInstance\ \ *api.UsersServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ UsersServiceApiInstance = api.NewUsersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n key := import1.NewKey()\n\n //\ \ Key object initializations here...\n\n \n userExtId := \"5e9dADB8-dDfC-b0fA-91Be-e24aF7cE2e1A\"\ \n\n\n request := users.CreateUserKeyRequest{ UserExtId: &userExtId,\ \ Body: key }\n response, error := UsersServiceApiInstance.CreateUserKey(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.Key)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authn/users/CF3DEA4E-8CED-c1ad-bd0D-6bacB47CbbFF/keys" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"name":"ApiKey1","description":"ApiKeyforbackendapplication","keyType":"$UNKNOWN","createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedBy":"string","creationType":"$UNKNOWN","expiryTime":"2015-07-20T15:49:04-07:00","status":"$UNKNOWN","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","lastUpdatedTime":"2015-07-20T15:49:04-07:00","assignedTo":"user2","lastUsedTime":"2015-07-20T15:49:04-07:00","keyDetails":{"apiKey":"string","$objectType":"iam.v4.authn.ApiKeyDetails"},"$objectType":"iam.v4.authn.Key"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"name":"ApiKey1","description":"ApiKeyforbackendapplication","keyType":"$UNKNOWN","createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedBy":"string","creationType":"$UNKNOWN","expiryTime":"2015-07-20T15:49:04-07:00","status":"$UNKNOWN","createdBy":"390b7801-7a80-5c94-8a07-8de63651b27b","lastUpdatedTime":"2015-07-20T15:49:04-07:00","assignedTo":"user2","lastUsedTime":"2015-07-20T15:49:04-07:00","keyDetails":{"apiKey":"string","$objectType":"iam.v4.authn.ApiKeyDetails"},"$objectType":"iam.v4.authn.Key"} \ - "https://host:port/api/iam/v4.1.b2/authn/users/FcbfBbfe-eeDF-B01D-B11e-Af99BFfF4D85/keys" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UsersApi usersApi\ \ = new UsersApi(client);\n\n Key key = new Key();\n\n // Key\ \ object initializations here...\n key.KeyType = KeyKind.UNKNOWN; \ \ // required field\n key.Name = \"ApiKey1\"; // required field\n\n\ \ String userExtId = \"6FDaaE1E-3bA6-53ED-FC15-7DdcffF23cFF\";\n\n\ \ // Create request object with parameters\n var request =\ \ new CreateUserKeyRequest {\n UserExtId = userExtId,\n \ \ Body = key\n };\n try {\n CreateKeyApiResponse\ \ createKeyApiResponse = usersApi.CreateUserKey(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /iam/v4.1.b2/authn/users/{userExtId}/keys/{extId}: get: tags: - Users summary: Get the requested key description: Fetches the requested key through the provided external identifier for the user and the key. operationId: getUserKeyById parameters: - name: userExtId in: path description: External identifier of a user of type service account. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 6cadad17-6703-4d94-b215-9fa0ee1b3ab8 - name: extId in: path description: External identifier of the key. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 3d3e69a4-d297-4292-880c-6113981700b5 responses: "200": description: Returns requested key. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.Key' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys/{extId}\ \ Get operation" x-permissions: operationName: View User Key deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 15 timeUnit: seconds - type: Small count: 15 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.UsersApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Users.GetUserKeyByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.GetUserKeyApiResponse;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ UsersApi usersApi = new UsersApi(apiClient);\n\n \n String\ \ userExtId = \"bd3aAcAC-Ea2B-4fA7-fFDf-Ccb5DbA2eB3d\";\n \n \ \ String extId = \"859bCfCE-00e1-Fed1-8DdA-B6dBdCBdF7B6\";\n\n \ \ try {\n // Pass in parameters using the request builder object\ \ associated with the operation.\n GetUserKeyApiResponse getUserKeyApiResponse\ \ = usersApi.getUserKeyById(GetUserKeyByIdRequest.builder()\n \ \ .userExtId(userExtId)\n .extId(extId)\n \ \ .build());\n\n System.out.println(getUserKeyApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, UsersApi } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let usersApi = new UsersApi(apiClientInstance);\n\nfunction sample() {\n\ \n \n let userExtId = \"Dfd7EedD-BF9F-afbE-eDad-4DcF74f3adAb\";\n\ \ \n let extId = \"cb9E99fC-5ebB-f7ef-d9BE-E6056a4aFcAe\";\n\n\n\n\ \n\n usersApi.getUserKeyById(userExtId, extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n users_api\ \ = ntnx_iam_py_client.UsersApi(api_client=client)\n \n user_ext_id\ \ = \"FCaACDff-2b4F-ce1e-bbcE-cFaD93bce0EF\"\n \n ext_id = \"E4Cb7caf-eeeE-0cb1-eddb-bB61dE6c0D10\"\ \n\n\n try:\n api_response = users_api.get_user_key_by_id(userExtId=user_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/users\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n UsersServiceApiInstance\ \ *api.UsersServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ UsersServiceApiInstance = api.NewUsersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n userExtId := \"E8E5D7B2-df74-cfD3-3a7C-FCd403aA6f34\"\ \n \n extId := \"bc695BD0-A0Af-bBEE-eAfd-C5ae66b8DeCc\"\n\n\n request\ \ := users.GetUserKeyByIdRequest{ UserExtId: &userExtId, ExtId: &extId }\n\ \ response, error := UsersServiceApiInstance.GetUserKeyById(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().(import1.Key)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/users/aCBcFeAd-7EdC-AbFd-FfAA-3ebfECBcF82A/keys/19B75d24-DaDB-1eb7-Dd9d-b9DffC8c6eB4" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/users/7Ff0FF5c-5f15-d68D-EF0a-6c0dBb6Ea50a/keys/4fFBe29E-77BC-fd3c-fcAe-FDea752DFD6a" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UsersApi usersApi\ \ = new UsersApi(client);\n\n String userExtId = \"aAdA9BBB-335c-a7b8-4E9F-FCaBbCaDB2ed\"\ ;\n String extId = \"0DBecCd5-88ed-f6bB-cbb5-1C6d1aDaEF1A\";\n\n \ \ // Create request object with parameters\n var request = new\ \ GetUserKeyByIdRequest {\n UserExtId = userExtId,\n \ \ ExtId = extId\n };\n try {\n GetUserKeyApiResponse\ \ getUserKeyApiResponse = usersApi.GetUserKeyById(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" delete: tags: - Users summary: Delete the requested key description: Delete the requested key. operationId: deleteUserKeyById parameters: - name: userExtId in: path description: External identifier of a user of type service account. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 4496e289-7d58-472b-81c3-0f04ce5746f4 - name: extId in: path description: External identifier of the key. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: dd6721ff-36f3-453a-9772-0bfaf2fb32ad - name: If-Match in: header description: | The If-Match request header makes the request conditional. When not provided the server will respond with an HTTP 428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP 412 (Precondition Failed) response required: true style: simple explode: false schema: type: string example: string responses: "204": description: Deleted the requested key. content: application/json: {} "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys/{extId}\ \ Delete operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys/{extId}\ \ Delete operation" x-permissions: operationName: Delete User Key deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 15 timeUnit: seconds - type: Small count: 15 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" /iam/v4.1.b2/authn/users/{userExtId}/keys/{extId}/$actions/revoke: post: tags: - Users summary: Revoke the requested key description: Revoke the requested key. operationId: revokeUserKey parameters: - name: userExtId in: path description: External identifier of a user of type service account. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 8dcf4bef-fc17-4b56-9e13-11507c22b83f - name: extId in: path description: External identifier of the key. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: e8a3c09f-abf8-46db-b9a3-460526fb80c1 responses: "200": description: Revoked the requested key. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.AppMessage' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys/{extId}/$actions/revoke\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys/{extId}/$actions/revoke\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys/{extId}/$actions/revoke\ \ Post operation" x-permissions: operationName: Revoke User Key deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Prism Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 15 timeUnit: seconds - type: Small count: 15 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 15 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.UsersApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Users.RevokeUserKeyRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.RevokeUserKeyApiResponse;\nimport\ \ org.springframework.web.client.RestClientException;\n\npublic class JavaSdkSample\ \ {\n public static void main(String[] args) {\n // Configure\ \ the client\n ApiClient apiClient = new ApiClient();\n //\ \ IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ UsersApi usersApi = new UsersApi(apiClient);\n\n \n String\ \ userExtId = \"bE0f5322-ADe1-aC3a-Ac2F-343a99C3922E\";\n \n \ \ String extId = \"1aD8cE34-8aa8-FacB-aBfd-282DaaBd16bA\";\n\n \ \ try {\n // Pass in parameters using the request builder object\ \ associated with the operation.\n RevokeUserKeyApiResponse revokeUserKeyApiResponse\ \ = usersApi.revokeUserKey(RevokeUserKeyRequest.builder()\n \ \ .userExtId(userExtId)\n .extId(extId)\n \ \ .build());\n\n System.out.println(revokeUserKeyApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, UsersApi } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let usersApi = new UsersApi(apiClientInstance);\n\nfunction sample() {\n\ \n \n let userExtId = \"cfAE7FcF-0e5A-dB94-f34B-eBcde22Bda8b\";\n\ \ \n let extId = \"AbbCbffe-0FC1-f8ac-DDFb-d30646bbABbD\";\n\n\n\n\ \n\n usersApi.revokeUserKey(userExtId, extId).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n users_api\ \ = ntnx_iam_py_client.UsersApi(api_client=client)\n \n user_ext_id\ \ = \"eEF8A6BB-77bd-2aEF-d29e-b9AbCc6120b0\"\n \n ext_id = \"3373c1AD-a325-BDee-a2Ea-57df1EcaDfae\"\ \n\n\n try:\n api_response = users_api.revoke_user_key(userExtId=user_ext_id,\ \ extId=ext_id)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/users\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/error\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n UsersServiceApiInstance\ \ *api.UsersServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ UsersServiceApiInstance = api.NewUsersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n userExtId := \"5dCfCcAf-AFdd-fe3c-e90B-ECB0ACEacBC0\"\ \n \n extId := \"EA8a75FB-af2b-BfEb-2e7f-Cee4EdF2FEfC\"\n\n\n request\ \ := users.RevokeUserKeyRequest{ UserExtId: &userExtId, ExtId: &extId }\n\ \ response, error := UsersServiceApiInstance.RevokeUserKey(ctx, &request)\n\ \ if error != nil {\n fmt.Println(error)\n return\n \ \ }\n data, _ := response.GetData().(import1.AppMessage)\n fmt.Println(data)\n\ \n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authn/users/eAEc3Aac-f9d8-FFdE-212C-1CBd94DEdFbc/keys/87Cead0F-2Dff-8cAa-aAf0-1bf64Dac8BEb/$actions/revoke" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/users/ff7667DD-ebaF-C2F3-FEE4-4AFcCEDbe728/keys/DdD2ab85-caFB-eaEd-F5B2-0eccFFFafCcf/$actions/revoke" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UsersApi usersApi\ \ = new UsersApi(client);\n\n String userExtId = \"fc1C9fDa-C4bd-3ecc-AEdC-DeEEAcDFDFeC\"\ ;\n String extId = \"BAF44f0e-AFbC-1dEA-b8Dc-E1A0bDbbe3B9\";\n\n \ \ // Create request object with parameters\n var request = new\ \ RevokeUserKeyRequest {\n UserExtId = userExtId,\n \ \ ExtId = extId\n };\n try {\n RevokeUserKeyApiResponse\ \ revokeUserKeyApiResponse = usersApi.RevokeUserKey(request);\n }\ \ catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /iam/v4.1.b2/authn/users: get: tags: - Users summary: List user(s) description: Returns a list of all non-internal user(s) in the system. operationId: listUsers parameters: - name: $page in: query description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. required: false style: form explode: false schema: minimum: 0 type: integer description: | A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. format: int32 default: 0 - name: $limit in: query description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. required: false style: form explode: false schema: maximum: 100 minimum: 1 type: integer description: | A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. format: int32 default: 50 - name: $filter in: query description: |- A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$filter=createdBy\ \ eq '92643232-aead-4c60-89c1-0658dade26ab'" - name: creationType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$filter=creationType\ \ eq Iam.Authn.CreationType'PREDEFINED'" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$filter=displayName\ \ eq 'john jane doe'" - name: emailId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$filter=emailId\ \ eq 'john.doe@example.com'" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$filter=extId\ \ eq 'a0469b2b-6bc3-4d9a-ad5f-9f7529b07a77'" - name: firstName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$filter=firstName\ \ eq 'john'" - name: idpId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$filter=idpId\ \ eq 'b4516d6f-dd2c-4f3d-a656-b5ec447f5df8'" - name: lastName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$filter=lastName\ \ eq 'doe'" - name: lastUpdatedBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$filter=lastUpdatedBy\ \ eq '0b4c4925-da2d-414a-a0ee-df12f9c1c791'" - name: status example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$filter=status\ \ eq Iam.Authn.UserStatusType'ACTIVE'" - name: userType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$filter=userType\ \ eq Iam.Authn.UserType'LOCAL'" - name: username example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$filter=username\ \ eq 'john_doe'" - name: $orderby in: query description: "A URL query parameter that allows clients to specify the sort\ \ criteria for the returned list of objects. Resources can be sorted in\ \ ascending order using asc or descending order using desc. If asc or desc\ \ are not specified, the resources will be sorted in ascending order by\ \ default. For example, '$orderby=templateName desc' would get all templates\ \ sorted by templateName in descending order." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$orderby=createdTime" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$orderby=displayName" - name: emailId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$orderby=emailId" - name: firstName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$orderby=firstName" - name: lastLoginTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$orderby=lastLoginTime" - name: lastName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$orderby=lastName" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$orderby=lastUpdatedTime" - name: userType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$orderby=userType" - name: username example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$orderby=username" - name: $select in: query description: "A URL query parameter that allows clients to request a specific\ \ set of properties for each entity or complex type. Expression specified\ \ with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html)\ \ URL conventions. If a $select expression consists of a single select item\ \ that is an asterisk (i.e., *), then all properties on the matching resource\ \ will be returned." required: false style: form explode: true schema: type: string example: string x-odata-fields: - name: createdBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=createdBy" - name: createdTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=createdTime" - name: creationType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=creationType" - name: defaultLandingPagePath example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=defaultLandingPagePath" - name: description example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=description" - name: displayName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=displayName" - name: emailId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=emailId" - name: extId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=extId" - name: firstName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=firstName" - name: idpId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=idpId" - name: isForceResetPasswordEnabled example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=isForceResetPasswordEnabled" - name: lastLoginTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=lastLoginTime" - name: lastName example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=lastName" - name: lastUpdatedBy example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=lastUpdatedBy" - name: lastUpdatedTime example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=lastUpdatedTime" - name: locale example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=locale" - name: middleInitial example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=middleInitial" - name: region example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=region" - name: status example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=status" - name: tenantId example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=tenantId" - name: userType example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=userType" - name: username example: "https://{host}:{port}/api/iam/v4.1.b2/authn/users?$select=username" responses: "200": description: Returns a list of user(s). content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.User' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/users Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/users Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/users Get operation x-permissions: operationName: View User deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Backup Admin - name: Nutanix Central Admin - name: Secure Policy Editor - name: Secure Policy Admin - name: Secure Policy Viewer x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.UsersApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Users.ListUsersRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.ListUsersApiResponse;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ UsersApi usersApi = new UsersApi(apiClient);\n\n \n int\ \ page = 0;\n \n int limit = 50;\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n ListUsersApiResponse listUsersApiResponse\ \ = usersApi.listUsers(ListUsersRequest.builder()\n .$page(page)\n\ \ .$limit(limit)\n .$filter(null)\n \ \ .$orderby(null)\n .$select(null)\n \ \ .build());\n\n System.out.println(listUsersApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: |2 import { ApiClient, UsersApi } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let usersApi = new UsersApi(apiClientInstance); function sample() { // Construct Optional Parameters var opts = {}; opts["$page"] = 0; opts["$limit"] = 50; opts["$filter"] = "string_sample_data"; opts["$orderby"] = "string_sample_data"; opts["$select"] = "string_sample_data"; usersApi.listUsers(opts).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n users_api\ \ = ntnx_iam_py_client.UsersApi(api_client=client)\n \n page = 0\n\ \ \n limit = 50\n\n\n try:\n api_response = users_api.list_users(_page=page,\ \ _limit=limit)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/users\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n UsersServiceApiInstance\ \ *api.UsersServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ UsersServiceApiInstance = api.NewUsersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n page_ := 0\n \n limit_\ \ := 50\n\n\n request := users.ListUsersRequest{ Page_: &page_, Limit_:\ \ &limit_, Filter_: nil, Orderby_: nil, Select_: nil }\n response, error\ \ := UsersServiceApiInstance.ListUsers(ctx, &request)\n if error != nil\ \ {\n fmt.Println(error)\n return\n }\n data, _ := response.GetData().([]import1.User)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/users?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/users?$filter=string_sample_data&$limit=50&$orderby=string_sample_data&$page=0&$select=string_sample_data" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UsersApi usersApi\ \ = new UsersApi(client);\n\n int page = 0;\n int limit = 50;\n\ \ String filter = \"string_sample_data\";\n String orderby = \"\ string_sample_data\";\n String select = \"string_sample_data\";\n\n\ \ // Create request object with parameters\n var request =\ \ new ListUsersRequest {\n Page = page,\n Limit =\ \ limit,\n Filter = filter,\n Orderby = orderby,\n\ \ Select = select\n };\n try {\n ListUsersApiResponse\ \ listUsersApiResponse = usersApi.ListUsers(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" post: tags: - Users summary: Create user description: Creates a user of the type specified in the request. operationId: createUser requestBody: description: "Information for create user request. It includes details like\ \ username, password, userType, emailId, etc." content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.User' required: true responses: "201": description: User created. headers: Location: style: simple explode: false schema: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\\ ?[^#\\s]*)?(#[^\\s]*)?$" type: string description: Indicates the target of a redirection or the URL of a newly created resource. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.User' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/users Post operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/users Post operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/users Post operation x-permissions: operationName: Create User deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Project Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.iam.java.client.ApiClient; import com.nutanix.iam.java.client.api.UsersApi; import com.nutanix.dp1.iam.iam.v4.request.Users.CreateUserRequest; import com.nutanix.dp1.iam.iam.v4.authn.User; import com.nutanix.dp1.iam.iam.v4.authn.CreateUserApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. UsersApi usersApi = new UsersApi(apiClient); User user = new User(); // User object initializations here... try { // Pass in parameters using the request builder object associated with the operation. CreateUserApiResponse createUserApiResponse = usersApi.createUser(CreateUserRequest.builder() .build(), user); System.out.println(createUserApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, UsersApi, User } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let usersApi = new UsersApi(apiClientInstance); function sample() { let user = new User(); // User object initializations here... user = JSON.stringify(user); usersApi.createUser(user).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_iam_py_client if __name__ == "__main__": # Configure the client config = ntnx_iam_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_iam_py_client.ApiClient(configuration=config) users_api = ntnx_iam_py_client.UsersApi(api_client=client) user = ntnx_iam_py_client.User() # User object initializations here... try: api_response = users_api.create_user(body=user) print(api_response) except ntnx_iam_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/users" import1 "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn" ) var ( ApiClientInstance *client.ApiClient UsersServiceApiInstance *api.UsersServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. UsersServiceApiInstance = api.NewUsersServiceApi(ApiClientInstance) ctx := context.Background() user := import1.NewUser() // User object initializations here... request := users.CreateUserRequest{ Body: user } response, error := UsersServiceApiInstance.CreateUser(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import1.User) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authn/users" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"username":"john_doe","userType":"$UNKNOWN","idpId":"string","displayName":"johnjanedoe","firstName":"john","middleInitial":"jane","lastName":"doe","emailId":"john.doe@example.com","locale":"en-US","region":"en-US","password":"string","isForceResetPasswordEnabled":true,"additionalAttributes":[{"name":"string","value":"string","$objectType":"common.v1.config.KVPair"}],"status":"$UNKNOWN","bucketsAccessKeys":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"accessKeyName":"key1","secretAccessKey":"string","userId":"string","createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedBy":"string","assignedTo":"user2","creationType":"$UNKNOWN","expiryTime":"2015-07-20T15:49:04-07:00","status":"$UNKNOWN","createdBy":"string","lastUpdatedTime":"2015-07-20T15:49:04-07:00","$objectType":"iam.v4.authn.BucketsAccessKey"}],"lastLoginTime":"2015-07-20T15:49:04-07:00","createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"string","lastUpdatedBy":"string","description":"ITuser","creationType":"$UNKNOWN","defaultLandingPagePath":"/dm/applications","$objectType":"iam.v4.authn.User"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"username":"john_doe","userType":"$UNKNOWN","idpId":"string","displayName":"johnjanedoe","firstName":"john","middleInitial":"jane","lastName":"doe","emailId":"john.doe@example.com","locale":"en-US","region":"en-US","password":"string","isForceResetPasswordEnabled":true,"additionalAttributes":[{"name":"string","value":"string","$objectType":"common.v1.config.KVPair"}],"status":"$UNKNOWN","bucketsAccessKeys":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"accessKeyName":"key1","secretAccessKey":"string","userId":"string","createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedBy":"string","assignedTo":"user2","creationType":"$UNKNOWN","expiryTime":"2015-07-20T15:49:04-07:00","status":"$UNKNOWN","createdBy":"string","lastUpdatedTime":"2015-07-20T15:49:04-07:00","$objectType":"iam.v4.authn.BucketsAccessKey"}],"lastLoginTime":"2015-07-20T15:49:04-07:00","createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"string","lastUpdatedBy":"string","description":"ITuser","creationType":"$UNKNOWN","defaultLandingPagePath":"/dm/applications","$objectType":"iam.v4.authn.User"} \ - "https://host:port/api/iam/v4.1.b2/authn/users" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UsersApi usersApi\ \ = new UsersApi(client);\n\n User user = new User();\n\n // User\ \ object initializations here...\n\n\n // Create request object with\ \ parameters\n var request = new CreateUserRequest {\n \ \ Body = user\n };\n try {\n CreateUserApiResponse\ \ createUserApiResponse = usersApi.CreateUser(request);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" /iam/v4.1.b2/authn/users/$actions/change-password: post: tags: - Users summary: Change password of user description: Change Password for a user with the given username. operationId: changeUserPassword requestBody: description: "Information for change password request. It requires the username,\ \ old password and new password of the user." content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.PasswordChangeRequest' required: true responses: "200": description: Password changed. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.PasswordChangeResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/users/$actions/change-password Post operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/users/$actions/change-password Post operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/users/$actions/change-password Post operation x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 5 timeUnit: seconds - type: XLarge count: 5 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.iam.java.client.ApiClient; import com.nutanix.iam.java.client.api.UsersApi; import com.nutanix.dp1.iam.iam.v4.request.Users.ChangeUserPasswordRequest; import com.nutanix.dp1.iam.iam.v4.authn.PasswordChangeRequest; import com.nutanix.dp1.iam.iam.v4.authn.ChangeUserPasswordApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. UsersApi usersApi = new UsersApi(apiClient); PasswordChangeRequest passwordChangeRequest = new PasswordChangeRequest(); // PasswordChangeRequest object initializations here... passwordChangeRequest.setNewPassword("string_sample_data"); // required field passwordChangeRequest.setOldPassword("string_sample_data"); // required field passwordChangeRequest.setUsername("john_doe"); // required field try { // Pass in parameters using the request builder object associated with the operation. ChangeUserPasswordApiResponse changeUserPasswordApiResponse = usersApi.changeUserPassword(ChangeUserPasswordRequest.builder() .build(), passwordChangeRequest); System.out.println(changeUserPasswordApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, UsersApi, PasswordChangeRequest } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let usersApi = new UsersApi(apiClientInstance); function sample() { let passwordChangeRequest = new PasswordChangeRequest(); // PasswordChangeRequest object initializations here... passwordChangeRequest.setNewPassword("string_sample_data"); // required field passwordChangeRequest.setOldPassword("string_sample_data"); // required field passwordChangeRequest.setUsername("john_doe"); // required field passwordChangeRequest = JSON.stringify(passwordChangeRequest); usersApi.changeUserPassword(passwordChangeRequest).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_iam_py_client if __name__ == "__main__": # Configure the client config = ntnx_iam_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_iam_py_client.ApiClient(configuration=config) users_api = ntnx_iam_py_client.UsersApi(api_client=client) passwordChangeRequest = ntnx_iam_py_client.PasswordChangeRequest() # PasswordChangeRequest object initializations here... passwordChangeRequest.new_password = "string_sample_data" # required field passwordChangeRequest.old_password = "string_sample_data" # required field passwordChangeRequest.username = "john_doe" # required field try: api_response = users_api.change_user_password(body=passwordChangeRequest) print(api_response) except ntnx_iam_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/users" import1 "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn" ) var ( ApiClientInstance *client.ApiClient UsersServiceApiInstance *api.UsersServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. UsersServiceApiInstance = api.NewUsersServiceApi(ApiClientInstance) ctx := context.Background() passwordChangeRequest := import1.NewPasswordChangeRequest() // PasswordChangeRequest object initializations here... request := users.ChangeUserPasswordRequest{ Body: passwordChangeRequest } response, error := UsersServiceApiInstance.ChangeUserPassword(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import1.PasswordChangeResponse) fmt.Println(data) } - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authn/users/$actions/change-password" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"username":"john_doe","oldPassword":"string","newPassword":"string","$objectType":"iam.v4.authn.PasswordChangeRequest"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"username":"john_doe","oldPassword":"string","newPassword":"string","$objectType":"iam.v4.authn.PasswordChangeRequest"} \ - "https://host:port/api/iam/v4.1.b2/authn/users/$actions/change-password" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UsersApi usersApi\ \ = new UsersApi(client);\n\n PasswordChangeRequest passwordChangeRequest\ \ = new PasswordChangeRequest();\n\n // PasswordChangeRequest object\ \ initializations here...\n passwordChangeRequest.NewPassword = \"\ string_sample_data\"; // required field\n passwordChangeRequest.OldPassword\ \ = \"string_sample_data\"; // required field\n passwordChangeRequest.Username\ \ = \"john_doe\"; // required field\n\n\n // Create request object\ \ with parameters\n var request = new ChangeUserPasswordRequest {\n\ \ Body = passwordChangeRequest\n };\n try {\n \ \ ChangeUserPasswordApiResponse changeUserPasswordApiResponse\ \ = usersApi.ChangeUserPassword(request);\n } catch (ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n }\n\ \ }\n}\n" /iam/v4.1.b2/authn/users/{extId}: get: tags: - Users summary: Get user description: Fetches a user based on its external identifier. operationId: getUserById parameters: - name: extId in: path description: External identifier of a user. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 3e2e903a-712b-403c-81c0-12208412dd6d responses: "200": description: Returns the requested user. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.User' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}\ \ Get operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}\ \ Get operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}\ \ Get operation" x-permissions: operationName: View User deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Prism Viewer - name: Project Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Backup Admin - name: Nutanix Central Admin - name: Secure Policy Editor - name: Secure Policy Admin - name: Secure Policy Viewer x-rate-limit: - type: xsmall count: 10 timeUnit: seconds - type: Small count: 10 timeUnit: seconds - type: Large count: 15 timeUnit: seconds - type: XLarge count: 20 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.UsersApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Users.GetUserByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.GetUserApiResponse;\nimport org.springframework.web.client.RestClientException;\n\ \npublic class JavaSdkSample {\n public static void main(String[] args)\ \ {\n // Configure the client\n ApiClient apiClient = new\ \ ApiClient();\n // IPv4/IPv6 address or FQDN of the cluster\n \ \ apiClient.setHost(\"localhost\");\n // Port used for the connection.\ \ PC products typically use port 9440, while NC products typically use port\ \ 443. See the product-specific documentation for accurate configuration.\n\ \ apiClient.setPort(9440);\n // Interval in ms to use during\ \ retry attempts\n apiClient.setRetryInterval(5000);\n //\ \ Max retry attempts while reconnecting on a loss of connection\n \ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect to\ \ the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ UsersApi usersApi = new UsersApi(apiClient);\n\n \n String\ \ extId = \"cedC3BCF-Fe5D-6cFf-aaD2-eF27dbeE5bbe\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n GetUserApiResponse getUserApiResponse\ \ = usersApi.getUserById(GetUserByIdRequest.builder()\n .extId(extId)\n\ \ .build());\n\n System.out.println(getUserApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, UsersApi } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let usersApi = new UsersApi(apiClientInstance);\n\nfunction sample() {\n\ \n \n let extId = \"f3dafcaC-508C-cCBE-a24A-AbED06F1bBbc\";\n\n\n\n\ \n\n usersApi.getUserById(extId).then(({data, response}) => {\n \ \ console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n users_api\ \ = ntnx_iam_py_client.UsersApi(api_client=client)\n \n ext_id = \"\ 8EF4bFE0-F84B-9a82-bf7B-Fe36Cf0d60D2\"\n\n\n try:\n api_response\ \ = users_api.get_user_by_id(extId=ext_id)\n print(api_response)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/users\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n UsersServiceApiInstance\ \ *api.UsersServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ UsersServiceApiInstance = api.NewUsersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n \n extId := \"5Fd4Ad7e-E71D-bCC1-CbD5-B1caB5EbCcDc\"\ \n\n\n request := users.GetUserByIdRequest{ ExtId: &extId }\n response,\ \ error := UsersServiceApiInstance.GetUserById(ctx, &request)\n if error\ \ != nil {\n fmt.Println(error)\n return\n }\n data,\ \ _ := response.GetData().(import1.User)\n fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/users/1ad2edfb-ECFc-2DA3-E2cD-fe65ABEaDe07" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/users/fBc6d32F-db82-74cD-fE9C-eDE9C3BfCA5d" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UsersApi usersApi\ \ = new UsersApi(client);\n\n String extId = \"034dA5ac-f5Ef-FCab-c4ee-eCABEDdd4f3C\"\ ;\n\n // Create request object with parameters\n var request\ \ = new GetUserByIdRequest {\n ExtId = extId\n };\n \ \ try {\n GetUserApiResponse getUserApiResponse = usersApi.GetUserById(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - Users summary: Update user description: Updates a user based on the provided external identifier. operationId: updateUserById parameters: - name: extId in: path description: External identifier of a user. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 9500eb7f-5d07-4b0b-a493-b5c166365aa0 - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string requestBody: description: "Information for updating the user request. It can be used to\ \ update fields like displayName, firstName, lastName, email, etc. The username\ \ and userType fields cannot be updated." content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.User' required: true responses: "200": description: User updated. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.User' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}\ \ Put operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}\ \ Put operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}\ \ Put operation" x-permissions: operationName: Update User deploymentList: - ON_PREM - CLOUD roleList: - name: Prism Admin - name: Project Manager - deprecated: true name: Self-Service Admin - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.UsersApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Users.UpdateUserByIdRequest;\n\ import com.nutanix.dp1.iam.iam.v4.request.Users.GetUserByIdRequest;\nimport\ \ java.util.HashMap;\nimport org.apache.http.HttpHeaders;\nimport com.nutanix.dp1.iam.iam.v4.authn.User;\n\ import com.nutanix.dp1.iam.iam.v4.authn.GetUserApiResponse;\nimport com.nutanix.dp1.iam.iam.v4.authn.UpdateUserApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ UsersApi usersApi = new UsersApi(apiClient);\n\n User user =\ \ new User();\n\n // User object initializations here...\n \ \ \n String extId = \"4DfEFB1b-0eb5-edCC-Eb2f-bFF05Fbfc7F6\";\n\n\ \ // perform GET call\n GetUserApiResponse getResponse = null;\n\ \ try {\n getResponse = usersApi.getUserById(GetUserByIdRequest.builder()\n\ \ .extId(extId)\n .build());\n } catch(RestClientException\ \ ex) {\n System.out.println(ex.getMessage());\n }\n \ \ // Extract E-Tag Header\n String eTag = ApiClient.getEtag(getResponse);\n\ \ // initialize/change parameters for update\n HashMap opts = new HashMap<>();\n opts.put(HttpHeaders.IF_MATCH,\ \ eTag);\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n UpdateUserApiResponse\ \ updateUserApiResponse = usersApi.updateUserById(UpdateUserByIdRequest.builder()\n\ \ .extId(extId)\n .build(), user, opts);\n\ \n System.out.println(updateUserApiResponse.toString());\n\n\ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, UsersApi, User, GetUserApiResponse } from \"\ @nutanix-api/iam-js-client\";\n\n// Configure the client\nlet apiClientInstance\ \ = new ApiClient();\n// IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host\ \ = 'localhost';\n// Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\napiClientInstance.port = '9440';\n\ // Max retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let usersApi = new UsersApi(apiClientInstance);\n\nfunction sample() {\n\ \ let user = new User();\n\n // User object initializations here...\n\ \ user = JSON.stringify(user);\n\n \n let extId = \"c4C6eE0D-CC6A-aEa2-2ffE-7ce9eEedB24B\"\ ;\n\n\n // Perform Get call\n usersApi.getUserById(extId).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n // Extract E-Tag Header\n \ \ let etagValue = ApiClient.getEtag(data);\n let args = {\"If-Match\"\ \ : etagValue};\n\n usersApi.updateUserById(extId, user, args).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n\ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n\ \ });\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n users_api\ \ = ntnx_iam_py_client.UsersApi(api_client=client)\n user = ntnx_iam_py_client.User()\n\ \n # User object initializations here...\n \n ext_id = \"FAAcA5de-1BeC-74AE-edd3-feFfFbcDdFeB\"\ \n\n try:\n api_response = users_api.get_user_by_id(extId=ext_id)\n\ \ except ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\ \ # Extract E-Tag Header\n etag_value = ntnx_iam_py_client.ApiClient.get_etag(api_response)\n\ \n try:\n api_response = users_api.update_user_by_id(extId=ext_id,\ \ body=user, if_match=etag_value)\n print(api_response)\n except\ \ ntnx_iam_py_client.rest.ApiException as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/users\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n UsersServiceApiInstance\ \ *api.UsersServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ UsersServiceApiInstance = api.NewUsersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n user := import1.NewUser()\n\n \ \ // User object initializations here...\n\n \n extId := \"eE97FceF-fCad-ddbF-afeB-fa6C3c6AB136\"\ \n\n getRequest := users.GetUserByIdRequest{ extId: &extId }\n getResponse,\ \ err := UsersServiceApiInstance.GetUserById(ctx, &getRequest)\n if err\ \ != nil {\n fmt.Println(err)\n return\n }\n\n // Extract\ \ E-Tag Header\n etagValue := ApiClientInstance.GetEtag(getResponse)\n\ \n args := make(map[string] interface{})\n args[\"If-Match\"] = etagValue\n\ \n request := users.UpdateUserByIdRequest{ ExtId: &extId, Body: user\ \ }\n response, error := UsersServiceApiInstance.UpdateUserById(ctx,\ \ &request, args)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.User)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/iam/v4.1.b2/authn/users/DfEbdAfB-Bd92-D0aF-aCc5-8fF56BE1F5b7" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"username":"john_doe","userType":"$UNKNOWN","idpId":"string","displayName":"johnjanedoe","firstName":"john","middleInitial":"jane","lastName":"doe","emailId":"john.doe@example.com","locale":"en-US","region":"en-US","password":"string","isForceResetPasswordEnabled":true,"additionalAttributes":[{"name":"string","value":"string","$objectType":"common.v1.config.KVPair"}],"status":"$UNKNOWN","bucketsAccessKeys":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"accessKeyName":"key1","secretAccessKey":"string","userId":"string","createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedBy":"string","assignedTo":"user2","creationType":"$UNKNOWN","expiryTime":"2015-07-20T15:49:04-07:00","status":"$UNKNOWN","createdBy":"string","lastUpdatedTime":"2015-07-20T15:49:04-07:00","$objectType":"iam.v4.authn.BucketsAccessKey"}],"lastLoginTime":"2015-07-20T15:49:04-07:00","createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"string","lastUpdatedBy":"string","description":"ITuser","creationType":"$UNKNOWN","defaultLandingPagePath":"/dm/applications","$objectType":"iam.v4.authn.User"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"username":"john_doe","userType":"$UNKNOWN","idpId":"string","displayName":"johnjanedoe","firstName":"john","middleInitial":"jane","lastName":"doe","emailId":"john.doe@example.com","locale":"en-US","region":"en-US","password":"string","isForceResetPasswordEnabled":true,"additionalAttributes":[{"name":"string","value":"string","$objectType":"common.v1.config.KVPair"}],"status":"$UNKNOWN","bucketsAccessKeys":[{"tenantId":"string","extId":"string","links":[{"href":"string","rel":"string","$objectType":"common.v1.response.ApiLink"}],"accessKeyName":"key1","secretAccessKey":"string","userId":"string","createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedBy":"string","assignedTo":"user2","creationType":"$UNKNOWN","expiryTime":"2015-07-20T15:49:04-07:00","status":"$UNKNOWN","createdBy":"string","lastUpdatedTime":"2015-07-20T15:49:04-07:00","$objectType":"iam.v4.authn.BucketsAccessKey"}],"lastLoginTime":"2015-07-20T15:49:04-07:00","createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","createdBy":"string","lastUpdatedBy":"string","description":"ITuser","creationType":"$UNKNOWN","defaultLandingPagePath":"/dm/applications","$objectType":"iam.v4.authn.User"} \ - "https://host:port/api/iam/v4.1.b2/authn/users/F047BC9E-eEfd-f23e-eCcD-9d7bCFdcfccA" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UsersApi usersApi\ \ = new UsersApi(client);\n\n User user = new User();\n\n // User\ \ object initializations here...\n\n String extId = \"FFe4Dc9d-BFA2-aC6d-0Cbe-bdaCFfE0CA27\"\ ;\n\n // perform GET call\n var getRequest = new GetUserByIdRequest\ \ {\n ExtId = extId\n };\n try {\n GetUserApiResponse\ \ getResponse = usersApi.GetUserById(getRequest);\n } catch(ApiException\ \ ex) {\n Console.WriteLine(ex.Message);\n }\n \ \ // Extract E-Tag Header\n string eTag = ApiClient.GetEtag(getResponse);\n\ \ // initialize/change parameters for update\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n // Create request object with parameters\n var\ \ request = new UpdateUserByIdRequest {\n ExtId = extId,\n \ \ Body = user,\n \n \n };\n \ \ try {\n UpdateUserApiResponse updateUserApiResponse = usersApi.UpdateUserById(request,\ \ opts);\n } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /iam/v4.1.b2/authn/users/{extId}/$actions/reset-password: post: tags: - Users summary: Reset user password description: Reset user password based on the provided external identifier. operationId: resetUserPassword parameters: - name: extId in: path description: External identifier of a user. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: dd1acec8-b1e6-4f9c-9bd9-41b662d5a0fe requestBody: description: Information for reset password request. It requires new password of the user. content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.PasswordResetRequest' required: true responses: "200": description: The password is reset. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.PasswordResetResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}/$actions/reset-password\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}/$actions/reset-password\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}/$actions/reset-password\ \ Post operation" x-permissions: operationName: Reset User Password deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.UsersApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Users.ResetUserPasswordRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.PasswordResetRequest;\nimport com.nutanix.dp1.iam.iam.v4.authn.ResetUserPasswordApiResponse;\n\ import org.springframework.web.client.RestClientException;\n\npublic class\ \ JavaSdkSample {\n public static void main(String[] args) {\n \ \ // Configure the client\n ApiClient apiClient = new ApiClient();\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ UsersApi usersApi = new UsersApi(apiClient);\n\n PasswordResetRequest\ \ passwordResetRequest = new PasswordResetRequest();\n\n // PasswordResetRequest\ \ object initializations here...\n passwordResetRequest.setNewPassword(\"\ string_sample_data\"); // required field\n \n String extId\ \ = \"8ecd6C3a-EDfa-739c-A3Ca-BBcCF9F9aB11\";\n\n try {\n \ \ // Pass in parameters using the request builder object associated\ \ with the operation.\n ResetUserPasswordApiResponse resetUserPasswordApiResponse\ \ = usersApi.resetUserPassword(ResetUserPasswordRequest.builder()\n \ \ .extId(extId)\n .build(), passwordResetRequest);\n\ \n System.out.println(resetUserPasswordApiResponse.toString());\n\ \n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, UsersApi, PasswordResetRequest } from \"@nutanix-api/iam-js-client\"\ ;\n\n// Configure the client\nlet apiClientInstance = new ApiClient();\n\ // IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host = 'localhost';\n\ // Port used for the connection. PC products typically use port 9440, while\ \ NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\napiClientInstance.port = '9440';\n// Max\ \ retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let usersApi = new UsersApi(apiClientInstance);\n\nfunction sample() {\n\ \ let passwordResetRequest = new PasswordResetRequest();\n\n // PasswordResetRequest\ \ object initializations here...\n passwordResetRequest.setNewPassword(\"\ string_sample_data\"); // required field\n passwordResetRequest = JSON.stringify(passwordResetRequest);\n\ \n \n let extId = \"fAc42a9B-dbe3-Ecd0-Ade9-E53E74ecECAb\";\n\n\n\n\ \n\n usersApi.resetUserPassword(extId, passwordResetRequest).then(({data,\ \ response}) => {\n console.log(`API returned the following status\ \ code: ${response.status}`);\n console.log(data.getData());\n \ \ }).catch((error) => {\n console.log(`Error is: ${error}`);\n \ \ });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n users_api\ \ = ntnx_iam_py_client.UsersApi(api_client=client)\n passwordResetRequest\ \ = ntnx_iam_py_client.PasswordResetRequest()\n\n # PasswordResetRequest\ \ object initializations here...\n passwordResetRequest.new_password\ \ = \"string_sample_data\" # required field\n \n ext_id = \"476aFBB6-47C8-4Df8-Fc81-8fCbbFBd6De0\"\ \n\n\n try:\n api_response = users_api.reset_user_password(extId=ext_id,\ \ body=passwordResetRequest)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/users\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n UsersServiceApiInstance\ \ *api.UsersServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ UsersServiceApiInstance = api.NewUsersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n passwordResetRequest := import1.NewPasswordResetRequest()\n\ \n // PasswordResetRequest object initializations here...\n\n \n \ \ extId := \"39BFEe0F-aDbb-d1eD-bFeF-fEc4EcF1B1f1\"\n\n\n request :=\ \ users.ResetUserPasswordRequest{ ExtId: &extId, Body: passwordResetRequest\ \ }\n response, error := UsersServiceApiInstance.ResetUserPassword(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.PasswordResetResponse)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authn/users/1EBa0DA4-ef1a-D638-Aae9-6cdCbD6cB8cC/$actions/reset-password" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"newPassword":"string","$objectType":"iam.v4.authn.PasswordResetRequest"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"newPassword":"string","$objectType":"iam.v4.authn.PasswordResetRequest"} \ - "https://host:port/api/iam/v4.1.b2/authn/users/AbBA9ccE-9bB6-B24c-db3B-9600faBeffDb/$actions/reset-password" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UsersApi usersApi\ \ = new UsersApi(client);\n\n PasswordResetRequest passwordResetRequest\ \ = new PasswordResetRequest();\n\n // PasswordResetRequest object\ \ initializations here...\n passwordResetRequest.NewPassword = \"string_sample_data\"\ ; // required field\n\n String extId = \"dAA2D1ea-cbFA-CFfA-F7a6-3e3A9B90c857\"\ ;\n\n // Create request object with parameters\n var request\ \ = new ResetUserPasswordRequest {\n ExtId = extId,\n \ \ Body = passwordResetRequest\n };\n try {\n \ \ ResetUserPasswordApiResponse resetUserPasswordApiResponse = usersApi.ResetUserPassword(request);\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /iam/v4.1.b2/authn/users/{extId}/$actions/change-state: post: tags: - Users summary: Update active state of user description: Updates the active state of a user based on the provided external identifier. operationId: updateUserState parameters: - name: extId in: path description: External identifier of a user. required: true style: simple explode: false schema: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: e8158ab9-6e73-4011-8740-21224a925214 requestBody: description: Updates the active state of a user based on the provided external identifier. content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserStateUpdate' required: true responses: "200": description: User's state updated. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserStateUpdateResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}/$actions/change-state\ \ Post operation" "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}/$actions/change-state\ \ Post operation" "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}/$actions/change-state\ \ Post operation" x-permissions: operationName: Change User State deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Nutanix Central Admin x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 5 timeUnit: seconds - type: Large count: 10 timeUnit: seconds - type: XLarge count: 10 timeUnit: seconds x-supported-versions: - product: PC version: "2024.3" x-code-samples: - lang: Java source: "\npackage sample;\n\nimport com.nutanix.iam.java.client.ApiClient;\n\ import com.nutanix.iam.java.client.api.UsersApi;\nimport com.nutanix.dp1.iam.iam.v4.request.Users.UpdateUserStateRequest;\n\ import com.nutanix.dp1.iam.iam.v4.authn.UserStatusType;\nimport com.nutanix.dp1.iam.iam.v4.authn.UserStateUpdate;\n\ import com.nutanix.dp1.iam.iam.v4.authn.ActivateUserApiResponse;\nimport\ \ org.springframework.web.client.RestClientException;\n\npublic class JavaSdkSample\ \ {\n public static void main(String[] args) {\n // Configure\ \ the client\n ApiClient apiClient = new ApiClient();\n //\ \ IPv4/IPv6 address or FQDN of the cluster\n apiClient.setHost(\"\ localhost\");\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n apiClient.setPort(9440);\n\ \ // Interval in ms to use during retry attempts\n apiClient.setRetryInterval(5000);\n\ \ // Max retry attempts while reconnecting on a loss of connection\n\ \ apiClient.setMaxRetryAttempts(5);\n // UserName to connect\ \ to the cluster\n String username = \"username\";\n // Password\ \ to connect to the cluster\n String password = \"password\";\n \ \ apiClient.setUsername(username);\n apiClient.setPassword(password);\n\ \n // Please add authorization information here if needed.\n \ \ UsersApi usersApi = new UsersApi(apiClient);\n\n UserStateUpdate\ \ userStateUpdate = new UserStateUpdate();\n\n // UserStateUpdate\ \ object initializations here...\n userStateUpdate.setStatus(UserStatusType.UNKNOWN);\ \ // required field\n \n String extId = \"DaE6A3F1-DFa9-Cdf9-B7bf-D4D8eCB47aA4\"\ ;\n\n try {\n // Pass in parameters using the request\ \ builder object associated with the operation.\n ActivateUserApiResponse\ \ activateUserApiResponse = usersApi.updateUserState(UpdateUserStateRequest.builder()\n\ \ .extId(extId)\n .build(), userStateUpdate);\n\ \n System.out.println(activateUserApiResponse.toString());\n\n\ \ } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n\ \ }\n }\n}\n" - lang: JavaScript source: "\nimport { ApiClient, UsersApi, UserStatusType, UserStateUpdate }\ \ from \"@nutanix-api/iam-js-client\";\n\n// Configure the client\nlet apiClientInstance\ \ = new ApiClient();\n// IPv4/IPv6 address or FQDN of the cluster\napiClientInstance.host\ \ = 'localhost';\n// Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\napiClientInstance.port = '9440';\n\ // Max retry attempts while reconnecting on a loss of connection\napiClientInstance.maxRetryAttempts\ \ = 5;\n// Interval in ms to use during retry attempts\napiClientInstance.retryInterval\ \ = 5000;\n// UserName to connect to the cluster\napiClientInstance.username\ \ = 'username';\n// Password to connect to the cluster\napiClientInstance.password\ \ = 'password';\n// Please add authorization information here if needed.\n\ let usersApi = new UsersApi(apiClientInstance);\n\nfunction sample() {\n\ \ let userStateUpdate = new UserStateUpdate();\n\n // UserStateUpdate\ \ object initializations here...\n userStateUpdate.setStatus(UserStatusType.UNKNOWN);\ \ // required field\n userStateUpdate = JSON.stringify(userStateUpdate);\n\ \n \n let extId = \"6cF0Ad74-fd8f-3A3E-F8Ab-FfbaBe1eCcD6\";\n\n\n\n\ \n\n usersApi.updateUserState(extId, userStateUpdate).then(({data, response})\ \ => {\n console.log(`API returned the following status code: ${response.status}`);\n\ \ console.log(data.getData());\n }).catch((error) => {\n \ \ console.log(`Error is: ${error}`);\n });\n\n}\nsample()\n" - lang: Python source: "\nimport ntnx_iam_py_client\n\nif __name__ == \"__main__\":\n \ \ # Configure the client\n config = ntnx_iam_py_client.Configuration()\n\ \ # IPv4/IPv6 address or FQDN of the cluster\n config.host = \"localhost\"\ \n # Port used for the connection. PC products typically use port 9440,\ \ while NC products typically use port 443. See the product-specific documentation\ \ for accurate configuration.\n config.port = 9440\n # Max retry attempts\ \ while reconnecting on a loss of connection\n config.max_retry_attempts\ \ = 3\n # Backoff factor to use during retry attempts\n config.backoff_factor\ \ = 3\n # UserName to connect to the cluster\n config.username = \"\ username\"\n # Password to connect to the cluster\n config.password\ \ = \"password\"\n # Please add authorization information here if needed.\n\ \ client = ntnx_iam_py_client.ApiClient(configuration=config)\n users_api\ \ = ntnx_iam_py_client.UsersApi(api_client=client)\n userStateUpdate\ \ = ntnx_iam_py_client.UserStateUpdate()\n\n # UserStateUpdate object\ \ initializations here...\n userStateUpdate.status = ntnx_iam_py_client.UserStatusType._UNKNOWN\ \ # required field\n \n ext_id = \"bD8C4Eae-C79E-5c4c-25AA-Cf69EF9EbCab\"\ \n\n\n try:\n api_response = users_api.update_user_state(extId=ext_id,\ \ body=userStateUpdate)\n print(api_response)\n except ntnx_iam_py_client.rest.ApiException\ \ as e:\n print(e)\n\n" - lang: Go source: "\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n \"context\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client\"\ \n \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/users\"\ \n import1 \"github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn\"\ \n)\n\nvar (\n ApiClientInstance *client.ApiClient\n UsersServiceApiInstance\ \ *api.UsersServiceApi\n)\n\nfunc main() {\n ApiClientInstance = client.NewApiClient()\n\ \ // IPv4/IPv6 address or FQDN of the cluster\n ApiClientInstance.Host\ \ = \"localhost\"\n // Port used for the connection. PC products typically\ \ use port 9440, while NC products typically use port 443. See the product-specific\ \ documentation for accurate configuration.\n ApiClientInstance.Port\ \ = 9440\n // Interval in ms to use during retry attempts\n ApiClientInstance.RetryInterval\ \ = 5 * time.Second\n // Max retry attempts while reconnecting on a loss\ \ of connection\n ApiClientInstance.MaxRetryAttempts = 5\n // UserName\ \ to connect to the cluster\n ApiClientInstance.Username = \"username\"\ \n // Password to connect to the cluster\n ApiClientInstance.Password\ \ = \"password\"\n // Please add authorization information here if needed.\n\ \ UsersServiceApiInstance = api.NewUsersServiceApi(ApiClientInstance)\n\ \ ctx := context.Background()\n\n userStateUpdate := import1.NewUserStateUpdate()\n\ \n // UserStateUpdate object initializations here...\n\n \n extId\ \ := \"Cba9f1e7-5a3E-2Dac-1879-303E22FcfEFE\"\n\n\n request := users.UpdateUserStateRequest{\ \ ExtId: &extId, Body: userStateUpdate }\n response, error := UsersServiceApiInstance.UpdateUserState(ctx,\ \ &request)\n if error != nil {\n fmt.Println(error)\n \ \ return\n }\n data, _ := response.GetData().(import1.UserStateUpdateResponse)\n\ \ fmt.Println(data)\n\n}\n\n" - lang: cURL source: |2+ curl --request POST \ --url "https://host:port/api/iam/v4.1.b2/authn/users/f2eBEdFa-AEED-F3FA-72d8-FEEdbA7c08a6/$actions/change-state" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"status":"$UNKNOWN","$objectType":"iam.v4.authn.UserStateUpdate"} \ - lang: Wget source: |2 wget --verbose \ --method POST \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"status":"$UNKNOWN","$objectType":"iam.v4.authn.UserStateUpdate"} \ - "https://host:port/api/iam/v4.1.b2/authn/users/6C36A53C-6B9A-BB2E-AB8A-CFFb2DeacdDb/$actions/change-state" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n UsersApi usersApi\ \ = new UsersApi(client);\n\n UserStateUpdate userStateUpdate = new\ \ UserStateUpdate();\n\n // UserStateUpdate object initializations\ \ here...\n userStateUpdate.Status = UserStatusType.UNKNOWN; // required\ \ field\n\n String extId = \"E8beDDBB-be2F-5A54-cDFf-BE7EBe0C11B4\"\ ;\n\n // Create request object with parameters\n var request\ \ = new UpdateUserStateRequest {\n ExtId = extId,\n \ \ Body = userStateUpdate\n };\n try {\n ActivateUserApiResponse\ \ activateUserApiResponse = usersApi.UpdateUserState(request);\n \ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" /iam/v4.1.b2/authn/welcome-banner: get: tags: - WelcomeBanner summary: Get welcome banner description: Fetches the configured welcome banner. operationId: getWelcomeBanner responses: "200": description: Fetched the welcome banner. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.WelcomeBanner' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/welcome-banner Get operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/welcome-banner Get operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/welcome-banner Get operation x-rate-limit: - type: xsmall count: 5 timeUnit: seconds - type: Small count: 15 timeUnit: seconds - type: Large count: 25 timeUnit: seconds - type: XLarge count: 25 timeUnit: seconds x-supported-versions: - product: PC version: pc.7.5 x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.iam.java.client.ApiClient; import com.nutanix.iam.java.client.api.WelcomeBannerApi; import com.nutanix.dp1.iam.iam.v4.request.WelcomeBanner.GetWelcomeBannerRequest; import com.nutanix.dp1.iam.iam.v4.authn.GetWelcomeBannerApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. WelcomeBannerApi welcomeBannerApi = new WelcomeBannerApi(apiClient); try { // Pass in parameters using the request builder object associated with the operation. GetWelcomeBannerApiResponse getWelcomeBannerApiResponse = welcomeBannerApi.getWelcomeBanner(GetWelcomeBannerRequest.builder() .build()); System.out.println(getWelcomeBannerApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, WelcomeBannerApi } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let welcomeBannerApi = new WelcomeBannerApi(apiClientInstance); function sample() { welcomeBannerApi.getWelcomeBanner().then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_iam_py_client if __name__ == "__main__": # Configure the client config = ntnx_iam_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_iam_py_client.ApiClient(configuration=config) welcome_banner_api = ntnx_iam_py_client.WelcomeBannerApi(api_client=client) try: api_response = welcome_banner_api.get_welcome_banner() print(api_response) except ntnx_iam_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/welcomebanner" import1 "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn" ) var ( ApiClientInstance *client.ApiClient WelcomeBannerServiceApiInstance *api.WelcomeBannerServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. WelcomeBannerServiceApiInstance = api.NewWelcomeBannerServiceApi(ApiClientInstance) ctx := context.Background() request := welcomebanner.GetWelcomeBannerRequest{ } response, error := WelcomeBannerServiceApiInstance.GetWelcomeBanner(ctx, &request) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import1.WelcomeBanner) fmt.Println(data) } - lang: cURL source: |2+ curl --request GET \ --url "https://host:port/api/iam/v4.1.b2/authn/welcome-banner" \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - lang: Wget source: |2 wget --verbose \ --method GET \ --header 'Accept: application/json' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ - "https://host:port/api/iam/v4.1.b2/authn/welcome-banner" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n WelcomeBannerApi\ \ welcomeBannerApi = new WelcomeBannerApi(client);\n\n\n try {\n\ \ GetWelcomeBannerApiResponse getWelcomeBannerApiResponse = welcomeBannerApi.GetWelcomeBanner();\n\ \ } catch (ApiException ex) {\n Console.WriteLine(ex.Message);\n\ \ }\n }\n }\n}\n" put: tags: - WelcomeBanner summary: Update welcome banner description: Updates the welcome banner. operationId: updateWelcomeBanner parameters: - name: If-Match in: header description: "The If-Match request header makes the request conditional. When\ \ not provided, the server will respond with an HTTP-428 (Precondition\ \ Required) response code indicating that the server requires the request\ \ to be conditional. The server will allow the successful completion of\ \ PUT and PATCH operations, if the resource matches the ETag value returned\ \ to the response of a GET operation. If the conditional does not match,\ \ then an HTTP-412 (Precondition Failed) response will be returned." required: true style: simple explode: false schema: type: string example: string requestBody: description: Information for the update welcome banner request. content: application/json: schema: $ref: '#/components/schemas/iam.v4.1.b2.authn.WelcomeBanner' required: true responses: "200": description: Welcome banner updated. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.authn.WelcomeBanner' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/welcome-banner Put operation "4XX": description: Client error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/welcome-banner Put operation "5XX": description: Server error response content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/welcome-banner Put operation x-permissions: operationName: Update Welcome Banner deploymentList: - ON_PREM - CLOUD roleList: - name: Super Admin - name: Prism Admin x-rate-limit: - type: xsmall count: 2 timeUnit: seconds - type: Small count: 2 timeUnit: seconds - type: Large count: 2 timeUnit: seconds - type: XLarge count: 2 timeUnit: seconds x-supported-versions: - product: PC version: pc.7.5 x-code-samples: - lang: Java source: |2 package sample; import com.nutanix.iam.java.client.ApiClient; import com.nutanix.iam.java.client.api.WelcomeBannerApi; import com.nutanix.dp1.iam.iam.v4.request.WelcomeBanner.UpdateWelcomeBannerRequest; import java.util.HashMap; import org.apache.http.HttpHeaders; import com.nutanix.dp1.iam.iam.v4.authn.WelcomeBanner; import com.nutanix.dp1.iam.iam.v4.authn.UpdateWelcomeBannerApiResponse; import org.springframework.web.client.RestClientException; public class JavaSdkSample { public static void main(String[] args) { // Configure the client ApiClient apiClient = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClient.setHost("localhost"); // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClient.setPort(9440); // Interval in ms to use during retry attempts apiClient.setRetryInterval(5000); // Max retry attempts while reconnecting on a loss of connection apiClient.setMaxRetryAttempts(5); // UserName to connect to the cluster String username = "username"; // Password to connect to the cluster String password = "password"; apiClient.setUsername(username); apiClient.setPassword(password); // Please add authorization information here if needed. WelcomeBannerApi welcomeBannerApi = new WelcomeBannerApi(apiClient); WelcomeBanner welcomeBanner = new WelcomeBanner(); // WelcomeBanner object initializations here... /* Some Create, Update, and Delete operations generally require an If-Match header with a value to be passed in order to protect against concurrent updates. The value that needs to be sent in the If-Match header needs to be retrieved by performing a Read(Get) operation on the same resource. ETags can be retrieved by calling a static method of ApiClient as below: String eTag = ApiClient.getEtag(getResponse); HashMap opts = new HashMap<>(); opts.put(HttpHeaders.IF_MATCH, eTag); */ try { // Pass in parameters using the request builder object associated with the operation. UpdateWelcomeBannerApiResponse updateWelcomeBannerApiResponse = welcomeBannerApi.updateWelcomeBanner(UpdateWelcomeBannerRequest.builder() .build(), welcomeBanner, opts); System.out.println(updateWelcomeBannerApiResponse.toString()); } catch (RestClientException ex) { System.out.println(ex.getMessage()); } } } - lang: JavaScript source: |2 import { ApiClient, WelcomeBannerApi, WelcomeBanner } from "@nutanix-api/iam-js-client"; // Configure the client let apiClientInstance = new ApiClient(); // IPv4/IPv6 address or FQDN of the cluster apiClientInstance.host = 'localhost'; // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. apiClientInstance.port = '9440'; // Max retry attempts while reconnecting on a loss of connection apiClientInstance.maxRetryAttempts = 5; // Interval in ms to use during retry attempts apiClientInstance.retryInterval = 5000; // UserName to connect to the cluster apiClientInstance.username = 'username'; // Password to connect to the cluster apiClientInstance.password = 'password'; // Please add authorization information here if needed. let welcomeBannerApi = new WelcomeBannerApi(apiClientInstance); function sample() { let welcomeBanner = new WelcomeBanner(); // WelcomeBanner object initializations here... welcomeBanner = JSON.stringify(welcomeBanner); /* Some Create, Update, and Delete operations generally require an If-Match header with a value to be passed in order to protect against concurrent updates. The value that needs to be sent in the If-Match header needs to be retrieved by performing a Read(Get) operation on the same resource. ETags can be retrieved by calling a static method of ApiClient as below: let etagValue = ApiClient.getEtag(data); let args = {"If-Match" : etagValue}; */ welcomeBannerApi.updateWelcomeBanner(welcomeBanner, args).then(({data, response}) => { console.log(`API returned the following status code: ${response.status}`); console.log(data.getData()); }).catch((error) => { console.log(`Error is: ${error}`); }); } sample() - lang: Python source: |2+ import ntnx_iam_py_client if __name__ == "__main__": # Configure the client config = ntnx_iam_py_client.Configuration() # IPv4/IPv6 address or FQDN of the cluster config.host = "localhost" # Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. config.port = 9440 # Max retry attempts while reconnecting on a loss of connection config.max_retry_attempts = 3 # Backoff factor to use during retry attempts config.backoff_factor = 3 # UserName to connect to the cluster config.username = "username" # Password to connect to the cluster config.password = "password" # Please add authorization information here if needed. client = ntnx_iam_py_client.ApiClient(configuration=config) welcome_banner_api = ntnx_iam_py_client.WelcomeBannerApi(api_client=client) welcomeBanner = ntnx_iam_py_client.WelcomeBanner() # WelcomeBanner object initializations here... """ Some Create, Update, and Delete operations generally require an If-Match header with a value to be passed in order to protect against concurrent updates. The value that needs to be sent in the If-Match header needs to be retrieved by performing a Read(Get) operation on the same resource. ETags can be retrieved by calling a static method of ApiClient as below: etag_value = ApiClient.get_etag(get_api_response) """ try: api_response = welcome_banner_api.update_welcome_banner(body=welcomeBanner, if_match=etag_value) print(api_response) except ntnx_iam_py_client.rest.ApiException as e: print(e) - lang: Go source: |2+ package main import ( "fmt" "time" "context" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/api" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/client" "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/request/welcomebanner" import1 "github.com/nutanix/ntnx-api-golang-clients/iam-go-client/v4/models/iam/v4/authn" ) var ( ApiClientInstance *client.ApiClient WelcomeBannerServiceApiInstance *api.WelcomeBannerServiceApi ) func main() { ApiClientInstance = client.NewApiClient() // IPv4/IPv6 address or FQDN of the cluster ApiClientInstance.Host = "localhost" // Port used for the connection. PC products typically use port 9440, while NC products typically use port 443. See the product-specific documentation for accurate configuration. ApiClientInstance.Port = 9440 // Interval in ms to use during retry attempts ApiClientInstance.RetryInterval = 5 * time.Second // Max retry attempts while reconnecting on a loss of connection ApiClientInstance.MaxRetryAttempts = 5 // UserName to connect to the cluster ApiClientInstance.Username = "username" // Password to connect to the cluster ApiClientInstance.Password = "password" // Please add authorization information here if needed. WelcomeBannerServiceApiInstance = api.NewWelcomeBannerServiceApi(ApiClientInstance) ctx := context.Background() welcomeBanner := import1.NewWelcomeBanner() // WelcomeBanner object initializations here... /* Some Create, Update, and Delete operations generally require an If-Match header with a value to be passed in order to protect against concurrent updates. The value that needs to be sent in the If-Match header needs to be retrieved by performing a Read(Get) operation on the same resource. ETags can be retrieved by calling a static method of ApiClient as below: etagValue := ApiClientInstance.GetEtag(getResponse) */ request := welcomebanner.UpdateWelcomeBannerRequest{ Body: welcomeBanner } response, error := WelcomeBannerServiceApiInstance.UpdateWelcomeBanner(ctx, &request, args) if error != nil { fmt.Println(error) return } data, _ := response.GetData().(import1.WelcomeBanner) fmt.Println(data) } - lang: cURL source: |2+ curl --request PUT \ --url "https://host:port/api/iam/v4.1.b2/authn/welcome-banner" \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --data {"content":"string","isEnabled":true,"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","$objectType":"iam.v4.authn.WelcomeBanner"} \ - lang: Wget source: |2 wget --verbose \ --method PUT \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'If-Match: string_sample_data' \ --header 'Authorization:Basic $APP_ACCESS_TOKEN' \ --body-data {"content":"string","isEnabled":true,"createdTime":"2015-07-20T15:49:04-07:00","lastUpdatedTime":"2015-07-20T15:49:04-07:00","$objectType":"iam.v4.authn.WelcomeBanner"} \ - "https://host:port/api/iam/v4.1.b2/authn/welcome-banner" - lang: Csharp source: "\n\nusing Nutanix.IamSDK.Client;\nusing Nutanix.IamSDK.Api;\nusing\ \ Nutanix.IamSDK.Model.Iam.V4.Authn;\n\nnamespace CsharpSdkSample\n{\n \ \ class Program\n {\n static void Main(string[] args) {\n // Configure\ \ the client\n Configuration _config = new Configuration\n {\n\ \ // UserName to connect to the cluster\n Username = \"username\"\ ,\n // Password(SecureString) to connect to the cluster \n \ \ Password = Configuration.CreateSecurePassword(\"password\"),\n \ \ // IPv4/IPv6 address or FQDN of the cluster\n Host = \"localhost\"\ ,\n // Port used for the connection. \n Port = 9440,\n \ \ // Backoff period in seconds (exponential backoff: 2, 4, 8... seconds)\n\ \ BackOffPeriod = 2,\n // Max retry attempts while reconnecting\ \ on a loss of connection\n MaxRetryAttempts = 5\n };\n\n \ \ ApiClient client = new ApiClient(_config);\n\n WelcomeBannerApi\ \ welcomeBannerApi = new WelcomeBannerApi(client);\n\n WelcomeBanner\ \ welcomeBanner = new WelcomeBanner();\n\n // WelcomeBanner object\ \ initializations here...\n\n\n /*\n Some Create, Update, and\ \ Delete operations generally require an If-Match header with a value to\ \ be passed in order to protect against concurrent updates.\n The\ \ value that needs to be sent in the If-Match header needs to be retrieved\ \ by performing a Read(Get) operation on the same resource.\n ETags\ \ can be retrieved by calling a static method of ApiClient as below:\n \ \ String eTag = ApiClient.GetEtag(getResponse);\n Dictionary opts = new Dictionary();\n opts[\"If-Match\"\ ] = eTag;\n */\n // Create request object with parameters\n\ \ var request = new UpdateWelcomeBannerRequest {\n Body\ \ = welcomeBanner,\n \n \n };\n try\ \ {\n UpdateWelcomeBannerApiResponse updateWelcomeBannerApiResponse\ \ = welcomeBannerApi.UpdateWelcomeBanner(request, opts);\n } catch\ \ (ApiException ex) {\n Console.WriteLine(ex.Message);\n \ \ }\n }\n }\n}\n" components: schemas: iam.v4.1.b2.authn.ListCertAuthProvidersApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.CertAuthProvider' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers Get operation iam.v4.1.b2.authn.CertAuthProvider: required: - caCertFileName - clientCaChain - isCacEnabled - isCertAuthEnabled - name description: A certificate-based authentication provider. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: name: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Unique name of the certificate-based authentication provider. example: CAC clientCaChain: minLength: 64 type: string description: CA chain file. example: string isCertAuthEnabled: type: boolean description: Flag to enable/disable CAC for the current certificate-based authentication provider. example: true isCacEnabled: type: boolean description: Flag to enable/disable certificate authentication for the current certificate-based authentication provider. example: false dirSvcExtID: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID of an existing directory service. example: 703d6335-cc9d-4419-8b21-4fc358bcd7a8 caCertFileName: maxLength: 255 minLength: 1 type: string description: Name of the uploaded CA chain file. example: test_cert.pem certRevocationInfo: $ref: '#/components/schemas/iam.v4.1.b2.authn.CertRevocationInfo' createdTime: type: string description: Creation time of the certificate authentication provider. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: Last updated time of the certificate authentication provider. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 createdBy: type: string description: User or service who created the certificate authentication provider. readOnly: true example: 390b7801-7a80-5c94-8a07-8de63651b27b additionalProperties: false iam.v4.1.b2.authn.CreateCertAuthProviderApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.CertAuthProvider oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.CertAuthProvider' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers Post operation iam.v4.1.b2.authn.CertRevocationInfo: type: object properties: isOcspEnabled: type: boolean description: "Flag to enable/disable OCSP revocation check. For the POST/PUT\ \ APIs, you must add this attribute directly to the payload, not under\ \ the certRevocationInfo object." example: false ocspResponder: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\.\\\ d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\?[^#\\s]*)?(#[^\\\ s]*)?$" type: string description: "URL of the OCSP responder used to override the URL from AIA\ \ extension. For the POST/PUT APIs, you must add this attribute directly\ \ to the payload, not under the certRevocationInfo object." example: http://127.0.0.1:8080 isCrlEnabled: type: boolean description: "Flag to enable/disable CRL revocation check. For the POST/PUT\ \ APIs, you must add this attribute directly to the payload, not under\ \ the certRevocationInfo object." example: true crlDps: maxItems: 10 minItems: 0 type: array description: "List of the CRL distribution points which will be used to\ \ fetch the CRLs. For the POST/PUT APIs, you must add this attribute directly\ \ to the payload, not under the certRevocationInfo object." items: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\?[^#\\\ s]*)?(#[^\\s]*)?$" type: string example: "http://{{ip}}/crl/ca.crl" globalCrlRefreshInterval: type: integer description: "Interval in seconds at which the CRL should be fetched from\ \ the CRLDP. The default is 86400 seconds(1 day). For the POST/PUT APIs,\ \ you must add this attribute directly to the payload, not under the certRevocationInfo\ \ object." example: 44 additionalProperties: false description: Configuration details used for determining if the client certificate is revoked. iam.v4.1.b2.authn.GetCertAuthProviderApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.CertAuthProvider oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.CertAuthProvider' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers/{extId}\ \ Get operation" iam.v4.1.b2.authn.UpdateCertAuthProviderApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.CertAuthProvider oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.CertAuthProvider' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers/{extId}\ \ Put operation" iam.v4.1.b2.authn.DeleteCertAuthProviderApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.error.ErrorResponse oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/cert-auth-providers/{extId}\ \ Delete operation" iam.v4.1.b2.authn.ListDirectoryServicesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryService' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services Get operation iam.v4.1.b2.authn.DirectoryService: required: - directoryType - domainName - name - serviceAccount - url description: Information of a directory service. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: name: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Name for the directory service. example: AD1 url: maxLength: 2000 minLength: 3 type: string description: URL for the directory service. example: "ldap://{{host_name}}" secondaryUrls: maxItems: 5 minItems: 0 type: array description: Secondary URL for the directory service. items: maxLength: 2000 minLength: 3 type: string example: "ldap://{{secondary_host_name}}" domainName: maxLength: 255 minLength: 3 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Domain name for the directory service. example: domain1.com directoryType: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryType' serviceAccount: $ref: '#/components/schemas/iam.v4.1.b2.authn.DsServiceAccount' openLdapConfiguration: $ref: '#/components/schemas/iam.v4.1.b2.authn.OpenLdapConfig' groupSearchType: $ref: '#/components/schemas/iam.v4.1.b2.authn.GroupSearchType' whiteListedGroups: maxItems: 1000 minItems: 0 type: array description: List of allowed user groups for the directory service. items: type: string example: cn=group1 createdTime: type: string description: Creation time of the directory service. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: Last updated time of the directory service. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 createdBy: type: string description: User or service who created the directory service. readOnly: true example: 390b7801-7a80-5c94-8a07-8de63651b27b additionalProperties: false iam.v4.1.b2.authn.CreateDirectoryServiceApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.DirectoryService oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryService' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services Post operation iam.v4.1.b2.authn.DirectoryType: type: string description: Type of directory service. enum: - ACTIVE_DIRECTORY - OPEN_LDAP - $UNKNOWN - $REDACTED x-enumDescriptions: ACTIVE_DIRECTORY: Directory service type is Active Directory. $UNKNOWN: | Unknown value. OPEN_LDAP: Directory service type is Open LDAP. $REDACTED: | Redacted value. iam.v4.1.b2.authn.DsServiceAccount: required: - password - username type: object properties: username: maxLength: 512 type: string description: Username to connect to the directory service. example: Administrator@domain1.com password: type: string description: Password to connect to the directory service. example: Pa*******rd additionalProperties: false description: Information on the service account to connect to the directory service. iam.v4.1.b2.authn.OpenLdapConfig: required: - userConfiguration - userGroupConfiguration type: object properties: userConfiguration: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserConfiguration' userGroupConfiguration: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserGroupConfiguration' additionalProperties: false description: Configuration for OpenLDAP directory service. iam.v4.1.b2.authn.GroupSearchType: type: string description: Group membership search type for the directory service. enum: - NON_RECURSIVE - RECURSIVE - $UNKNOWN - $REDACTED x-enumDescriptions: NON_RECURSIVE: Doesn't search recursively within groups. RECURSIVE: Searches recursively within groups. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.UserConfiguration: required: - userObjectClass - userSearchBase - usernameAttribute type: object properties: userObjectClass: maxLength: 64 type: string description: Object class in the OpenLDAP system that corresponds to the users. example: inetOrgPerson userSearchBase: maxLength: 200 type: string description: Base DN for user search. example: "ou=ldap_search_ou,dc=domain1,dc=com" usernameAttribute: maxLength: 64 type: string description: Unique identifier for each user that can be used in authentication. example: uid additionalProperties: false description: User configuration for OpenLDAP directory service. iam.v4.1.b2.authn.UserGroupConfiguration: required: - groupMemberAttribute - groupMemberAttributeValue - groupObjectClass - groupSearchBase type: object properties: groupObjectClass: maxLength: 64 type: string description: Object class in the OpenLDAP system that corresponds to groups. example: posixGroup groupSearchBase: maxLength: 200 type: string description: Base DN for group search. example: "ou=ldap_search_ou,dc=domain1,dc=com" groupMemberAttribute: maxLength: 64 type: string description: Attribute in a group that associates users to the group. example: memberUid groupMemberAttributeValue: maxLength: 64 type: string description: User attribute value that will be used in group entity to associate user to the group. example: uid additionalProperties: false description: User Group configuration for OpenLDAP directory service. iam.v4.1.b2.authn.GetDirectoryServiceApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.DirectoryService oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryService' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}\ \ Get operation" iam.v4.1.b2.authn.UpdateDirectoryServiceApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.DirectoryService oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryService' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}\ \ Put operation" iam.v4.1.b2.authn.DeleteDirectoryServiceApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.error.ErrorResponse oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}\ \ Delete operation" iam.v4.1.b2.authn.DirectoryServiceSearchQuery: required: - query type: object properties: query: maxLength: 2000 type: string description: Query string for directory service search. example: user searchedAttributes: maxItems: 25 minItems: 0 type: array description: "Attributes for search operation. By default, the search will\ \ be performed with a common name." items: type: string example: userPrincipalName returnedAttributes: maxItems: 25 minItems: 0 type: array description: Attributes returned by the search operation. items: type: string example: memberOf isWildcardSearch: type: boolean description: Flag indicating whether the search should be a wildcard search or not. default: true additionalProperties: false description: Information for directory search query. iam.v4.1.b2.authn.SearchDirectoryServiceApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.DirectoryServiceSearchResult oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryServiceSearchResult' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}/$actions/search\ \ Post operation" iam.v4.1.b2.authn.DirectoryServiceSearchResult: type: object properties: searchResults: maxItems: 1000 minItems: 0 type: array description: Result of directory service search. items: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryServiceSearchEntity' domainName: maxLength: 255 type: string description: Domain name for the directory service. example: domain1.com additionalProperties: false description: Information of directory service search result. iam.v4.1.b2.authn.DirectoryServiceSearchEntity: type: object properties: entityType: type: string description: Type of entity either user or group. example: Person name: maxLength: 64 type: string description: Name of the entity in canonical format. example: "cn=user1,cn=users,dc=domain1,dc=com" attributes: maxItems: 25 minItems: 0 type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryServiceSearchAttribute' additionalProperties: false description: Information of single search entity. iam.v4.1.b2.authn.DirectoryServiceSearchAttribute: type: object properties: values: maxItems: 25 minItems: 0 type: array description: Value of the attribute. items: type: string example: grp1 name: maxLength: 1000 type: string description: Name of the attribute. example: objectGUID additionalProperties: false description: Information of searched attributes. iam.v4.1.b2.authn.DirectoryServiceConnectionRequest: required: - password - username type: object properties: username: maxLength: 512 type: string description: Username to connect to the directory service. example: string password: type: string description: Password to connect to the directory service. example: string additionalProperties: false description: Information for directory service connection request. iam.v4.1.b2.authn.ConnectionDirectoryServiceApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.DirectoryServiceConnectionResponse oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryServiceConnectionResponse' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/directory-services/{extId}/$actions/verify-connection-status\ \ Post operation" iam.v4.1.b2.authn.DirectoryServiceConnectionResponse: description: Verify directory service connection response object. allOf: - $ref: '#/components/schemas/iam.v4.1.b2.common.ActionBaseResponse' iam.v4.1.b2.common.ActionBaseResponse: required: - message type: object properties: message: type: string description: Action API successful message. example: string additionalProperties: false description: Base model for action API response. iam.v4.1.b2.authn.Federation: required: - cloudTenant - idpId - wellKnownConfig description: Description of the OIDC provider. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: wellKnownConfig: maxLength: 2000 minLength: 3 pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\?[^#\\\ s]*)?(#[^\\s]*)?$" type: string description: Well known URL of the OIDC provider. example: string idpId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: IDP attached to the users of the OIDC provider. example: 64559059-7993-4c8a-ad76-69da63dee900 cloudTenant: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Provider side tenant that is registering domain. example: e5021328-8988-4eaa-81b1-eb7e73aff00c cloudApiKey: maxLength: 128 type: string description: API key for authenticating to the OIDC provider. example: string claimMap: $ref: '#/components/schemas/iam.v4.1.b2.authn.FederationClaims' createdTime: type: string description: Creation time of the OIDC provider. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: Last updated time of the OIDC provider. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 createdBy: type: string description: User or service who created the OIDC provider. readOnly: true example: string additionalProperties: false iam.v4.1.b2.authn.FederationClaims: type: object properties: name: maxLength: 16 type: string description: Name of the federation claim. example: string email: maxLength: 16 type: string description: Email of the federation claim. example: string additionalProperties: false description: Mapping of claims from IAM to the OIDC provider. iam.v4.1.b2.authn.ListUserKeysApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.Key' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys\ \ Get operation" iam.v4.1.b2.authn.Key: description: Credentials in the form of a unique random key for the users. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - keyType - name type: object properties: name: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Identifier for the key in the form of a name. example: ApiKey1 description: maxLength: 1000 type: string description: Brief description of the key. example: ApiKey for backend application keyType: $ref: '#/components/schemas/iam.v4.1.b2.authn.KeyKind' createdTime: type: string description: The creation time of the key. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedBy: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: User who updated the key. readOnly: true example: 6998ae22-718d-48d5-9e93-44eb7d1a35b5 creationType: $ref: '#/components/schemas/iam.v4.1.b2.authn.CreationType' expiryTime: type: string description: The time when the key will expire. format: date-time example: 2009-09-23T14:30:00-07:00 status: $ref: '#/components/schemas/iam.v4.1.b2.authn.KeyStatus' createdBy: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: User or service who created the key. readOnly: true example: 390b7801-7a80-5c94-8a07-8de63651b27b lastUpdatedTime: type: string description: The time when the key was updated. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 assignedTo: maxLength: 255 minLength: 3 type: string description: External client to whom the key is allocated. example: user2 lastUsedTime: type: string description: The time when the key was last used. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 keyDetails: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.ApiKeyDetails description: Details specific to type of the key. readOnly: true oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.ApiKeyDetails' - $ref: '#/components/schemas/iam.v4.1.b2.authn.ObjectKeyDetails' additionalProperties: false iam.v4.1.b2.authn.CreateKeyApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.Key oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.Key' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys\ \ Post operation" iam.v4.1.b2.authn.KeyKind: type: string description: The type of key. enum: - API_KEY - OBJECT_KEY - $UNKNOWN - $REDACTED x-enumDescriptions: API_KEY: A key type that is used to identify a service. OBJECT_KEY: A combination of access key and secret key to sign an API request. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.CreationType: type: string description: The creation mechanism of this entity. enum: - PREDEFINED - USERDEFINED - SERVICEDEFINED - $UNKNOWN - $REDACTED x-enumDescriptions: PREDEFINED: Predefined creator workflow type is for entity created by the system. SERVICEDEFINED: Servicedefined creator workflow type is for entity created by the service. USERDEFINED: Userdefined creator workflow type is for entity created by the users. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.KeyStatus: type: string description: The status of the key. enum: - VALID - REVOKED - EXPIRED - $UNKNOWN - $REDACTED x-enumDescriptions: REVOKED: Key is revoked. VALID: Key is valid. EXPIRED: Key is expired. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.ApiKeyDetails: type: object properties: apiKey: maxLength: 32 minLength: 32 type: string description: "The actual API key value, returned only during creation." readOnly: true example: string additionalProperties: false description: The API key details. iam.v4.1.b2.authn.ObjectKeyDetails: type: object properties: secretKey: maxLength: 24 minLength: 24 type: string description: "Secret Access Key, which will be returned during creation\ \ of the key of type OBJECT_KEY." readOnly: true example: string accessKey: maxLength: 24 minLength: 24 type: string description: Access key identifier. readOnly: true example: string additionalProperties: false description: The object key details. iam.v4.1.b2.authn.GetUserKeyApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.Key oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.Key' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys/{extId}\ \ Get operation" iam.v4.1.b2.authn.DeleteUserKeyApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.error.ErrorResponse oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys/{extId}\ \ Delete operation" iam.v4.1.b2.authn.RevokeUserKeyApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.error.AppMessage oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.error.AppMessage' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{userExtId}/keys/{extId}/$actions/revoke\ \ Post operation" iam.v4.1.b2.error.AppMessage: type: object properties: message: type: string description: The message string. example: string severity: $ref: '#/components/schemas/common.v1.0.config.MessageSeverity' code: type: string description: "The code associated with this message. This string is typically\ \ prefixed with the namespace to which the endpoint belongs. For example:\ \ VMM-40000" example: string locale: type: string description: Locale for this message. The default locale would be 'en-US'. default: en_US errorGroup: type: string description: The error group associated with this message of severity ERROR. example: string argumentsMap: type: object additionalProperties: type: string description: The map of argument name to value. additionalProperties: false description: Message with associated severity describing status of the current operation. x-platform-generated: true iam.v4.1.b2.authn.KeyMigrationSpec: required: - maxKeyCount type: object properties: maxKeyCount: type: integer description: Number of keys to be migrated in this API call. example: 87 additionalProperties: false description: Migrate keys request. iam.v4.1.b2.authn.ObjectsAuthSpec: required: - accessKey type: object properties: accessKey: type: string description: The access key which is used to retrieve the auth details. example: string additionalProperties: false description: The specification needed to fetch the auth details. iam.v4.1.b2.authn.ObjectsAuthDetails: required: - assignedTo - creationType - customClaims - emailId - idpId - secretAccessKey - tenantId - userId - userType - username type: object properties: secretAccessKey: type: string description: "This represents secret access key, which will be returned\ \ only during access key creation." example: string emailId: maxLength: 255 pattern: "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$" type: string description: Email ID of the user. example: john.doe@example.com userId: type: string description: User identifier who owns the bucket access key. readOnly: true example: string userType: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserType' tenantId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: ID of tenant for which configuration is being set up. example: 7a47d64a-fea9-4470-8d4d-d3f84f1e48ba idpId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Identifier of the IDP for the user. example: 6dbaac77-351c-4e6b-a9a7-c72b3eafa320 username: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Identifier of the user. example: string creationType: $ref: '#/components/schemas/iam.v4.1.b2.authn.CreationType' customClaims: type: object additionalProperties: type: string description: Any additional user attributes obtained from the authentication provider in the form of key/value pairs. assignedTo: maxLength: 255 minLength: 3 type: string description: External client to whom this key is allocated. example: string additionalProperties: false description: The retrieved auth details. iam.v4.1.b2.authn.UserType: type: string description: "User type like SAML user or local user, and so on." enum: - LOCAL - SAML - LDAP - EXTERNAL - SERVICE_ACCOUNT - $UNKNOWN - $REDACTED x-enumDescriptions: SERVICE_ACCOUNT: "User stored locally in IAM and is used by customer applications,\ \ scripts and internal services." LDAP: User belonging to a directory service (OpenLDAP/AD). EXTERNAL: User not stored locally nor belonging to any IDP or directory service. LOCAL: User stored locally in IAM. SAML: User belonging to a SAML IDP. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.ListLoginProvidersApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.LoginProvider' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/login-providers Get operation iam.v4.1.b2.authn.LoginProvider: description: Description of the login provider configured. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: name: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Name of the login provider configured. example: string type: $ref: '#/components/schemas/iam.v4.1.b2.authn.IdpType' isBrowserLoginSupported: type: boolean description: Flag for filtering the connectors for the UI to display. readOnly: true example: true createdTime: type: string description: Creation time of the login provider. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: Last update time of the login provider. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 additionalProperties: false iam.v4.1.b2.authn.IdpType: type: string description: Type of the login provider configured. enum: - local - saml - ldap - cert - service_account - $UNKNOWN - $REDACTED x-enumDescriptions: service_account: Login provider of type service account. ldap: Login provider of type LDAP. saml: Login provider of type SAML. cert: Login provider of type cert. $UNKNOWN: | Unknown value. local: Login provider of type local. $REDACTED: | Redacted value. iam.v4.1.b2.authn.LoginRequest: required: - clientId - redirectUri - responseType - scope description: Request body for creating login request. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: clientId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Client identifier for the the login request. example: a2cf0a02-4ee0-40a0-8731-93db284f8780 responseType: $ref: '#/components/schemas/iam.v4.1.b2.authn.ResponseType' scope: maxItems: 10 minItems: 1 type: array description: "Supported scope values for the login request. The supported\ \ values are OPENID, PROFILE, EMAIL, OFFLINE_ACCESS and GROUPS. OPENID\ \ is a mandatory field." items: $ref: '#/components/schemas/iam.v4.1.b2.authn.Scope' redirectUri: maxLength: 2000 pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\?[^#\\\ s]*)?(#[^\\s]*)?$" type: string description: Redirect URI for the login request. example: string nonce: maxLength: 2000 type: string description: Nonce value for the login request. example: 274312:dj83hs9s state: maxLength: 2000 type: string description: State value for the login request. example: xyz audience: maxLength: 2000 type: string description: Audience value for the login request. example: "[http://redirect_uri1, http://redirect_uri1]" approvalPrompt: maxLength: 2000 type: string description: Approval prompt value for the login request. example: force loginProviderId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Identifier for the login provider to be updated in the login request. example: 8babecbb-b837-4488-b9c5-d336a5dc5ee3 isUserLoggedIn: type: boolean description: Flag to determine if the user is logged in or not. example: true isServiceProviderEnabled: type: boolean description: Flag to determine if service provider is enabled or not. example: true additionalProperties: false iam.v4.1.b2.authn.ResponseType: type: string description: Supported OIDC response types. enum: - ID_TOKEN - CODE - TOKEN - $UNKNOWN - $REDACTED x-enumDescriptions: CODE: OIDC response type is code. ID_TOKEN: OIDC response type is id_token. $UNKNOWN: | Unknown value. TOKEN: OIDC response type is token. $REDACTED: | Redacted value. iam.v4.1.b2.authn.Scope: type: string enum: - OPENID - PROFILE - EMAIL - OFFLINE_ACCESS - GROUPS - $UNKNOWN - $REDACTED x-enumDescriptions: OPENID: Scope of type OPENID. PROFILE: Scope of type PROFILE. OFFLINE_ACCESS: Scope of type OFFLINE_ACCESS. GROUPS: Scope of type GROUPS. EMAIL: Scope of type EMAIL. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.CertificateLoginRequest: required: - relayState type: object properties: relayState: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: The session ID value tracking the current login session. example: h6dd24tv22q43gqpmorywwfd2 additionalProperties: false description: The certificate login API request body. iam.v4.1.b2.authn.ValidateCredentialsRequest: required: - password - username type: object properties: username: maxLength: 255 minLength: 1 type: string description: Identifier of the user. example: string password: maxLength: 255 minLength: 1 type: string description: Password of the user. example: string additionalProperties: false description: Request body for validating credentials. iam.v4.1.b2.authn.AuthenticationResponse: type: object properties: authCodeUri: maxLength: 2000 pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\.\\\ d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\?[^#\\s]*)?(#[^\\\ s]*)?$" type: string description: Auth Code URI for redirection to mercury. example: string additionalProperties: false description: Authentication response from validation APIs. iam.v4.1.b2.authn.AuthnMigrationRequest: required: - migrationType type: object properties: migrationType: $ref: '#/components/schemas/iam.v4.1.b2.authn.AuthnMigrationType' additionalProperties: false description: The authN migration API request body. iam.v4.1.b2.authn.AuthnMigrationType: type: string description: The type of authn migration. enum: - HASH_OIDC_CLIENT_SECRET - $UNKNOWN - $REDACTED x-enumDescriptions: $UNKNOWN: | Unknown value. HASH_OIDC_CLIENT_SECRET: The migration to remove secret and store secret hash for OIDC clients. $REDACTED: | Redacted value. iam.v4.1.b2.authn.DiscoverySubjectType: type: string description: Supported subject types. enum: - PUBLIC - $UNKNOWN - $REDACTED x-enumDescriptions: PUBLIC: OIDC subject type is public. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.SigningAlgoType: type: string description: Supported JWS signing algorithms. enum: - RS256 - $UNKNOWN - $REDACTED x-enumDescriptions: RS256: OIDC config signing algo of type RS256. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.ScopesType: type: string description: Supported OIDC scopes. enum: - OPENID - PROFILE - EMAIL - GROUPS - OFFLINE_ACCESS - $UNKNOWN - $REDACTED x-enumDescriptions: OPENID: OIDC scope of type openid. PROFILE: OIDC scope of type profile. GROUPS: OIDC scope of type groups. OFFLINE_ACCESS: OIDC scope of type offline_access. EMAIL: OIDC scope of type email. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.AuthMethodType: type: string description: Supported authentication methods. enum: - CLIENT_SECRET_BASIC - PRIVATE_KEY_JWT - $UNKNOWN - $REDACTED x-enumDescriptions: CLIENT_SECRET_BASIC: OIDC Auth method is of type client_secret_basic. $UNKNOWN: | Unknown value. PRIVATE_KEY_JWT: OIDC Auth method is of type private_key_jwt. $REDACTED: | Redacted value. iam.v4.1.b2.authn.ClaimsType: type: string description: Supported claim types. enum: - UUID - TENANT_UUID - SUB - EMAIL - DISPLAY_NAME - GROUPS - ISS - AUD - EXP - IAT - $UNKNOWN - $REDACTED x-enumDescriptions: AUD: OIDC claim os type aud. SUB: OIDC claim os type sub . GROUPS: OIDC claim os type groups. ISS: OIDC claim os type iss. UUID: OIDC claim os type uuid. TENANT_UUID: OIDC claim os type tenant uuid. EMAIL: OIDC claim os type email. EXP: OIDC claim os type exp. $UNKNOWN: | Unknown value. IAT: OIDC claim os type iat. DISPLAY_NAME: OIDC claim os type display name. $REDACTED: | Redacted value. iam.v4.1.b2.authn.OidcKey: required: - alg - e - kid - kty - "n" - use - x5c type: object properties: alg: $ref: '#/components/schemas/iam.v4.1.b2.authn.AlgoType' use: $ref: '#/components/schemas/iam.v4.1.b2.authn.UseType' kty: $ref: '#/components/schemas/iam.v4.1.b2.authn.KeyType' kid: type: string description: Unique identifier of the key. example: string x5c: type: string description: x509 certificate chain of the key. example: string "n": type: string description: Modulus for a standard PEM. example: string e: type: string description: Exponent for a standard PEM. example: string additionalProperties: false description: JSON Web Key that can be used to verify the signature of tokens issued by IAM. iam.v4.1.b2.authn.AlgoType: type: string description: Algorithm types for OIDC key. enum: - RSA256 - $UNKNOWN - $REDACTED x-enumDescriptions: $UNKNOWN: | Unknown value. RSA256: OIDC key algo of type RSA256. $REDACTED: | Redacted value. iam.v4.1.b2.authn.UseType: type: string description: Use for the OIDC key. enum: - SIG - $UNKNOWN - $REDACTED x-enumDescriptions: SIG: OIDC key Use type is SIG. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.KeyType: type: string description: Type of OIDC key. enum: - RSA - $UNKNOWN - $REDACTED x-enumDescriptions: RSA: OIDC key of type RSA. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.TokenRequest: required: - client_id - grant_type type: object properties: grant_type: $ref: '#/components/schemas/iam.v4.1.b2.authn.GrantType' code: type: string description: Code for the OIDC token. example: string connector_id: type: string description: Connector identifier for the connector of a user. example: string scope: maxLength: 100 minLength: 1 type: string description: Scopes for the OIDC token. example: openid profile groups email refresh_token: type: string description: Request token to get the OIDC token. example: string client_id: type: string description: Client identifier for the OIDC token request. example: string client_assertion_type: type: string description: Client assertion type for the OIDC token request. example: string client_assertion: type: string description: Client assertion for the OIDC token request. example: string redirect_uri: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\.\\\ d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\?[^#\\s]*)?(#[^\\\ s]*)?$" type: string description: Redirect URI for the OIDC token request. example: string audience: type: string description: Audience for the OIDC token request. example: string subject_token: type: string description: Subject token for the OIDC token request. example: string subject_token_type: $ref: '#/components/schemas/iam.v4.1.b2.authn.SubjectType' non_tenant_issuer: type: string description: Non-tenant issuer for the OIDC token request. example: string additionalProperties: false description: Information of the OIDC Token request. iam.v4.1.b2.authn.GrantType: type: string description: Type of grant. enum: - AUTHORIZATION_CODE - REFRESH_TOKEN - CLIENT_CREDENTIALS - PASSWORD - URN:IETF:PARAMS:OAUTH:GRANT-TYPE:TOKEN-EXCHANGE - $UNKNOWN - $REDACTED x-enumDescriptions: PASSWORD: Token grant type is password. URN:IETF:PARAMS:OAUTH:GRANT-TYPE:TOKEN-EXCHANGE: Token grant type is token exchange. REFRESH_TOKEN: Token grant type is refresh token. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. AUTHORIZATION_CODE: Token grant type is authorization code. iam.v4.1.b2.authn.SubjectType: type: string description: Type of subject for token. enum: - URN:IETF:PARAMS:OAUTH:TOKEN-TYPE:ID_TOKEN - URN:IETF:PARAMS:OAUTH:TOKEN-TYPE:API_KEY - $UNKNOWN - $REDACTED x-enumDescriptions: URN:IETF:PARAMS:OAUTH:TOKEN-TYPE:API_KEY: subject type for token is api key. URN:IETF:PARAMS:OAUTH:TOKEN-TYPE:ID_TOKEN: subject type for token is id token. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.OidcUserinfo: required: - connectorId - defaultLandingPagePath - email - exp - firstName - iat - iss - lastName - locale - middleInitial - name - region - status - sub - subType - tenant - userId description: IAM OpenID userinfo response. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: iss: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\?[^#\\\ s]*)?(#[^\\s]*)?$" type: string description: Base URL of the identity service which it asserts as its issuer identifier. example: string sub: type: string description: Subject identifier. A locally unique identifier for the end user. example: string subType: $ref: '#/components/schemas/iam.v4.1.b2.authn.OidcSubjectType' exp: type: integer description: Expiration time for the identity claims in seconds since epoch. format: int64 example: 75 iat: type: integer description: Time at which the identity claims were issued in seconds since epoch. format: int64 example: 99 email: maxLength: 255 pattern: "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$" type: string description: Email address of the subject. example: john.doe@example.com isEmailVerified: type: boolean description: Boolean to indicate if the email address of end user has been verified by IAM. example: true name: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Display name of the user including the first and last name. example: string userId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID V5 created for the user by IAM. example: 45c10edc-925e-4f11-8a6e-07550fbe815b connectorId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: UUID V5 of the authentication connector that was used to verify the credentials of the user. example: 084a1835-63b1-4505-8e50-a1141d8e5eca groups: maxItems: 25 minItems: 0 type: array description: List of groups obtained from the authentication provider for the user. items: $ref: '#/components/schemas/iam.v4.1.b2.authn.Group' tenant: $ref: '#/components/schemas/iam.v4.1.b2.authn.Tenant' customClaims: type: object additionalProperties: type: string description: Any additional user attributes obtained from the authentication provider in the form of key/value pairs. legacyRoles: maxItems: 5 minItems: 0 type: array description: List of legacy Prism roles for the user. items: type: string example: string firstName: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: First name of the user. example: john middleInitial: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Middle name of the user. example: jane lastName: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Last name of the user. example: doe locale: type: string description: Default locale of the user. example: en-US region: type: string description: Default region of the user. example: en-US status: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserStatusType' defaultLandingPagePath: type: string description: Default Landing Page for User example: /dm/applications additionalProperties: false iam.v4.1.b2.authn.OidcSubjectType: type: string description: Type of the subject enum: - LOCAL - LDAP - SAML - CERT - SERVICE_ACCOUNT - $UNKNOWN - $REDACTED x-enumDescriptions: SERVICE_ACCOUNT: OIDC subject type is service account. LDAP: OIDC subject type is ldap. LOCAL: OIDC subject type is local. SAML: OIDC subject type is saml. CERT: OIDC subject type is cert. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.Group: required: - extId - name description: Information on a group of users. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: name: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: The name of group. example: string additionalProperties: false iam.v4.1.b2.authn.Tenant: description: Information regarding the tenant that the user belongs to. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: name: maxLength: 255 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Name of the tenant that the user belongs to. example: string additionalProperties: false iam.v4.1.b2.authn.UserStatusType: type: string description: Status of the user. enum: - ACTIVE - INACTIVE - $UNKNOWN - $REDACTED x-enumDescriptions: ACTIVE: Denotes that the local user is active. INACTIVE: Denotes that the local user is inactive and needs to be reactivated. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.ListSamlIdentityProvidersApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.SamlIdentityProvider' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers Get operation iam.v4.1.b2.authn.SamlIdentityProvider: required: - name description: Information of SAML IDP. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: idpMetadataUrl: maxLength: 2000 minLength: 3 pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\?[^#\\\ s]*)?(#[^\\s]*)?$" type: string description: Metadata URL that provides IDP details. writeOnly: true example: "http://{{idp_host}}/idp_metadata" idpMetadataXml: minLength: 3 type: string description: Base64 encoded metadata in XML format with IDP details. writeOnly: true example: string idpMetadata: $ref: '#/components/schemas/iam.v4.1.b2.authn.IdpMetadata' name: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Unique name of the IDP. example: saml1 usernameAttribute: maxLength: 256 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: SAML assertion username attribute element. default: name emailAttribute: maxLength: 256 minLength: 3 type: string description: SAML assertion email attribute element. default: email groupsAttribute: maxLength: 256 minLength: 3 type: string description: SAML assertion groups attribute element. example: grpAttribute1 groupsDelim: maxLength: 3 minLength: 1 type: string description: Delimiter is used to split the value of an attribute into multiple groups. example: string redirectURL: maxLength: 2000 minLength: 3 pattern: "^((http[s]?):\\/)?\\/?(\\[[a-fA-F0-9:]+\\]|[^:\\/\\s]+)(:[0-9]+)?$" type: string description: "The URL to redirect the user after successful authentication.\ \ Use this optional input when the user needs to be redirected to a\ \ different URL other than the default, such as when the PC is behind\ \ a reverse proxy and the user needs to be redirected to the reverse\ \ proxy URL instead of the PC URL." example: string customAttributes: maxItems: 25 minItems: 0 type: array description: SAML assertions for a list of custom attribute elements. items: maxLength: 16 type: string example: Attribute1 entityIssuer: maxLength: 2000 minLength: 3 type: string description: It will be used as an issuer in SAML authnRequest. example: issuer1 isSignedAuthnReqEnabled: type: boolean description: Flag indicating signing of SAML authnRequests. example: true createdTime: type: string description: Creation time of the SAML identity provider. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: Last updated time of the SAML identity provider. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 createdBy: type: string description: User or service who created the SAML identity provider. readOnly: true example: 390b7801-7a80-5c94-8a07-8de63651b27b additionalProperties: false iam.v4.1.b2.authn.CreateSamlIdentityProviderApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.SamlIdentityProvider oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.SamlIdentityProvider' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers Post operation iam.v4.1.b2.authn.IdpMetadata: required: - certificate - entityId - loginUrl type: object properties: entityId: maxLength: 2000 minLength: 3 type: string description: Entity identifier of identity provider. example: "http://{{idp_host}}/entity" loginUrl: maxLength: 2000 minLength: 3 pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\.\\\ d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\?[^#\\s]*)?(#[^\\\ s]*)?$" type: string description: Login URL of the identity provider. example: "http://{{idp_host}}/loginUrl" logoutUrl: maxLength: 2000 minLength: 3 pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\.\\\ d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\?[^#\\s]*)?(#[^\\\ s]*)?$" type: string description: Logout URL of the identity provider. example: "http://{{idp_host}}/logoutUrl" errorUrl: maxLength: 2000 minLength: 3 pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\.\\\ d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\?[^#\\s]*)?(#[^\\\ s]*)?$" type: string description: Error URL of the identity provider. example: "http://{{idp_host}}/errorUrl" certificate: minLength: 64 type: string description: Certificate for verification. example: string nameIdPolicyFormat: $ref: '#/components/schemas/iam.v4.1.b2.authn.NameIdPolicyFormat' additionalProperties: false description: Information of the IDP. iam.v4.1.b2.authn.NameIdPolicyFormat: type: string description: Name ID Policy format. enum: - emailAddress - unspecified - X509SubjectName - WindowsDomainQualifiedName - encrypted - entity - kerberos - persistent - transient - $UNKNOWN - $REDACTED x-enumDescriptions: emailAddress: Uses email address as the NameID format. encrypted: Uses encrypted as the NameID format. unspecified: NameID format is left to the individual implementations. transient: Uses identifier with transient semantics as the NameID format. WindowsDomainQualifiedName: Uses Windows domain qualified name as the NameID format. X509SubjectName: Uses X509SubjectName as the NameID format. kerberos: Uses kerberos principal name as the NameID format. persistent: Uses persistent name identifier as the NameID format. $UNKNOWN: | Unknown value. entity: Uses identitfier of an entity as the NameID format. $REDACTED: | Redacted value. iam.v4.1.b2.authn.GetSamlIdentityProviderApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.SamlIdentityProvider oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.SamlIdentityProvider' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}\ \ Get operation" iam.v4.1.b2.authn.UpdateSamlIdentityProviderApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.SamlIdentityProvider oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.SamlIdentityProvider' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}\ \ Put operation" iam.v4.1.b2.authn.DeleteSamlIdentityProviderApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.error.ErrorResponse oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}\ \ Delete operation" iam.v4.1.b2.authn.GetSamlIdpSpMetadataApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: string format: byte example: QmFzZTY0RW5jb2RlZA== - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/saml-identity-providers/{extId}/sp-metadata\ \ Get operation" iam.v4.1.b2.authn.GetSamlSpMetadataApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: string format: byte example: QmFzZTY0RW5jb2RlZA== - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/saml-sp-metadata Get operation iam.v4.1.b2.authn.SystemConfig: required: - nameValuePair type: object properties: nameValuePair: maxItems: 10 minItems: 0 type: array description: Name Value Pair of the system configuration. items: $ref: '#/components/schemas/common.v1.0.config.KVPair' lastUpdatedTime: type: string description: Last update time for the system configuration. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 additionalProperties: false description: System configuration resource. iam.v4.1.b2.authn.ListUsersApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.User' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/users Get operation iam.v4.1.b2.authn.User: required: - userType - username description: Information of the user. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: username: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Identifier of the user. example: john_doe userType: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserType' idpId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Identifier of the IDP for the user. example: b4516d6f-dd2c-4f3d-a656-b5ec447f5df8 displayName: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: "Display name of the user. For LDAP and SAML users, this\ \ is set from AD config." example: john jane doe firstName: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: First name of the user. example: john middleInitial: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Middle name of the user. example: jane lastName: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Last name of the user. example: doe emailId: maxLength: 255 pattern: "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$" type: string description: Email ID of the user. example: john.doe@example.com locale: type: string description: Default locale of the user. example: en-US region: type: string description: Default region of the user. example: en-US password: type: string description: Password of the user. writeOnly: true example: string isForceResetPasswordEnabled: type: boolean description: Flag to force the user to reset password. example: false additionalAttributes: maxItems: 10 minItems: 0 type: array description: Indicates additional attributes of the user. items: $ref: '#/components/schemas/common.v1.0.config.KVPair' status: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserStatusType' bucketsAccessKeys: maxItems: 5 minItems: 0 type: array description: Bucket access keys for the user. readOnly: true items: $ref: '#/components/schemas/iam.v4.1.b2.authn.BucketsAccessKey' lastLoginTime: type: string description: The last successful login time for the user. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 createdTime: type: string description: Creation time of the user. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: The last updated time for the user. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 createdBy: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: User or Service who created the user. readOnly: true example: 92643232-aead-4c60-89c1-0658dade26ab lastUpdatedBy: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Last updated by this user ID. readOnly: true example: 0b4c4925-da2d-414a-a0ee-df12f9c1c791 description: type: string description: Description of the user. readOnly: false example: IT user creationType: $ref: '#/components/schemas/iam.v4.1.b2.authn.CreationType' defaultLandingPagePath: type: string description: Default Landing Page for User example: /dm/applications additionalProperties: false iam.v4.1.b2.authn.CreateUserApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.User oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.User' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/users Post operation iam.v4.1.b2.authn.BucketsAccessKey: description: Information of bucket access key. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - accessKeyName type: object properties: accessKeyName: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Name of the bucket access key. example: key1 secretAccessKey: type: string description: "This represents secret access key, which will be returned\ \ only during access key creation." readOnly: true example: string userId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: User identifier who owns the bucket access key. readOnly: true example: 6ca8a8bb-94dd-49c7-bd8a-df4c456553c3 createdTime: type: string description: Creation time for the bucket access key. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedBy: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Entity that updated the buckets access key. readOnly: true example: e13ca4a7-80a1-4d89-a5e1-8726a26ed81b assignedTo: maxLength: 255 minLength: 3 type: string description: External client to whom this key is allocated. example: user2 creationType: $ref: '#/components/schemas/iam.v4.1.b2.authn.CreationType' expiryTime: type: string description: The expiry time of the buckets access Key. format: date-time example: 2009-09-23T14:30:00-07:00 status: $ref: '#/components/schemas/iam.v4.1.b2.authn.BucketsAccessKeyStatusType' createdBy: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Service account user who created the buckets access key. readOnly: true example: a408f53b-b0d7-4d20-bdc7-5795b9fd75aa lastUpdatedTime: type: string description: Creation time for the bucket access key. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 additionalProperties: false iam.v4.1.b2.authn.BucketsAccessKeyStatusType: type: string description: "The status of the buckets access key, that is, valid, expired\ \ or revoked." enum: - VALID - REVOKED - EXPIRED - $UNKNOWN - $REDACTED x-enumDescriptions: REVOKED: Buckets access key is revoked. VALID: Buckets access key is valid. EXPIRED: Buckets access key is expired. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.PasswordChangeRequest: required: - newPassword - oldPassword - username type: object properties: username: maxLength: 255 type: string description: Identifier of the user. example: john_doe oldPassword: type: string description: Current password of the user. example: string newPassword: type: string description: New password of the user. example: string additionalProperties: false description: Information for password change of user. iam.v4.1.b2.authn.ChangeUserPasswordApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.PasswordChangeResponse oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.PasswordChangeResponse' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/users/$actions/change-password Post operation iam.v4.1.b2.authn.PasswordChangeResponse: description: Change user password response object. allOf: - $ref: '#/components/schemas/iam.v4.1.b2.common.ActionBaseResponse' iam.v4.1.b2.authn.GetUserApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.User oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.User' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}\ \ Get operation" iam.v4.1.b2.authn.UpdateUserApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.User oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.User' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}\ \ Put operation" iam.v4.1.b2.authn.PasswordResetRequest: required: - newPassword type: object properties: newPassword: type: string description: New password of the user. example: string additionalProperties: false description: Information for password reset of user. iam.v4.1.b2.authn.ResetUserPasswordApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.PasswordResetResponse oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.PasswordResetResponse' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}/$actions/reset-password\ \ Post operation" iam.v4.1.b2.authn.PasswordResetResponse: description: User password reset response. allOf: - $ref: '#/components/schemas/iam.v4.1.b2.common.ActionBaseResponse' iam.v4.1.b2.authn.UserStateUpdate: required: - status type: object properties: status: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserStatusType' additionalProperties: false description: Information to change state of user. iam.v4.1.b2.authn.ActivateUserApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.UserStateUpdateResponse oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.UserStateUpdateResponse' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/users/{extId}/$actions/change-state\ \ Post operation" iam.v4.1.b2.authn.UserStateUpdateResponse: description: User state update response object. allOf: - $ref: '#/components/schemas/iam.v4.1.b2.common.ActionBaseResponse' iam.v4.1.b2.authn.ListUserGroupsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authn.UserGroup' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups Get operation iam.v4.1.b2.authn.UserGroup: required: - groupType - idpId description: Information of the user group. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: groupType: $ref: '#/components/schemas/iam.v4.1.b2.authn.GroupType' idpId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: Identifier of the IDP for the user group. example: e5f39f94-0097-4247-975a-e9ac471739b5 name: maxLength: 255 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Common Name of the user group. example: grp123 distinguishedName: maxLength: 255 type: string description: Identifier for the user group in the form of a distinguished name. example: "cn=Grp123,cn=users,dc=domain1,dc=com" createdTime: type: string description: Creation time of the user group. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: Last updated time of the user group. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 createdBy: type: string description: User or Service who created the user group. readOnly: true example: 390b7801-7a80-5c94-8a07-8de63651b27b additionalProperties: false iam.v4.1.b2.authn.CreateUserGroupApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.UserGroup oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.UserGroup' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups Post operation iam.v4.1.b2.authn.GroupType: type: string description: Type of the user group. enum: - SAML - LDAP - $UNKNOWN - $REDACTED x-enumDescriptions: LDAP: User group belonging to a directory service (Open LDAP/AD). SAML: User group belonging to a SAML IDP. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authn.GetUserGroupApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.UserGroup oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.UserGroup' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups/{extId}\ \ Get operation" iam.v4.1.b2.authn.DeleteUserGroupApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.error.ErrorResponse oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authn/user-groups/{extId}\ \ Delete operation" iam.v4.1.b2.authn.GetWelcomeBannerApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.WelcomeBanner oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.WelcomeBanner' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/welcome-banner Get operation iam.v4.1.b2.authn.WelcomeBanner: type: object properties: content: maxLength: 10000 type: string description: Content of the welcome banner. example: string isEnabled: type: boolean description: Flag to denote whether the welcome banner is enabled or not. default: true createdTime: type: string description: Creation time of the welcome banner. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: Last updated time of the welcome banner. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 additionalProperties: false description: Welcome banner API. iam.v4.1.b2.authn.UpdateWelcomeBannerApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authn.WelcomeBanner oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authn.WelcomeBanner' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authn/welcome-banner Put operation iam.v4.1.b2.authz.ListAuthorizationPoliciesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthorizationPolicy' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies Get operation iam.v4.1.b2.authz.AuthorizationPolicy: required: - displayName - entities - identities - role description: An authorization policy that defines who can perform what operation on which entity. allOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.BaseAuthorizationPolicy' - type: object properties: identities: maxItems: 600 minItems: 1 type: array description: The identities for which the authorization policy is created. items: $ref: '#/components/schemas/iam.v4.1.b2.authz.IdentityFilter' createdTime: type: string description: The creation time of the authorization policy. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: The time when the authorization policy was last updated. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 createdBy: type: string description: User or Service Name that created the authorization policy. readOnly: true example: 390b7801-7a80-5c94-8a07-8de63651b27b isSystemDefined: type: boolean description: Flag identifying if the authorization policy is system-defined or not. readOnly: true default: true authorizationPolicyType: $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthorizationPolicyType' assignedUsersCount: type: integer description: Number of users assigned to the authorization policy. readOnly: true example: 74 assignedUserGroupsCount: type: integer description: Number of user groups assigned to the authorization policy. readOnly: true example: 79 additionalProperties: false iam.v4.1.b2.authz.CreateAuthorizationPolicyApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authz.AuthorizationPolicy oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthorizationPolicy' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies Post operation iam.v4.1.b2.authz.BaseAuthorizationPolicy: required: - displayName - entities - role description: "An authorization policy that defines who can perform what operation\ \ on which entity, without including identity details." allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: displayName: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: The display name for the authorization policy. example: Policy1 description: maxLength: 1000 pattern: "^[^<>;()&+%\\/\\\\\"`]*$" type: string description: Description of the Authorization Policy. example: Authorization policy-1 clientName: maxLength: 255 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Client that created the entity. readOnly: true example: Prism entities: maxItems: 500 minItems: 1 type: array description: The entities being qualified by the authorization policy. items: $ref: '#/components/schemas/iam.v4.1.b2.authz.EntityFilter' role: maxLength: 255 pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: The role associated with the authorization policy. example: 6e9e1f10-8937-4687-91e6-8da9f9b7ede8 additionalProperties: false iam.v4.1.b2.authz.IdentityFilter: type: object properties: identityFilter: type: object description: Information of the identity filter present in the IdentityFilter object. additionalProperties: false description: Identity filter object definition for the identities. iam.v4.1.b2.authz.AuthorizationPolicyType: type: string description: Type of authorization policy. enum: - USER_DEFINED - SERVICE_DEFINED - PREDEFINED_READ_ONLY - PREDEFINED_UPDATE_IDENTITY_ONLY - SERVICE_DEFINED_READ_ONLY - $UNKNOWN - $REDACTED x-enumDescriptions: PREDEFINED_READ_ONLY: "System-defined read-only ACP, that is, no modifications\ \ allowed." SERVICE_DEFINED_READ_ONLY: Read-only ACP defined by a service. PREDEFINED_UPDATE_IDENTITY_ONLY: System-defined ACP prohibiting any modifications from the customer. SERVICE_DEFINED: ACP defined by a service. $UNKNOWN: | Unknown value. USER_DEFINED: ACP defined by a user. $REDACTED: | Redacted value. iam.v4.1.b2.authz.Role: required: - displayName - operations description: A role to group the operations. allOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.BaseRole' - type: object properties: description: maxLength: 1000 pattern: "^[^<>;()&+%\\/\\\\\"`]*$" type: string description: Description of the role. example: Admin for cluster-X operations: maxItems: 2000 minItems: 1 type: array description: List of operations for the role. items: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string example: 7ff429bf-3e59-4ebe-a3d9-4765a4d107c7 accessibleClients: maxItems: 50 minItems: 0 type: array description: List of Accessible clients for the role. readOnly: true items: type: string example: Prism accessibleEntityTypes: maxItems: 500 minItems: 0 type: array description: List of Accessible Entity Types for the role. readOnly: true items: type: string example: role accessibleClientsCount: type: integer description: Count of Accessible clients for the role. readOnly: true example: 10 accessibleEntityTypesCount: type: integer description: Count of Accessible Entity Types for the role. readOnly: true example: 20 assignedUsersCount: type: integer description: Number of users assigned to the given role. format: int64 readOnly: true example: 55 assignedUserGroupsCount: type: integer description: Number of user groups assigned to the given role. format: int64 readOnly: true example: 5 createdTime: type: string description: The creation time of the role. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: The time when the role was last updated. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 createdBy: type: string description: User or Service Name that created the role. readOnly: true example: 390b7801-7a80-5c94-8a07-8de63651b27b isSystemDefined: type: boolean description: Flag identifying if the role is system-defined or not. readOnly: true default: true operationSchemaChangeImpact: $ref: '#/components/schemas/iam.v4.1.b2.authz.OperationSchemaChangeImpact' additionalProperties: false iam.v4.1.b2.authz.EntityFilter: type: object properties: entityFilter: type: object description: Information of the entity filter present in the EntityFilter object. additionalProperties: false description: Entity filter object definition for the entities. iam.v4.1.b2.authz.BaseRole: required: - displayName description: "A base role is a group of operations, but does not include the\ \ operation details." allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: displayName: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: The display name of the role. example: custom_role1 clientName: maxLength: 255 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Client that created the entity. example: Prism additionalProperties: false iam.v4.1.b2.authz.OperationSchemaChangeImpact: type: string description: "The impact of operation schema changes. Currently we support IMPACTED,\ \ NOT_IMPACTED and UNKNOWN." enum: - IMPACTED - NOT_IMPACTED - UNDETERMINED - $UNKNOWN - $REDACTED x-enumDescriptions: UNDETERMINED: This indicates that the given role could not be successfully scanned for analyzing the impact due to the current set of operation(s). IMPACTED: This indicates that the given role contains only the old operation(s) and is missing the newer equivalent operation(s). $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. NOT_IMPACTED: This indicates that the given role contains the newer equivalent operation(s) of the old operation(s). iam.v4.1.b2.authz.GetAuthorizationPolicyApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authz.AuthorizationPolicy oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthorizationPolicy' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies/{extId}\ \ Get operation" iam.v4.1.b2.authz.UpdateAuthorizationPolicyApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: common.v1.config.Message oneOf: - $ref: '#/components/schemas/common.v1.0.config.Message' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies/{extId}\ \ Put operation" iam.v4.1.b2.authz.DeleteAuthorizationPolicyApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.error.ErrorResponse oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/authorization-policies/{extId}\ \ Delete operation" iam.v4.1.b2.authz.AuthorizationRequest: required: - identity - requestList type: object properties: identity: $ref: '#/components/schemas/iam.v4.1.b2.authz.IdentityObject' requestList: maxItems: 25 minItems: 1 type: array description: List of requests to be authorized. items: $ref: '#/components/schemas/iam.v4.1.b2.authz.RequestObject' additionalProperties: false description: Request body for the authorization request. iam.v4.1.b2.authz.IdentityObject: type: object properties: identityType: $ref: '#/components/schemas/iam.v4.1.b2.authz.IdentityType' attributes: type: object description: Map of attributes for the Identity. additionalProperties: false description: Object defining the attributes of Identity (who). iam.v4.1.b2.authz.RequestObject: required: - entity - requestID type: object properties: requestID: type: string description: Unique qualifier of the request. example: string responseType: $ref: '#/components/schemas/iam.v4.1.b2.authz.ResponseType' entity: $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthorizeEntity' additionalProperties: false description: The incoming request. iam.v4.1.b2.authz.IdentityType: type: string description: Type of identity object. enum: - User - $UNKNOWN - $REDACTED x-enumDescriptions: User: Identity representing a user. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authz.ResponseType: type: string description: Type of response expected. enum: - BooleanResponse - FilterResponse - $UNKNOWN - $REDACTED x-enumDescriptions: FilterResponse: Response contains list of associated filters on which the access is allowed. $UNKNOWN: | Unknown value. BooleanResponse: Response contains true/false denoting whether request is authorized or not. $REDACTED: | Redacted value. iam.v4.1.b2.authz.AuthorizeEntity: required: - operation - type type: object properties: type: type: string description: Type of the entity. example: string operation: type: string description: operation being performed on the entity. example: string attributes: type: object description: Map of attributes for the entity. additionalProperties: false description: Entity on which the action is being performed. iam.v4.1.b2.authz.AuthorizationResponse: type: object properties: response: maxItems: 25 minItems: 1 type: array description: List of responses for the Authorization request. items: $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthorizationResponseObject' additionalProperties: false description: Entity on which the action is being performed. iam.v4.1.b2.authz.AuthorizationResponseObject: type: object properties: requestId: type: string description: Authorization Request Id. example: string responseType: $ref: '#/components/schemas/iam.v4.1.b2.authz.ResponseType' authorized: type: object description: "True if request was authorized, otherwise False." filters: type: object description: Filter expression. additionalProperties: false description: Authorization enforcement response. iam.v4.1.b2.authz.UserRole: description: List the roles associated with the identity/user making the API call allOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.BaseRole' - type: object properties: operations: maxItems: 2000 minItems: 1 type: array description: "The list of operations, presented as FQN, that belong to\ \ the given role, where FQN is of the format entity_type:client_name:operation_display_name(e.g.\ \ role:IAM:View_User_Role)." items: type: string example: string additionalProperties: false iam.v4.1.b2.authz.UserAuthorizationPolicy: description: The list of authorization policies associated with the user who is making the API call. allOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.BaseAuthorizationPolicy' iam.v4.1.b2.authz.Client: description: Information of the client registered. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - displayName - name type: object properties: name: maxLength: 255 minLength: 1 type: string description: Unique name of the client. example: Prism Service description: maxLength: 1000 pattern: "^[^<>;()&+%\\/\\\\\"`]*$" type: string description: Description of the client. example: Prism displayName: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: UI name of the client. example: Prism createdTime: type: string description: The creation time of the client. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: The time when the client was last updated. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 createdBy: type: string description: User or Service Name that created the client. readOnly: true example: 390b7801-7a80-5c94-8a07-8de63651b27b deploymentList: maxItems: 5 minItems: 1 type: array description: Deployment List related to the client. items: type: string example: onPrem additionalProperties: false iam.v4.1.b2.authz.GetClientApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authz.Client oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.Client' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/clients/{extId}\ \ Get operation" iam.v4.1.b2.authz.SeedConfigRequest: required: - clientName - configList - configType - operationType type: object properties: configType: $ref: '#/components/schemas/iam.v4.1.b2.authz.SeedConfigType' tenantId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: ID of tenant for which configuration is being set up. example: 59043b02-a0c2-40d5-a147-df3cb565eebb clientName: maxLength: 255 minLength: 1 type: string description: The name of the client for which the entities will be seeded. example: string operationType: $ref: '#/components/schemas/iam.v4.1.b2.authz.SeedConfigOperationType' configList: required: - $objectType properties: $objectType: type: string example: iam.v4.authz.ClientConfig description: List of entities to be seeded. oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.ClientConfig' - $ref: '#/components/schemas/iam.v4.1.b2.authz.SeedConfigEntityList' - $ref: '#/components/schemas/iam.v4.1.b2.authz.SeedConfigOperationList' - $ref: '#/components/schemas/iam.v4.1.b2.authz.SeedConfigRoleList' - $ref: '#/components/schemas/iam.v4.1.b2.authz.SeedConfigAuthorizationPolicyList' additionalProperties: false description: Request body for the configuration seeding request. iam.v4.1.b2.authz.SeedConfigType: type: string description: The type of entities which will be seeded. enum: - CLIENT - ENTITY - OPERATION - ROLE - AUTHORIZATION_POLICY - $UNKNOWN - $REDACTED x-enumDescriptions: ROLE: The roles config that will be seeded. AUTHORIZATION_POLICY: The authorization policies config that will be seeded. ENTITY: The entities config that will be seeded. OPERATION: The operations config that will be seeded. $UNKNOWN: | Unknown value. CLIENT: The client config that will be seeded. $REDACTED: | Redacted value. iam.v4.1.b2.authz.SeedConfigOperationType: type: string description: The type of operation to be performed on the entities. enum: - CREATE - UPDATE - $UNKNOWN - $REDACTED x-enumDescriptions: CREATE: A key type that is used to identify a service. UPDATE: A combination of access key and secret key to sign an API request. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authz.ClientConfig: description: Information of the client configuration that is registered. allOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.Client' - type: object properties: legacyClientName: type: string description: Identifier for the old/legacy client name. example: string additionalProperties: false iam.v4.1.b2.authz.SeedConfigEntityList: type: object properties: entities: maxItems: 200 minItems: 0 type: array description: The entities config that will be seeded. items: $ref: '#/components/schemas/iam.v4.1.b2.authz.EntityConfig' additionalProperties: false description: The entities config that will be seeded. iam.v4.1.b2.authz.SeedConfigOperationList: type: object properties: operations: maxItems: 500 minItems: 0 type: array description: The operation objects that will be seeded. items: $ref: '#/components/schemas/iam.v4.1.b2.authz.OperationConfig' additionalProperties: false description: The operation objects that will be seeded. iam.v4.1.b2.authz.SeedConfigRoleList: type: object properties: roles: maxItems: 50 minItems: 0 type: array description: The role objects that will be seeded. items: $ref: '#/components/schemas/iam.v4.1.b2.authz.RoleConfig' additionalProperties: false description: The role objects that will be seeded. iam.v4.1.b2.authz.SeedConfigAuthorizationPolicyList: type: object properties: authorizationPolicies: maxItems: 50 minItems: 0 type: array description: The authorization policies config that will be seeded. items: $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthorizationPolicyConfig' additionalProperties: false description: The authorization policies config that will be seeded. iam.v4.1.b2.authz.EntityConfig: description: Information of the entity configuration. allOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.Entity' - type: object properties: legacyObjectList: type: array description: List of old displayNames of the given entity which have been consolidated or renamed. items: type: string example: string isInternal: type: boolean description: Flag identifying if the entity is internal or not. example: false additionalProperties: false iam.v4.1.b2.authz.Entity: description: Information of the entity. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: name: maxLength: 255 minLength: 1 type: string description: Unique name of the entity. example: role description: maxLength: 1000 type: string description: Description of the entity. example: Grouping of operation to perform a targeted workflow displayName: maxLength: 255 minLength: 1 pattern: "^[^\\\"]*$" type: string description: UI display name of the entity. example: Role clientName: maxLength: 255 minLength: 1 type: string description: Name of client the entity belongs to. example: IAM searchURL: maxLength: 2000 minLength: 3 pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\\ .\\d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\?[^#\\\ s]*)?(#[^\\s]*)?$" type: string description: URL provided by the client to search the entities. example: "http://{{pc_ip}}/search_entity_url" createdTime: type: string description: The creation time of the entity. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: The time when the entity was last updated. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 createdBy: type: string description: User or Service Name that created the entity. readOnly: true example: 390b7801-7a80-5c94-8a07-8de63651b27b attributeList: maxItems: 10 minItems: 0 type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authz.AttributeEntity' isLogicalAndSupportedForAttributes: type: boolean description: Indicates whether the entity supports scoping using multiple attributes which will result in a logical AND. example: false additionalProperties: false iam.v4.1.b2.authz.AttributeEntity: description: List of attributes supported for access control on this entity. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: displayName: maxLength: 255 minLength: 1 pattern: "^[^\\\"]*$" type: string description: Display name of the entity's attribute used in Authorization Policy filters. example: Individual Entity name: maxLength: 255 minLength: 1 pattern: "^[^\\\"]*$" type: string description: Name of the entity's attribute used in Authorization Policy filters. example: role_uuid supportedOperators: maxItems: 5 minItems: 0 type: array description: List of supported operators for this entity. items: $ref: '#/components/schemas/iam.v4.1.b2.authz.EntityOperators' attributeValues: maxItems: 25 minItems: 0 type: array description: List of attributes supported for access control on this entity. items: type: string example: '*' additionalProperties: false iam.v4.1.b2.authz.EntityOperators: type: string description: Type of authorization policy. enum: - ALLOF - ANYOF - EQ - NONEOF - NOTEQ - $UNKNOWN - $REDACTED x-enumDescriptions: NONEOF: Access policy supported operator contains noneof. ANYOF: Access policy supported operator contains anyof. EQ: Access policy supported operator contains eq. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. ALLOF: Access policy supported operator contains allof. NOTEQ: Access policy supported operator contains noteq. iam.v4.1.b2.authz.OperationConfig: allOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.Operation' - type: object properties: isInternal: type: boolean description: Flag to denote if operation is internal or not. example: true legacyOperationList: type: array description: Legacy or existing Operation name(s) which have been replaced/consolidated by the new Operation name. items: type: string example: string legacyParentOperationList: type: array description: Existing operation name(s) which have been split into operations including the given new Operation name. items: type: string example: string additionalProperties: false iam.v4.1.b2.authz.Operation: allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: displayName: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Name of the operation. example: Create_Role description: maxLength: 1000 pattern: "^[^<>;()&+%\\/\\\\\"`]*$" type: string description: Description of the operation. example: Allows to create a role entityType: pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Type of entity associated with this operation. example: role clientName: maxLength: 255 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Client that created the entity. example: IAM createdTime: type: string description: The creation time of the operation. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: The time when the operation was last updated. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 operationType: $ref: '#/components/schemas/iam.v4.1.b2.authz.OperationType' relatedOperationList: maxItems: 1000 minItems: 0 type: array description: List of related operations. These are the operations that may need to be accessed along with the current operation in order for certain workflows to succeed. items: type: string example: 6efe370e-9b87-4d33-bf6b-06119d4cb303 associatedEndpointList: maxItems: 4 minItems: 0 type: array description: List of associated endpoint objects for the operation. items: $ref: '#/components/schemas/iam.v4.1.b2.authz.AssociatedEndpoint' migrationActionNotes: $ref: '#/components/schemas/iam.v4.1.b2.authz.MigrationActionNotes' additionalProperties: false iam.v4.1.b2.authz.OperationType: type: string description: "The operation type. Currently we support INTERNAL, EXTERNAL and\ \ SYSTEM_DEFINED_ONLY." enum: - INTERNAL - SYSTEM_DEFINED_ONLY - EXTERNAL - $UNKNOWN - $REDACTED x-enumDescriptions: EXTERNAL: This type of operation will be available to be consumed for custom role creation and it will be returned in GET/LIST API response. INTERNAL: This type of operation will not be available to be consumed for custom role creation and will not be returned in GET/LIST API response. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. SYSTEM_DEFINED_ONLY: This type of operation will not be available to be consumed for custom role creation but it will be returned in GET/LIST API response. iam.v4.1.b2.authz.AssociatedEndpoint: type: object properties: apiVersion: $ref: '#/components/schemas/iam.v4.1.b2.authz.ApiVersion' endpointUrl: pattern: "^((http[s]?|nfs):\\/)?\\/?(([a-zA-Z0-9\\-\\.]+)|(\\d{1,3}(\\.\\\ d{1,3}){3})|(\\[[0-9a-fA-F:]+\\]))(:\\d+)?(\\/[^\\s?#]*)?(\\?[^#\\s]*)?(#[^\\\ s]*)?$" type: string description: Endpoint URL. readOnly: true example: /roles httpMethod: $ref: '#/components/schemas/iam.v4.1.b2.authz.HttpMethod' additionalProperties: false description: "The object which defines the API endpoint, API version, and HTTP\ \ method for the API endpoint." iam.v4.1.b2.authz.MigrationActionNotes: required: - notes type: object properties: notes: maxLength: 1000 pattern: "^[^<>;()&+%\\/\\\\\"`]*$" type: string description: Specific detailed description around operation schema changes for the end user to understand the impact. readOnly: true example: Refer KB-0000 additionalProperties: false description: Operation schema change-specific notes for capturing information to surface to the user to take relevant actions. readOnly: true iam.v4.1.b2.authz.ApiVersion: type: string description: Version of the API for the provided associated endpoint. enum: - V3 - V4 - $UNKNOWN - $REDACTED x-enumDescriptions: $UNKNOWN: | Unknown value. V3: Version 3 API. V4: Version 4 API. $REDACTED: | Redacted value. iam.v4.1.b2.authz.HttpMethod: type: string description: HTTP method for the provided associated endpoint. enum: - POST - GET - PUT - PATCH - DELETE - $UNKNOWN - $REDACTED x-enumDescriptions: DELETE: HTTP method DELETE. POST: HTTP method POST. GET: HTTP method GET. $UNKNOWN: | Unknown value. PUT: HTTP method PUT. PATCH: HTTP method PATCH. $REDACTED: | Redacted value. iam.v4.1.b2.authz.RoleConfig: allOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.Role' - type: object properties: legacyRole: type: string description: Old IUN of the role. example: string isInternal: type: boolean description: Flag identifying if the role is internal or not. example: false additionalProperties: false iam.v4.1.b2.authz.AuthorizationPolicyConfig: allOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthorizationPolicy' - type: object properties: opaquedata: type: string description: Opaque data refers to the legacy filters used in the authorization policy. example: string isInternal: type: boolean description: Flag identifying if the authorization policy is internal or not. default: false additionalProperties: false iam.v4.1.b2.authz.ListEntitiesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authz.Entity' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/entities Get operation iam.v4.1.b2.authz.GetEntityApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authz.Entity oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.Entity' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/entities/{extId}\ \ Get operation" iam.v4.1.b2.authz.AuthzMigrationRequest: required: - migrationType type: object properties: migrationType: $ref: '#/components/schemas/iam.v4.1.b2.authz.AuthzMigrationType' additionalProperties: false description: The authZ migration API request body. iam.v4.1.b2.authz.AuthzMigrationType: type: string description: The type of authz migration. enum: - REMOVE_AP_TENANT_ID_FILTERS - NC_USER_AP_TO_USER_DEFINED - ASSIGN_BASIC_USER_AP_TO_NC_USER_AP_USERS_USERGROUPS - REMOVE_CLIENT_FOUNDATION_CENTRAL - MOVE_ROLES_APS_FROM_PRISM_CLOUD_IAM - REMOVE_DUPLICATE_APS_AFTER_NAMESPACE_MIGRATION - $UNKNOWN - $REDACTED x-enumDescriptions: ASSIGN_BASIC_USER_AP_TO_NC_USER_AP_USERS_USERGROUPS: The authZ migration enum type to assign basic user authorization policies to all users and user groups which are part of Nutanix Central user authorization policies. MOVE_ROLES_APS_FROM_PRISM_CLOUD_IAM: The authZ migration enum type to move roles and authorization policies from Prism namespace to actual namespace. REMOVE_AP_TENANT_ID_FILTERS: The authZ migration enum type to remove all tenant_id filters from all system-defined authorization policies. REMOVE_DUPLICATE_APS_AFTER_NAMESPACE_MIGRATION: The authZ migration enum type to remove duplicate authorization policies created after namespace migration. NC_USER_AP_TO_USER_DEFINED: The authZ migration enum type to convert all Nutanix Central user policies from system-defined to user-defined authorization policies. REMOVE_CLIENT_FOUNDATION_CENTRAL: The authZ migration enum type to remove client Foundation Central and it reference across other IAM entities for all tenants. $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authz.GetOperationApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authz.Operation oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.Operation' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/operations/{extId}\ \ Get operation" iam.v4.1.b2.authz.ListOperationsApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authz.Operation' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/operations Get operation iam.v4.1.b2.authz.ConfigChangeset: required: - changeset - clientName - configType - createdTime - displayName - lastUpdatedTime description: IAM configuration changset instance describing the change happened over the last deployed version. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: displayName: maxLength: 255 minLength: 1 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: The display name of the IAM configuration entity for which the changeset is generated. example: string clientName: maxLength: 255 pattern: "^[^<>;'()&+%\\/\\\\\"`]*$" type: string description: Client that created the entity. readOnly: true example: string configType: $ref: '#/components/schemas/iam.v4.1.b2.authz.ConfigType' changeset: $ref: '#/components/schemas/iam.v4.1.b2.authz.ConfigChangesetData' createdTime: type: string description: The creation time of the IAM configuration changeset record. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 lastUpdatedTime: type: string description: The time when the IAM configuration changeset record was last updated. format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 additionalProperties: false iam.v4.1.b2.authz.ConfigType: type: string description: Type of IAM configuration. enum: - OPERATION - ENTITY - $UNKNOWN - $REDACTED x-enumDescriptions: ENTITY: Configuration changeset type indicating IAM configuration as "entity". OPERATION: Configuration changeset type indicating IAM configuration as "operation". $UNKNOWN: | Unknown value. $REDACTED: | Redacted value. iam.v4.1.b2.authz.ConfigChangesetData: type: object properties: displayNameChangeset: $ref: '#/components/schemas/iam.v4.1.b2.authz.ConfigChangesetDisplayName' legacyObjectListChangeset: $ref: '#/components/schemas/iam.v4.1.b2.authz.ConfigChangesetDataObjects' legacyOperationListChangeset: $ref: '#/components/schemas/iam.v4.1.b2.authz.ConfigChangesetDataOperations' legacyParentOperationListChangeset: $ref: '#/components/schemas/iam.v4.1.b2.authz.ConfigChangesetDataOperations' additionalProperties: false description: The difference in the IAM configuration entity from the last deployed version. iam.v4.1.b2.authz.ConfigChangesetDisplayName: required: - newDisplayName - previousDisplayName type: object properties: newDisplayName: maxLength: 255 type: string description: The current display name of the IAM configuration entity. example: string previousDisplayName: maxLength: 255 type: string description: The old display name of the IAM configuration entity. example: string additionalProperties: false description: The changeset corresponding to the change in the display name of the IAM configuration entity. iam.v4.1.b2.authz.ConfigChangesetDataObjects: type: object properties: addedObjects: maxItems: 20 minItems: 1 type: array description: Configuration changeset data for added legacyObjectList entries. items: type: string example: string removedObjects: maxItems: 20 minItems: 1 type: array description: Configuration changeset data for removed legacyObjectList entries. items: type: string example: string additionalProperties: false description: The changeset data corresponding to IAM configuration "entity". iam.v4.1.b2.authz.ConfigChangesetDataOperations: type: object properties: addedOperations: maxItems: 20 minItems: 1 type: array description: Configuration changeset data for added IAM configuration "Operation" entries. items: type: string example: string removedOperations: maxItems: 20 minItems: 1 type: array description: Configuration changeset data for removed IAM configuration "Operation" entries. items: type: string example: string additionalProperties: false description: Configuration changeset data associated with the IAM configuration "Operation". iam.v4.1.b2.authz.ListRolesApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: oneOf: - type: array items: $ref: '#/components/schemas/iam.v4.1.b2.authz.Role' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/roles Get operation iam.v4.1.b2.authz.CreateRoleApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authz.Role oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.Role' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: REST response for all response codes in API path /iam/v4.1.b2/authz/roles Post operation iam.v4.1.b2.authz.GetRoleApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.authz.Role oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.authz.Role' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/roles/{extId}\ \ Get operation" iam.v4.1.b2.authz.UpdateRoleApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: common.v1.config.Message oneOf: - $ref: '#/components/schemas/common.v1.0.config.Message' - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/roles/{extId}\ \ Put operation" iam.v4.1.b2.authz.DeleteRoleApiResponse: type: object properties: metadata: $ref: '#/components/schemas/common.v1.0.response.ApiResponseMetadata' data: required: - $objectType properties: $objectType: type: string example: iam.v4.error.ErrorResponse oneOf: - $ref: '#/components/schemas/iam.v4.1.b2.error.ErrorResponse' additionalProperties: false description: "REST response for all response codes in API path /iam/v4.1.b2/authz/roles/{extId}\ \ Delete operation" iam.v4.1.b2.authz.MigrateRoleSpec: required: - shouldIncludeRelatedOperations type: object properties: shouldIncludeRelatedOperations: type: boolean description: Flag indicating whether to include related operations in the final list after migration. example: true additionalProperties: false description: Migrate role spec details. iam.v4.1.b2.authz.Tenant: required: - tenantId description: Tenant details for tenant to be onboarded to IAM. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: tenantName: maxLength: 255 minLength: 1 type: string description: Name of tenant for which configuration is being set up. example: string additionalProperties: false iam.v4.1.b2.tenant.Tenant: required: - tenantId description: Tenant details for tenant to be onboarded to IAM. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: tenantName: maxLength: 255 minLength: 1 type: string description: Name of tenant for which configuration is being set up. example: string tenantDescription: type: string description: Description of tenant for which configuration is being set up. example: string additionalProperties: false common.v1.0.response.ExternalizableAbstractModel: description: | A model that represents an object instance that is accessible through an API endpoint. Instances of this type get an extId field that contains the globally unique identifier for that instance. Externally accessible instances are always tenant aware and, therefore, extend the TenantAwareModel allOf: - $ref: '#/components/schemas/common.v1.0.config.TenantAwareModel' - type: object properties: extId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | A globally unique identifier of an instance that is suitable for external consumption. nullable: true readOnly: true example: a0469b2b-6bc3-4d9a-ad5f-9f7529b07a77 links: maxItems: 20 minItems: 0 type: array description: | A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. readOnly: true items: $ref: '#/components/schemas/common.v1.0.response.ApiLink' additionalProperties: false common.v1.0.config.TenantAwareModel: type: object properties: tenantId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: | A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this ID to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server). readOnly: true example: b80f638f-e35d-495e-b5e1-f88849683e24 additionalProperties: false description: | A model base class whose instances are bound to a specific tenant. This model adds a tenantId to the base model class that it extends and is automatically set by the server. common.v1.0.response.ApiLink: type: object properties: href: type: string description: | The URL at which the entity described by the link can be accessed. example: string rel: type: string description: | A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of "self" identifies the URL for the object. example: string additionalProperties: false description: | A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource. common.v1.0.config.KVPair: type: object properties: name: maxLength: 128 minLength: 3 type: string description: | The key of the key-value pair. example: string value: description: The value associated with the key for this key-value pair oneOf: - type: string description: | A string value in a key-value pair. example: string - type: integer description: | An integer value in a key-value pair. example: 52 - type: boolean description: | An boolean value in a key-value pair. example: true - maxItems: 100 minItems: 0 type: array description: | A value in a key-value pair that represents a list of strings. items: type: string example: string - type: object additionalProperties: type: string description: | A value in a key-value pair that represents a map of string keys and values. - maxItems: 20 minItems: 0 type: array description: | A value in a key-value pair that represents an array of maps of string keys and values. items: $ref: '#/components/schemas/common.v1.0.config.MapOfStringWrapper' - maxItems: 100 minItems: 0 type: array description: | A value in a key-value pair that represents a list of integers. items: type: integer example: 28 additionalProperties: false description: | A map describing a set of keys and their corresponding values. common.v1.0.config.MapOfStringWrapper: type: object properties: map: type: object additionalProperties: type: string description: | A map with string keys and values. additionalProperties: false description: | A wrapper schema containing a map with string keys and values. iam.v4.1.b2.authn.DirectoryServiceInfo: required: - groups - ous - userId type: object properties: userId: pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" type: string description: External identifier of a user. example: 5d21fb67-40b8-4d4c-afd8-3351f9a0c7eb groups: maxItems: 20 minItems: 0 type: array description: List of AD/LDAP groups having the user. items: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryServiceInfoGroup' ous: maxItems: 20 minItems: 0 type: array description: List of AD/LDAP OUs having the given user. items: $ref: '#/components/schemas/iam.v4.1.b2.authn.DirectoryServiceInfoOu' additionalProperties: false description: AD/LDAP information of the user. iam.v4.1.b2.authn.DirectoryServiceInfoGroup: description: Information of AD group having the user. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - name type: object properties: name: maxLength: 255 minLength: 1 type: string description: Name of the group. example: string additionalProperties: false iam.v4.1.b2.authn.DirectoryServiceInfoOu: description: Information of OUs having the user. allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - required: - name type: object properties: name: maxLength: 255 minLength: 1 type: string description: Name of the OU. example: string additionalProperties: false iam.v4.1.b2.common.SortOrderType: type: string description: DecRef(sortOrderDesc) enum: - ASC - DESC - $UNKNOWN - $REDACTED x-enumDescriptions: ASC: Ascending order for sorting. $UNKNOWN: | Unknown value. DESC: Descending order of sorting. $REDACTED: | Redacted value. iam.v4.1.b2.common.SchemaValidationErrorResponse: description: Api Response to Schema Validation Error allOf: - $ref: '#/components/schemas/common.v1.0.response.ExternalizableAbstractModel' - type: object properties: data: $ref: '#/components/schemas/iam.v4.1.b2.common.SchemaValidationError' additionalProperties: false iam.v4.1.b2.common.SchemaValidationError: type: object properties: error: $ref: '#/components/schemas/iam.v4.1.b2.common.SchemaValidationErrorMessage' additionalProperties: false description: Schema Validation Error iam.v4.1.b2.common.SchemaValidationErrorMessage: type: object properties: code: type: string description: Error code for Schema Validation Error example: string error: type: string description: The generic error message for the response example: string errorGroup: type: string description: Error group for Schema Validation error code example: string path: type: string description: API path on which the request was made example: string statusCode: type: integer description: The HTTP status code of the response example: 23 timestamp: type: string description: Timestamp of the response format: date-time readOnly: true example: 2009-09-23T14:30:00-07:00 validationErrorMessages: maxItems: 20 minItems: 0 type: array items: $ref: '#/components/schemas/iam.v4.1.b2.common.ValidationErrorMessage' additionalProperties: false description: Schema Validation Error Object iam.v4.1.b2.common.ValidationErrorMessage: type: object properties: message: type: string description: The detailed message for the validation error example: string additionalProperties: false description: Schema Validation Error Message iam.v4.1.b2.error.ErrorResponse: type: object properties: error: oneOf: - type: array items: $ref: '#/components/schemas/iam.v4.1.b2.error.AppMessage' - $ref: '#/components/schemas/iam.v4.1.b2.error.SchemaValidationError' additionalProperties: false description: An error response indicates that the operation has failed either due to a client error(4XX) or server error(5XX). Please look at the HTTP status code and namespace specific error code and error message for further details. x-platform-generated: true iam.v4.1.b2.error.MessageSeverity: type: string description: Enum schema MessageSeverity enum: - INFO - WARNING - ERROR - $UNKNOWN - $REDACTED x-platform-generated: true x-codegen-hint: $any: - type: entity-identifier properties: identifiers: - value: $UNKNOWN index: 201 - value: $REDACTED index: 202 - value: INFO index: 203 - value: WARNING index: 204 - value: ERROR index: 205 iam.v4.1.b2.error.SchemaValidationError: type: object properties: timestamp: type: string description: Timestamp of the response. format: date-time example: 2009-09-23T14:30:00-07:00 statusCode: type: integer description: The HTTP status code of the response. example: 72 error: type: string description: The generic error message for the response. example: string path: type: string description: API path on which the request was made. example: string validationErrorMessages: type: array description: List of validation error messages items: $ref: '#/components/schemas/iam.v4.1.b2.error.SchemaValidationErrorMessage' additionalProperties: false description: This schema is generated from SchemaValidationError.java x-platform-generated: true iam.v4.1.b2.error.SchemaValidationErrorMessage: type: object properties: location: type: string description: "The part of the request that failed validation. Validation\ \ can fail for path, query parameters, and request body." example: string message: type: string description: The detailed message for the validation error. example: string attributePath: type: string description: The path of the attribute that failed validation in the schema. example: string additionalProperties: false description: This schema is generated from SchemaValidationErrorMessage.java x-platform-generated: true common.v1.0.response.ApiResponseMetadata: type: object properties: flags: maxItems: 20 minItems: 0 type: array description: | An array of flags that may indicate the status of the response. For example, a flag with the name 'isPaginated' and value 'false', indicates that the response is not paginated. items: $ref: '#/components/schemas/common.v1.0.config.Flag' links: maxItems: 20 minItems: 0 type: array description: | An array of HATEOAS style links for the response that may also include pagination links for list operations. items: $ref: '#/components/schemas/common.v1.0.response.ApiLink' totalAvailableResults: type: integer description: | The total number of entities that are available on the server for this type. format: int32 example: 60 messages: maxItems: 20 minItems: 0 type: array description: | Information, Warning or Error messages that might provide additional contextual information related to the operation. items: $ref: '#/components/schemas/common.v1.0.config.Message' extraInfo: maxItems: 20 minItems: 0 type: array description: | An array of entity-specific metadata items: $ref: '#/components/schemas/common.v1.0.config.KVPair' additionalProperties: false description: | The metadata associated with an API response. This value is always present and minimally contains the self-link for the API request that produced this response. It also contains pagination data for the paginated requests. common.v1.0.config.Flag: type: object properties: name: maxLength: 128 minLength: 3 type: string description: | Name of the flag. example: string value: type: boolean description: | Value of the flag. default: false additionalProperties: false description: | Many entities in the Nutanix APIs carry flags. This object captures all the flags associated with that entity through this object. The field that hosts this type of object must have an attribute called x-bounded-map-keys that tells which flags are actually present for that entity. common.v1.0.config.Message: type: object properties: code: type: string description: | A code that uniquely identifies a message. example: string message: type: string description: | The description of the message. example: string locale: type: string description: | The locale for the message description. default: en_US severity: $ref: '#/components/schemas/common.v1.0.config.MessageSeverity' additionalProperties: false common.v1.0.config.MessageSeverity: type: string description: | The message severity. enum: - INFO - WARNING - ERROR - $UNKNOWN - $REDACTED x-enumDescriptions: ERROR: | Error indicating failed completion. INFO: | Information about successful completion. $UNKNOWN: | Unknown value. WARNING: | Warning indicating future error. $REDACTED: | Redacted value. securitySchemes: basicAuthScheme: type: http scheme: basic apiKeyAuthScheme: type: apiKey name: X-ntnx-api-key in: header