PolicySetManagement command group for the AdminTask object

You can use the Jython or Jacl scripting languages to manage policy set configurations with the wsadmin tool. Use the commands and parameters in the PolicySetManagement group to create, delete, and manage policy set, policy, and policy set attachment configurations.

Before you use the commands in this topic, verify that you are using the most recent version of the wsadmin tool. The policy set management commands that accept a properties object as the value for the attributes or bindingLocation parameters are not supported on previous versions of the wsadmin tool. For example, the commands do not run on a Version 6.1.0.x node.

listPolicySets

The listPolicySets command returns a list of all existing policy sets. If administrative security is enabled, each user role can use this command.

Target object

None.

Optional parameters

-policySetType
Specifies the type of policy set. Specify application to display application policy sets. Specify system to display system policy sets for trust service or WS-MetadataExchange attachments. Specify system/trust to display the policy sets for the trust service. Specify default to display the default policy sets. The default value for this parameter is application. (String, optional)
-fromDefaultRepository
Specifies whether to use the default repository. (Boolean, optional)

Return value

The command returns a list of all existing policy sets. Each entry in the list is the name of a policy set.

Batch mode example usage

  • Using Jython string:
    AdminTask.listPolicySets('[-policySetType system/trust]')
  • Using Jython list:
    AdminTask.listPolicySets(['-policySetType', 'system/trust'])

Interactive mode example usage

  • Using Jython:
    AdminTask.listPolicySets('-interactive')

getPolicySet

The getPolicySet command returns general attributes, such as description and default indicator, for the specified policy set. If administrative security is enabled, each user role can use this command.

Target object

None.

Required parameters

-policySet
Specifies the policy set name. For a list of all policy set names, use the listPolicySets command. (String, required)

Optional parameters

-isDefaultPolicySet
Specifies whether to display a default policy set. The default value is false. (Boolean, optional)
-fromDefaultRepository
Specifies whether to use the default repository. (Boolean, optional)

Return value

The command returns a list of attributes for the specified policy set name.

Batch mode example usage

  • Using Jython string:
    AdminTask.getPolicySet('[-policySet SecureConversation]')
  • Using Jython list:
    AdminTask.getPolicySet(['-policySet', 'SecureConversation'])

Interactive mode example usage

  • Using Jython:
    AdminTask.getPolicySet('-interactive')

createPolicySet

The createPolicySet command creates a new policy set. Policies are not created with the policy set. The default indicator is set to false.

If administrative security is enabled, you must use the Administrator role to create policy sets.

Target object

None.

Required parameters

-policySet
Specifies the name of the policy set. (String, required)

Optional parameters

-description
Adds a description for the policy set. (String, required)
-policySetType
Specifies the type of policy set. When the value is application, the command creates application policy sets. When the value is system, the command creates a policy set that you can use for trust service or WS-MetadataExchange attachments. When the value is system/trust, the command creates a policy set for the trust service. The default value for this parameter is application. (String, optional)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.createPolicySet('[-policySet myCustomPS -description [my new custom policy 
     set] -policySetType system/trust]')
  • Using Jython list:
    AdminTask.createPolicySet(['-policySet', 'myCustomPS', '-description',  '[my new custom 
     policy set]', '-policySetType', 'system/trust'])

Interactive mode example usage

  • Using Jython:
    AdminTask.createPolicySet('-interactive')

copyPolicySet

The copyPolicySet command creates a copy of an existing policy set. By default, the policy set attachments are transferred to the new policy set.

If administrative security is enabled, you must use the Administrator role to copy policy sets.

Target object

None.

Required parameters

-sourcePolicySet
Specifies the name of the existing policy set to copy. (String, required)
-newPolicySet
Specifies the name of the new policy set you are creating. (String, required)
-newDescription
Specifies a description for the new policy set. (String, required)

Optional parameters

-transferAttachments
If this parameter is set to true, all attachments transfer from the source policy set to the new policy set. The default value is false. (Boolean, optional)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.copyPolicySet('[-sourcePolicySet SecureConversation -newPolicySet  
     CustomSecureConversation -newDescription [my new copied policy set] -transferAttachments true]')
  • Using Jython list:
    AdminTask.copyPolicySet(['-sourcePolicySet', 'SecureConversation', '-newPolicySet',  
     'CustomSecureConversation', '-newDescription', '[my new copied policy set]',  '-transferAttachments', 
     'true'])

Interactive mode example usage

  • Using Jython:
    AdminTask.copyPolicySet('-interactive')

deletePolicySet

The deletePolicySet command deletes the specified policy set. If attachments exist for the policy set, the command returns a failure message.

If administrative security is enabled, you must use the Administrator role to delete policy sets.

Target object

None.

Required parameters

-policySet
Specifies the name of the policy set to delete. (String, required)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.deletePolicySet('[-policySet customSecureConversation]')
  • Using Jython list:
    AdminTask.deletePolicySet(['-policySet', 'customSecureConversation'])

Interactive mode example usage

  • Using Jython:
    AdminTask.deletePolicySet('-interactive')

updatePolicySet

The updatePolicySet command enables you to input an attribute list to update the policy set. You can use this command to update all attributes for the policy set, or a subset of attributes.

If administrative security is enabled, you must use the Administrator role to update policy set configurations.

Target object

None.

Required parameters

-policySet
Specifies the name of the policy set to update. (String, required)
-attributes
Specifies a properties object that contains the attributes to update for the specified policy set. (Properties, required)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.updatePolicySet('-policySet policySet1 -attributes [[type application] 
     [description [my policy set description]]]')
  • Using Jython list:
    AdminTask.updatePolicySet(['-policySet', 'policySet1', '-attributes', '[[type 
     application] [description [my policy set description]]]'])

Interactive mode example usage

  • Using Jython:
    AdminTask.updatePolicySet('-interactive')

addPolicyType

The addPolicyType command adds a policy with default values for the specified policy set. You must indicate whether to enable or disable the added policy.

If administrative security is enabled, you must use the Administrator role to add policies.

Target object

None.

Required parameters

-policySet
Specifies the name of the policy set to update. (String, required)
-policyType
Specifies the name of the policy to add to the policy set. (String, required)
-enabled
If this parameter is set to true, new policy is enabled in the policy set. If this parameter is set to false, the configuration is contained within the policy set but the configuration does not have an effect on the system. (Boolean, required)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.addPolicyType('[-policySet customPolicySet -policyType WSTransaction 
     -enabled true]')
  • Using Jython list:
    AdminTask.addPolicyType(['-policySet', 'customPolicySet', '-policyType', 
     'WSTransaction', '-enabled', 'true'])

Interactive mode example usage

  • Using Jython:
    AdminTask.addPolicyType('-interactive')

deletePolicyType

The deletePolicyType command deletes a policy from a policy set.

If administrative security is enabled, you must use the Administrator role to remove policies from your configuration.

Target object

None.

Required parameters

-policySet
Specifies the name of the policy set to update. (String, required)
-policyType
Specifies the name of the policy to remove from the policy set. (String, required)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.deletePolicyType('[-policySet customPolicySet -policyType WSTransaction]')
  • Using Jython list:
    AdminTask.deletePolicyType(['-policySet', 'customPolicySet', '-policyType', 
     'WSTransaction'])

Interactive mode example usage

  • Using Jython:
    AdminTask.deletePolicyType('-interactive')

validatePolicySet

The validatePolicySet command validates the policy set configuration.

If administrative security is enabled, you must use the Administrator role to validate policy sets.

Target object

None.

Required parameters

-policySet
Specifies the policy set to update. (String, required)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.validatePolicySet('[-policySet customSecureConversation]')
  • Using Jython list:
    AdminTask.validatePolicySet(['-policySet', 'customSecureConversation'])

Interactive mode example usage

  • Using Jython:
    AdminTask.validatePolicySet('-interactive')

exportPolicySet

The exportPolicySet command exports a policy set as an archive that can be copied onto a client environment.

If administrative security is enabled, you must use the Administrator role to export policy sets.

Target object

None.

Required parameters

-policySet
Specifies the policy set to export. (String, required)
-pathName
Specifies the path name of the archive file to create. (String, required)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.exportPolicySet('[-policySet customSecureConversation -pathName  
     C:/IBM/WebSphere/AppServer/PolicySets/customSC.zip]')
  • Using Jython list:
    AdminTask.exportPolicySet(['-policySet', 'customSecureConversation;, '-pathName', ' 
     C:/IBM/WebSphere/AppServer/PolicySets/customSC.zip'])

Interactive mode example usage

  • Using Jython:
    AdminTask.exportPolicySet('-interactive')

importPolicySet

The importPolicySet command imports a policy set from a compressed archive file or from a selection of default policy sets onto the server environment.

If administrative security is enabled, you must use the Administrator role to import policy sets.

Target object

None.

Optional parameters

-importFile
Specifies the path name of the archive file to import. (String, optional)
-defaultPolicySet
Specifies the name of the default policy set to import. (String, optional)
-policySet
Specifies the name to assign to the new policy set. If you do not specify this parameter, the system uses the original name of the policy set. (String, optional)
-verifyPolicySetType
Specifies that the policy set type to import matches a specific type. Specify system or system/trust to verify that the policy set to import is a type of system policy set, including trust service policy sets. Specify application to verify that the policy set is an application policy set. (String, optional)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.importPolicySet('[-importFile C:/IBM/WebSphere/AppServer/PolicySets/customSC.zip]')
  • Using Jython list:
    AdminTask.importPolicySet(['-importFile', 'C:/IBM/WebSphere/AppServer/PolicySets/customSC.zip'])

Interactive mode example usage

  • Using Jython:
    AdminTask.importPolicySet('-interactive')

listPolicyTypes

The listPolicyTypes command returns a list of the names of the policies configured on your system. The input parameters allow you to list each policy type configured in the system, the policy types configured in a policy set, or the policy types in a binding.

If administrative security is enabled, each administrative role can list policy types.

Target object

None.

Optional parameters

-policySet
Specifies the name of the policy set to query for policies. If the policy set is not specified, the command lists all policies defined in your configuration. (String, optional)
-bindingLocation
Specifies the location of the binding. This value is cell-wide default binding, server-specific default binding, or attachment-specific binding. Specify the bindingLocation parameter as a properties object following these guidelines:
  • For cell-wide default binding, use a null or empty properties.
  • For server-specific default binding, specify the node and server names in the properties. The property names are node and server. Server-specific default bindings are deprecated.
  • For attachment-specific binding, specify the application name and attachment ID in the properties. The property names are application and attachmentId.
  • For system/trust bindings, set the systemType property as trustService.
  • For trust client bindings, specify the systemType property as trustClient. In addition, specify the attachment ID. If the bindings are for a specific application, also specify the application property.
  • For WSNClient binding, specify the bus name, service name, and attachment ID in the properties. The property names are bus, WSNService, and attachmentId.
(Properties, optional)
-attachmentType
Specifies whether the attachment type is an application binding, client binding, trust service binding, trust client binding, or WS-Notification client binding. (String, optional)
For transitioning users: Even though you can specify the application value for the -attachmentType parameter, use the provider value in place of the application value because the attachments are used for more than just applications, such as system attachments for trust service. For system policy set attachments, specify the provider value for the attachmentType parameter and the "[systemType trustService]" value for the -attachmentProperties parameter. For WSNClient attachments, specify the client value for the attachmentType parameter and the bus and WSNService properties with the -attachmentProperties parameter.
-bindingName
Specifies a specific general binding. If you specify this parameter, the system displays policy types in the specific binding. (String, optional)
-fromDefaultRepository
Specifies whether to use the default repository. (Boolean, optional)

Return value

The command returns a list of policy types.

Batch mode example usage

  • Using Jython string:
    AdminTask.listPolicyTypes('[-policySet customSecureConversation]')
  • Using Jython list:
    AdminTask.listPolicyTypes(['-policySet', 'customSecureConversation'])

Interactive mode example usage

  • Using Jython:
    AdminTask.listPolicyTypes('[-interactive]')

getPolicyType

The getPolicyType command returns the attributes for a specified policy.

If administrative security is enabled, each administrative role can query attributes for policies.

Target object

None.

Required parameters

-policySet
Specifies the name of the policy set to query. (String, required)
-policyType
Specifies the name of the policy of interest. (String, required)

Optional parameters

-attributes
Specifies the specific attributes to display. If this parameter is not used, the command returns all attributes for the specified policy. (String[], optional)
-fromDefaultRepository
Specifies whether to use the default repository. (Boolean, optional)

Return value

The command returns a properties object containing the policy attributes.

Batch mode example usage

  • Using Jython string:
    AdminTask.getPolicyType('[-policySet customSecureConversation -policyType 
     SecureConversation]')
  • Using Jython list:
    AdminTask.getPolicyType(['-policySet', 'customSecureConversation', '-policyType', 'SecureConversation'])

Interactive mode example usage

  • Using Jython:
    AdminTask.getPolicyType (['-interactive'])

setPolicyType

The setPolicyType command updates the attributes of a specified policy.
Avoid trouble: The administrative console command assistance provides incorrect Jython syntax for the setPolicyType command. The XPath expression for the response message part protection of the Username WSSecurity policy set contains single quotes (') within each XPath property value, which Jython does not support. To fix the command from the administrative console command assistance, add a backslash character (\) before each single quote to escape the single quote.

Also, if you are using a Jython script to update the attributes, the brackets should not be included if you want to get a list of elements and not a list of strings.

If administrative security is enabled, you must use the Administrator role to configure policies.

Target object

None.

Required parameters

-policySet
Specifies the name of the policy set of interest. (String, required)
-policyType
Specifies the name of the policy of interest. (String, required)
-attributes
Specifies the specific attributes to be updated. The properties could include all of the policy attributes or a subset of attributes. (Properties, required)

Optional parameters

-replace
Indicates whether the new attributes provided from the command replace the existing policy attributes. For policies with complex data, you can remove optional parts of the configuration when necessary. Use this parameter to get all attributes, perform edits, and replace the binding configuration with the edited data. The default value is false. (Boolean, optional)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.setPolicyType('[-policySet customSecureConversation -policyType 
     SecureConversation -attributes [[type application] [description [my new description]]]]')
  • Using Jython list:
    AdminTask.setPolicyType(['-policySet', 'customSecureConversation', '-policyType', 'SecureConversation',
     '-attributes',
     '[[type application] [description [my new description]]]'])

Interactive mode example usage

  • Using Jython:
    AdminTask.setPolicyType('-interactive')

getPolicyTypeAttribute

The getPolicyTypeAttribute command returns the value for the specified policy attribute.

If administrative security is enabled, each administrative role can query policy type attribute values.

Target object

None.

Required parameters

-policySet
Specifies the name of the policy set of interest. (String, required)
-policyType
Specifies the name of the policy of interest. (String, required)
-attributeName
Specifies the name of the attribute of interest. (String, required)
-fromDefaultRepository
Specifies whether to use the default repository. (Boolean, optional)

Optional parameters

-fromDefaultRepository
Specifies whether to use the default repository. (Boolean, optional)

Return value

The command returns a string that contains the value of the specified attribute.

Batch mode example usage

  • Using Jython string:
    AdminTask.getPolicyTypeAttribute('[-policySet customSecureConversation  -policyType 
     SecureConversation -attributeName type]')
  • Using Jython list:
    AdminTask.getPolicyTypeAttribute(['-policySet', 'customSecureConversation',  '-policyType', 
     'SecureConversation', '-attributeName', 'type'])

Interactive mode example usage

  • Using Jython:
    AdminTask.getPolicyTypeAttribute('-interactive')

setPolicyTypeAttribute

The setPolicyTypeAttribute command sets the value for the specified policy attribute.

If administrative security is enabled, you must use the Administrator role to configure policy attributes.

Target object

None.

Required parameters

-policySet
Specifies the name of the policy set of interest. (String, required)
-policyType
Specifies the name of the policy of interest. (String, required)
-attributeName
Specifies the name of the attribute of interest. (String, required)
-attributeValue
Specifies the value of the attribute of interest. (String, required)

Return value

If the attribute is successfully added to the policy, the command returns the true string value.

Batch mode example usage

  • Using Jython string:
    AdminTask.setPolicyTypeAttribute('[-policySet customPolicySet  -policyType 
     WSReliableMessaging -attributeName specLevel  -attributeValue 1.0]')
  • Using Jython list:
    AdminTask.setPolicyTypeAttribute(['-policySet', 'customPolicySet',  '-policyType', 
     'WSReliableMessaging', '-attributeName', 'specLevel',  '-attributeValue', '1.0'])

Interactive mode example usage

  • Using Jython:
    AdminTask.setPolicyTypeAttribute('-interactive')

getPolicySetAttachments

The getPolicySetAttachments command lists the properties for all policy set attachments configured in a specified application.

If administrative security is enabled, each administrative role can query for policy set attachments.

Target object

None.

Optional parameters

-applicationName
Specifies the name of the application to query for policy set attachments. For application and client attachments, this parameter is required. This parameter is not required to query for trust service attachments. (String, optional)
-attachmentType
Specifies the type of policy set attachments. (String, optional)
For transitioning users: Even though you can specify the application value for the -attachmentType parameter, use the provider value in place of the application value because the attachments are used for more than just applications, such as system attachments for trust service. For system policy set attachments, specify the provider value for the attachmentType parameter and the "[systemType trustService]" value for the -attachmentProperties parameter. For WSNClient attachments, specify the client value for the attachmentType parameter and the bus and WSNService properties with the -attachmentProperties parameter.
-expandResources
Provides expanded information that details the attachment properties for each resource. If you set this parameter to the name of the service, only the resources for that web service are returned. If you specify an asterisk ( * ) character, expanded information for all your Web services is returned. This parameter is valid if the value for the -attachmentType parameter is set to provider or client. (String, optional)
-attachmentProperties
Specifies information that is required to identify the location of the attachment. For WSNClient attachments, specify the attachmentType parameter as client, and use the -attachmentProperties parameter to specify the bus and WSNService properties. For system policy set attachments, specify the attachmentType parameter as provider, and use the -attachmentProperties parameter to set the systemType property value to trustService. If a trust client attachment is specified, the -attachmentProperties parameter contains a systemType property with a value of trustClient. (Properties, optional)
-serviceRef
Specifies the name of the service reference for which the attachments are returned. If specified, only attachments for the service reference are returned. This parameter is only valid when the expandResources parameter value is the name of your service and when the attachmentType parameter is set to client. (String, optional)

Return value

The command returns a list of properties for each attachment in the application, including the policy set name, attachment ID, and resource list. If you specify the expandResources parameter, the command returns the resource, attachmentId, policySet, binding, and directAttachment properties. If a resource is not attached to a policy set, then the system only displays the resource property. The binding property only exists if the attachment contains a custom binding.

Batch mode example usage

  • Using Jython string:
    AdminTask.getPolicySetAttachments('[-attachmentType provider -attachmentProperties 
    "[systemType trustService]"]')
  • Using Jython list:
    AdminTask.getPolicySetAttachments(['-attachmentType', 'provider', '-attachmentProperties', 
     '[systemType trustService]'])
The following examples return policy set attachments information for the specified service reference, myServiceRef. The examples return detailed resource information for the logical endpoints or operations for each service reference because the -expandResource parameter is specified.
  • Using Jython string:
    AdminTask.getPolicySetAttachments('[-attachmentType client -applicationName application1 -expandResources
     {https://www.ibm.com}myService -serviceRef myServiceRef]') 
  • Using Jython list:
    AdminTask.getPolicySetAttachments(['-attachmentType', 'client', '-applicationName', 'application1', 
    '-expandResources', '{https://www.ibm.com}myService', -serviceRef', 'myServiceRef'])

Interactive mode example usage

  • Using Jython list:
    AdminTask.getPolicySetAttachments('-interactive')

createPolicySetAttachment

The createPolicySetAttachment command creates a new policy set attachment for an application.

When administrative security is enabled, verify that you use the correct administrative role, as the following table describes:
Table 1. Administrative roles . This table describes the administrative roles and associated authorization when administrative security is enabled.
Administrative role Authorization
Administrator The Administrator role must have cell-wide access to create policy set attachments. If you have access to a specific resource only, you can create policy set attachments for the resource for which you have access.
Configurator The Configurator role must have cell-wide access to create policy set attachments. If you have access to a specific resource only, you can create policy set attachments for the resource for which you have access.
Deployer The Deployer role with cell-wide or resource specific access can create policy set attachments for application resources only.
Operator The Operator role cannot create policy set attachments.
Monitor The Monitor role cannot create policy set attachments.

Target object

None.

Required parameters

-resources
Specifies the name of the application resources to attach to the policy set. (String[], required)

Optional parameters

-applicationName
Specifies the name of the application of interest for policy set attachments. For application and client attachments, this parameter is required. This parameter is not required for trust service attachments. (String, optional)
-attachmentType
Specifies the type of policy set attachments. (String, optional)
For transitioning users: Even though you can specify the application value for the -attachmentType parameter, use the provider value in place of the application value because the attachments are used for more than just applications, such as system attachments for trust service. For system policy set attachments, specify the provider value for the attachmentType parameter and the "[systemType trustService]" value for the -attachmentProperties parameter. For WSNClient attachments, specify the client value for the attachmentType parameter and the bus and WSNService properties with the -attachmentProperties parameter.
-dynamicClient
Set this parameter to true, the system will not recognize the client resources. This option specifies that the client resources are not validated. (Boolean, optional)
-attachmentProperties
Specifies information that is required to identify the location of the attachment. For WSNClient attachments, specify the attachmentType parameter as client, and use the -attachmentProperties parameter to specify the bus and WSNService properties. For system policy set attachments, specify the attachmentType parameter as provider, and use the -attachmentProperties parameter to set the systemType property value to trustService. If a trust client attachment is specified, the -attachmentProperties parameter contains a systemType property with a value of trustClient. (Properties, optional)
-inheritFromService
Specifies whether the resources for the service reference inherit the policy set attachments of the associated service. Use this parameter for service reference attachments only. The default value for this parameter is true. (Boolean, optional)
-policySet
Specifies the name of the policy set to attach. This parameter is required unless the resource specifies a service reference and the inheritFromService parameter is specified. If the policySet parameter is not specified and the inheritFromService parameter isfalse, all attachments for the service reference are removed, and the service reference does not have a policy set attachment. If the policySet parameter is not specified and the inheritFromService parameter is true, all attachments for the service reference are removed, and the service reference inherits the policy of the service. (String, optional)

Return value

The command returns a string with the ID of the new attachment.

Batch mode example usage

  • Using Jython string:
    AdminTask.createPolicySetAttachment('[-policySet policyset1 -resources "WebService:/" -applicationName 
    WebService -attachmentType provider]')
  • Using Jython list:
    AdminTask.createPolicySetAttachment(['-policySet', 'policyset1', '-resources', '"WebService:/"', 
    '-applicationName', 'WebService',
     '-attachmentType', 'provider'])

Interactive mode example usage

  • Using Jython:
    AdminTask.createPolicySetAttachment('-interactive')
Mixed-version environment: In a mixed cell environment, you must not create service reference attachments or resource attachments that are specified in name-value pair format for applications that are deployed on an application server that is prior to WebSphere® Application Server Version 8.0. Service reference attachments are only supported on WebSphere Application Server Version 8.0 and later.

In a mixed cell environment, you must not create attachments to policy sets containing CustomProperties policy for applications that are deployed on an application server that is prior to WebSphere Application Server Version 8.0. The CustomProperties policy is only supported on WebSphere Application Server Version 8.0 and later.

updatePolicySetAttachment

The updatePolicySetAttachment command updates the resources that apply to a policy set attachment.

When administrative security is enabled, verify that you use the correct administrative role, as the following table describes:

Table 2. Administrative roles . This table describes the administrative roles and associated authorization when administrative security is enabled.
Administrative role Authorization
Administrator The Administrator role must have cell-wide access to configure policy set attachments. If you have access to a specific resource only, you can configure policy set attachments for the resource for which you have access.
Configurator The Configurator role must have cell-wide access to configure policy set attachments. If you have access to a specific resource only, you can configure policy set attachments for the resource for which you have access.
Deployer The Deployer role with cell-wide or resource specific access can configure policy set attachments for application resources only.
Operator The Operator role cannot configure policy set attachments.
Monitor The Monitor role cannot configure policy set attachments.

Target object

None.

Required parameters

-attachmentId
Specifies the name of the attachment to update. (String, required)
-resources
Specifies the names of the application resources to attach to the policy set. A resource for a service reference cannot be included in the same attachment as a resource for a service. (String, required)

Optional parameters

-applicationName
Specifies the name of the application of interest for policy set attachments. For application and client attachments, this parameter is required. This parameter is not required for trust service attachments. (String, optional)
-attachmentType
Specifies the type of policy set attachments. (String, optional)
For transitioning users: Even though you can specify the application value for the -attachmentType parameter, use the provider value in place of the application value because the attachments are used for more than just applications, such as system attachments for trust service. For system policy set attachments, specify the provider value for the attachmentType parameter and the "[systemType trustService]" value for the -attachmentProperties parameter. For WSNClient attachments, specify the client value for the attachmentType parameter and the bus and WSNService properties with the -attachmentProperties parameter.
-dynamicClient
Set this parameter to true, the system will not recognize the client resources. This option specifies that the client resources are not validated. (Boolean, optional)
-attachmentProperties
Specifies information that is required to identify the location of the attachment. For WSNClient attachments, specify the attachmentType parameter as client, and use the -attachmentProperties parameter to specify the bus and WSNService properties. For system policy set attachments, specify the attachmentType parameter as provider, and use the -attachmentProperties parameter to set the systemType property value to trustService. If a trust client attachment is specified, the -attachmentProperties parameter contains a systemType property with a value of trustClient. (Properties, optional)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.updatePolicySetAttachment('[-attachmentId 123 -resources "WebService:/"]')
  • Using Jython list:
    AdminTask.updatePolicySetAttachment(['-attachmentId', '123', '-resources', 
     '"WebService:/"'])

Interactive mode example usage

  • Using Jython:
    AdminTask.updatePolicySetAttachment ('-interactive')
Mixed-version environment: In a mixed cell environment, you must not create service reference attachments or resource attachments that are specified in name-value pair format for applications that are deployed on an application server that is prior to Version 8.0. Service reference attachments are only supported on Version 8.0 and later.

In a mixed cell environment, you must not create attachments to policy sets containing CustomProperties policy for applications that are deployed on an application server that is prior to WebSphere Application Server Version 8.0. The CustomProperties policy is only supported on WebSphere Application Server Version 8.0 and later.

addToPolicySetAttachment

The addToPolicySetAttachment command adds additional resources that apply to a policy set attachment.

When administrative security is enabled, verify that you use the correct administrative role, as the following table describes:

Table 3. Administrative roles . This table describes the administrative roles and associated authorization when administrative security is enabled.
Administrative role Authorization
Administrator The Administrator role must have cell-wide access to add resources to policy set attachments. If you have access to a specific resource only, you can add resources to policy set attachments for the resource for which you have access.
Configurator The Configurator role must have cell-wide access to add resources to policy set attachments. If you have access to a specific resource only, you can add resources to policy set attachments for the resource for which you have access.
Deployer The Deployer role with cell-wide or resource specific access can add resources to policy set attachments for application resources only.
Operator The Operator role cannot add resources to policy set attachments.
Monitor The Monitor role cannot add resources to policy set attachments.

Target object

None.

Required parameters

-attachmentId
Specifies the name of the attachment to update. (String, required)
-resources
Specifies the names of the application resources to attach to the policy set. A resource for a service reference cannot be included in the same attachment as a resource for a service. (String, required)

Optional parameters

-applicationName
Specifies the name of the application of interest for policy set attachments. For application and client attachments, this parameter is required. This parameter is not required for trust service attachments. (String, optional)
-attachmentType
Specifies the type of policy set attachments. (String, optional)
For transitioning users: Even though you can specify the application value for the -attachmentType parameter, use the provider value in place of the application value because the attachments are used for more than just applications, such as system attachments for trust service. For system policy set attachments, specify the provider value for the attachmentType parameter and the "[systemType trustService]" value for the -attachmentProperties parameter. For WSNClient attachments, specify the client value for the attachmentType parameter and the bus and WSNService properties with the -attachmentProperties parameter.
-dynamicClient
Set this parameter to true, the system will not recognize the client resources. This option specifies that the client resources are not validated. (Boolean, optional)
-attachmentProperties
Specifies information that is required to identify the location of the attachment. For WSNClient attachments, specify the attachmentType parameter as client, and use the -attachmentProperties parameter to specify the bus and WSNService properties. For system policy set attachments, specify the attachmentType parameter as provider, and use the -attachmentProperties parameter to set the systemType property value to trustService. If a trust client attachment is specified, the -attachmentProperties parameter contains a systemType property with a value of trustClient. (Properties, optional)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.addToPolicySetAttachment('[-attachmentId 123 -resources  
     "WebService:/webapp1.war:{https://www.ibm.com}myService"]')
  • Using Jython list:
    AdminTask.addToPolicySetAttachment(['-attachmentId', '123', '-resources',  
     '"WebService:/webapp1.war:{https://www.ibm.com}myService"'])

Interactive mode example usage

  • Using Jython:
    AdminTask.addToPolicySetAttachment('-interactive')
Mixed-version environment: In a mixed cell environment, you must not create service reference attachments or resource attachments that are specified in name-value pair format for applications that are deployed on an application server that is prior to Version 8.0. Service reference attachments are only supported on Version 8.0 and later.

In a mixed cell environment, you must not create attachments to policy sets containing CustomProperties policy for applications that are deployed on an application server that is prior to WebSphere Application Server Version 8. The CustomProperties policy is only supported on WebSphere Application Server Version 8.0 and later.

removeFromPolicySetAttachment

The removeFromPolicySetAttachment command removes resources that apply to a policy set attachment.

When administrative security is enabled, verify that you use the correct administrative role, as the following table describes:
Table 4. Administrative roles . This table describes the administrative roles and associated authorization when administrative security is enabled.
Administrative role Authorization
Administrator The Administrator role must have cell-wide access to remove resources from policy set attachments. If you have access to a specific resource only, you can remove resources for which you have access.
Configurator The Configurator role must have cell-wide access to remove resources from policy set attachments. If you have access to a specific resource only, you can remove the resource for which you have access.
Deployer The Deployer role with cell-wide or resource specific access can remove resources from policy set attachments for application resources only.
Operator The Operator role cannot remove resources from policy set attachments.
Monitor The Monitor role cannot remove resources from policy set attachments.

Target object

None.

Required parameters

-attachmentId
Specifies the name of the attachment to remove. (String, required)
-resources
Specifies the names of the application resources to attach to the policy set. (String, required)

Optional parameters

-applicationName
Specifies the name of the application of interest for policy set attachments. For application and client attachments, this parameter is required. This parameter is not required for trust service attachments. (String, optional)
-attachmentType
Specifies the type of policy set attachments. (String, optional)
For transitioning users: Even though you can specify the application value for the -attachmentType parameter, use the provider value in place of the application value because the attachments are used for more than just applications, such as system attachments for trust service. For system policy set attachments, specify the provider value for the attachmentType parameter and the "[systemType trustService]" value for the -attachmentProperties parameter. For WSNClient attachments, specify the client value for the attachmentType parameter and the bus and WSNService properties with the -attachmentProperties parameter.
-attachmentProperties
Specifies information that is required to identify the location of the attachment. For WSNClient attachments, specify the attachmentType parameter as client, and use the -attachmentProperties parameter to specify the bus and WSNService properties. For system policy set attachments, specify the attachmentType parameter as provider, and use the -attachmentProperties parameter to set the systemType property value to trustService. If a trust client attachment is specified, the -attachmentProperties parameter contains a systemType property with a value of trustClient. (Properties, optional)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.removeFromPolicySetAttachment('[-attachmentId 123 -resources  
     "WebService:/webapp1.war:{https://www.ibm.com}myService"]')
  • Using Jython list:
    AdminTask.removeFromPolicySetAttachment(['-attachmentId', '123', '-resources',  
     '"WebService:/webapp1.war:{https://www.ibm.com}myService"'])

Interactive mode example usage

  • Using Jython:
    AdminTask.removeFromPolicySetAttachment('-interactive')

deletePolicySetAttachment

The deletePolicySetAttachment command removes a policy set attachment from an application.

When administrative security is enabled, verify that you use the correct administrative role, as the following table describes:

Table 5. Administrative roles . This table describes the administrative roles and associated authorization when administrative security is enabled.
Administrative role Authorization
Administrator The Administrator role must have cell-wide access to delete policy set attachments. If you have access to a specific resource only, you can delete policy set attachments for the resource for which you have access.
Configurator The Configurator role must have cell-wide access to delete policy set attachments. If you have access to a specific resource only, you can delete policy set attachments for the resource for which you have access.
Deployer The Deployer role with cell-wide or resource specific access can delete policy set attachments for application resources only.
Operator The Operator role cannot delete policy set attachments.
Monitor The Monitor role cannot delete policy set attachments.

Target object

None.

Required parameters

-attachmentId
Specifies the name of the attachment to delete. (String, required)

Optional parameters

-applicationName
Specifies the name of the application of interest for policy set attachments. For application and client attachments, this parameter is required. This parameter is not required for trust service attachments. (String, optional)
-attachmentType
Specifies the type of policy set attachments. (String, optional)
For transitioning users: Even though you can specify the application value for the -attachmentType parameter, use the provider value in place of the application value because the attachments are used for more than just applications, such as system attachments for trust service. For system policy set attachments, specify the provider value for the attachmentType parameter and the "[systemType trustService]" value for the -attachmentProperties parameter. For WSNClient attachments, specify the client value for the attachmentType parameter and the bus and WSNService properties with the -attachmentProperties parameter.
-attachmentProperties
Specifies information that is required to identify the location of the attachment. For WSNClient attachments, specify the attachmentType parameter as client, and use the -attachmentProperties parameter to specify the bus and WSNService properties. For system policy set attachments, specify the attachmentType parameter as provider, and use the -attachmentProperties parameter to set the systemType property value to trustService. If a trust client attachment is specified, the -attachmentProperties parameter contains a systemType property with a value of trustClient. (Properties, optional)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.deletePolicySetAttachment('[-attachmentId 123]')
  • Using Jython list:
    AdminTask.deletePolicySetAttachment(['-attachmentId', '123'])

Interactive mode example usage

  • Using Jython:
    AdminTask.deletePolicySetAttachment('-interactive')

listAssetsAttachedToPolicySet

The listAssetsAttachedToPolicySet command lists the applications or WS-Notification service clients to which a specific policy set is attached.

If administrative security is enabled, each administrative role can list applications that are attached to policy sets.

Target object

None.

Required parameters

-policySet
Specifies the name of the policy set of interest. (String, required)

Optional parameters

-attachmentType
Specifies the type of policy set attachments. The value for this parameter must be provider, client, WSNClient, WSMex, cuProvider, cuClient, binding or all. The default value is all. (String, optional)

Return value

The command returns a list of properties that describe each asset. Each properties object contains the assetType property, which specifies the type of asset.

Batch mode example usage

  • Using Jython string:
    AdminTask.listAssetsAttachedToPolicySet('[-policySet SecureConversation]')
  • Using Jython list:
    AdminTask.listAssetsAttachedToPolicySet(['-policySet', 'SecureConversation'])

Interactive mode example usage

  • Using Jython:
    AdminTask.listAssetsAttachedToPolicySet('-interactive')

listAttachmentsForPolicySet

The listAttachmentsForPolicySet command lists the applications to which a specific policy set is attached.

If administrative security is enabled, each administrative role can query for policy set attachments.

Target object

None.

Required parameters

-policySet
Specifies the name of the policy set of interest. (String, required)

Optional parameters

-attachmentType
Specifies the type of policy set attachments. The value for this parameter must be application, client, or system/trust. The default value is application. (String, optional)

Return value

The command returns a list of application names.

Batch mode example usage

  • Using Jython string:
    AdminTask.listAttachmentsForPolicySet('[-policySet SecureConversation]')
  • Using Jython list:
    AdminTask.listAttachmentsForPolicySet(['-policySet', 'SecureConversation'])

Interactive mode example usage

  • Using Jython:
    AdminTask.listAttachmentsForPolicySet('-interactive')

deleteAttachmentsForPolicySet

The deleteAttachmentsForPolicySet command removes all attachments for a specific policy set.

When administrative security is enabled, verify that you use the correct administrative role, as the following table describes:
Table 6. Administrative roles . This table describes the administrative roles and associated authorization when administrative security is enabled.
Administrative role Authorization
Administrator The Administrator role must have cell-wide access to delete policy set attachments. If you have access to a specific resource only, you can delete policy set attachments for the resource for which you have access.
Configurator The Configurator role must have cell-wide access to delete policy set attachments. If you have access to a specific resource only, you can delete policy set attachments for the resource for which you have access.
Deployer The Deployer role with cell-wide or resource specific access can delete policy set attachments for application resources only.
Operator The Operator role cannot delete policy set attachments.
Monitor The Monitor role cannot delete policy set attachments.

Target object

None.

Required parameters

-policySet
Specifies the name of the policy set from which to remove the attachments. (String, required)

Optional parameters

-applicationName
Specifies the name of the application of interest. The command only deletes attachments for the application of interest if you specify this parameter. (String, optional)
-attachmentProperties
Specifies information that is required to identify the location of the attachment. You can specify values for the bus and WSNService properties. (Properties, optional)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.deleteAttachmentsForPolicySet('[-policySet customSecureConversation  
     -applicationName newApp1]')
  • Using Jython list:
    AdminTask.deleteAttachmentsForPolicySet(['-policySet', 'customSecureConversation',  
     '-applicationName', 'newApp1'])

Interactive mode example usage

  • Using Jython:
    AdminTask.deleteAttachmentsForPolicySet('-interactive')

transferAttachmentsForPolicySet

The transferAttachmentsForPolicySet command transfers all attachments from one policy set to another policy set.

When administrative security is enabled, verify that you use the correct administrative role, as the following table describes:

Table 7. Administrative roles . This table describes the administrative roles and associated authorization when administrative security is enabled.
Administrative role Authorization
Administrator The Administrator role must have cell-wide access to transfer policy set attachments. If you have access to a specific resource only, you can transfer policy set attachments for the resource for which you have access.
Configurator The Configurator role must have cell-wide access to transfer policy set attachments. If you have access to a specific resource only, you can transfer policy set attachments for the resource for which you have access.
Deployer The Deployer role with cell-wide or resource specific access can transfer policy set attachments for application resources only.
Operator The Operator role cannot transfer policy set attachments.
Monitor The Monitor role cannot transfer policy set attachments.

Target object

None.

Required parameters

-sourcePolicySet
Specifies the source policy set from which to copy attachments. (String, required)
-destinationPolicySet
Specifies the name of the policy set to which the attachments are copied. (String, required)

Optional parameters

-applicationName
Specifies the name of the application of interest. The command only transfers attachments for the application of interest if you specify this parameter. (String, optional)
-attachmentProperties
Specifies information that is required to identify the location of the attachment. You can specify values for the bus and WSNService properties. (Properties, optional)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.transferAttachmentsForPolicySet('[-sourcePolicySet SecureConversation 
     -destinationPolicySet customSecureConversation -applicationName newApp1]')
  • Using Jython list:
    AdminTask.transferAttachmentsForPolicySet(['-sourcePolicySet', 'SecureConversation', 
     '-destinationPolicySet', 'customSecureConversation', '-applicationName', 'newApp1'])

Interactive mode example usage

  • Using Jython:
    AdminTask.transferAttachmentsForPolicySet('-interactive')

listSupportedPolicySets

The listSupportedPolicySets command returns a list of supported policy sets to attach to your web services resources. If administrative security is enabled, each user role can use this command.

Target object

None.

Required parameters

-assetProps
Specifies the name of the asset of interest. Specify the name of the application as the value for the application property. (Properties, required)
Supported property and value pairs for the parameter are:
Property Value
application Application name, such as myApplication
WS-Notification service client:
  • bus
  • WSNService
Service client names:
  • Bus name, such as: bus1
  • Service name, such as service1
Trust service resource:
  • systemType
Service resoure name:
  • trustService
SCA business-level application resource:
  • blaName
  • cuName
Resource names:
  • business-level application name, such as myBLA
  • composition unit name, such as compositionUnit1

Return value

The command returns a list of supported policy sets. Each entry in the list is the name of a policy set.

Batch mode example usage

  • Using Jython string:
    AdminTask.listSupportedPolicySets ('[-assetProps [[application myApplication]]]')
  • Using Jython list:
    AdminTask.listSupportedPolicySets (['-assetProps', '[[bus bus1] [WSNService service1]]'])

Interactive mode example usage

  • Using Jython:
    AdminTask.listSupportedPolicySets('-interactive')

getBinding

The getBinding command returns the binding configuration for a specified policy and scope. You can use the getBinding command to return a list of available custom bindings, which includes bindings that are and are not referenced by attachments.

If administrative security is enabled, each administrative role can query for binding configuration information.

For transitioning users: In WebSphere Application Server Version 7.0 and later, the security model was enhanced to a domain-centric security model instead of a server-based security model. The configuration of the default global security (cell) level and default server level bindings has also changed in this version of the product. In the WebSphere Application Server Version 6.1 Feature Pack for Web Services, you can configure one set of default bindings for the cell and optionally configure one set of default bindings for each server. In Version 7.0 and later, you can configure one or more general service provider bindings and one or more general service client bindings. After you have configured general bindings, you can specify which of these bindings is the global default binding. You can also optionally specify general binding that are used as the default for an application server or a security domain.

To support a mixed-cell environment, WebSphere Application Server supports Version 7.0 and Version 6.1 bindings. General cell-level bindings are specific to Version 7.0 and later Application-specific bindings remain at the version that the application requires. When the user creates an application-specific binding, the application server determines the required binding version to use for application.

Target object

None.

Required parameters

-policyType
Specifies the policy of interest. (String, required)
-bindingLocation
Specifies the location of the binding. (Properties, required)
Specify the bindingLocation parameter as a properties object following these guidelines:
  • For WebSphere Application Server Version 7.0 and later server default bindings, specify a null or empty properties. Use the bindingName parameter to identify the binding location.
  • For attachment-specific bindings, specify the application name and attachment ID in the properties. The property names are application and attachmentId.
  • For WSNClient bindings, specify the bus name, service name, and attachment ID in the properties. The property names are bus, WSNService, and attachmentId. If you specify an asterisk character (*) as the attachment ID, then the command returns the list of binding names that corresponds to the attachment type of interest.
  • For system/trust bindings, specify the systemType property as trustService.

Optional parameters

-attachmentType
Specifies the type of policy set attachment. Use this parameter to distinguish between types of attachment custom bindings. (String, optional)
For transitioning users: Even though you can specify the application value for the -attachmentType parameter, use the provider value in place of the application value because the attachments are used for more than just applications, such as system attachments for trust service. For system policy set attachments, specify the provider value for the attachmentType parameter and the "[systemType trustService]" value for the -attachmentProperties parameter. For WSNClient attachments, specify the client value for the attachmentType parameter and the bus and WSNService properties with the -attachmentProperties parameter.
-attributes
Specifies the names of the attributes to return. If this parameter is not specified, the command returns all attributes. (String, optional)
-bindingName
Specifies the binding name of interest. Specify this parameter to display a general cell-level binding or a custom attachment binding. (String, optional)

Return value

The command returns a properties object that contains the requested configuration attributes for the policy binding.

Batch mode example usage

  • Using Jython string:
    The following example returns a list of application bindings:
    AdminTask.getBinding('[-policyType WSAddressing -attachmentType provider 
     -bindingLocation [[application application_name] [attachmentId *]]]')
    The following example returns a list of client bindings:
    AdminTask.getBinding('[-policyType WSAddressing -attachmentType client 
     -bindingLocation [[application application_name] [attachmentId *]]]')
    The following example returns a list of system bindings:
    AdminTask.getBinding('[-policyType WSAddressing -attachmentType provider 
     -bindingLocation [[systemType trustService] [application application_name] [attachmentId *]]]')
  • Using Jython list:
    AdminTask.getBinding(['-policyType', 'WSAddressing', '-bindingLocation', '""'])

Interactive mode example usage

  • Using Jython:
    AdminTask.getBinding('-interactive')

setBinding

The setBinding command updates the binding configuration for a specified policy. Use this command to add a server-specific binding, update an attachment to use a custom binding, edit binding attributes, or to remove a binding configuration.

When administrative security is enabled, verify that you use the correct administrative role, as the following table describes:

Table 8. Administrative roles . This table describes the administrative roles and associated authorization when administrative security is enabled.
Administrative role Authorization
Administrator The Administrator role must have cell-wide access to configure bindings. If you have access to a specific resource only, you can configure custom bindings for the resource for which you have access. The Administrator role is the only role that can modify binding configurations.
Configurator The Configurator role must have cell-wide access to assign and unassign bindings. If you have access to a specific resource only, you can assign and unassign bindings for the resource for which you have access.
Deployer The Deployer role with cell-wide or resource specific access can assign or unassign bindings for application resources only.
Operator The Operator role cannot configure bindings.
Monitor The Monitor role cannot configure bindings.
For transitioning users: In WebSphere Application Server Version 7.0 and later, the security model was enhanced to a domain-centric security model instead of a server-based security model. The configuration of the default global security (cell) level and default server level bindings has also changed in this version of the product. In the WebSphere Application Server Version 6.1 Feature Pack for Web Services, you can configure one set of default bindings for the cell and optionally configure one set of default bindings for each server. In Version 7.0 and later, you can configure one or more general service provider bindings and one or more general service client bindings. After you have configured general bindings, you can specify which of these bindings is the global default binding. You can also optionally specify general binding that are used as the default for an application server or a security domain.

To support a mixed-cell environment, WebSphere Application Server supports Version 7.0 and Version 6.1 bindings. General cell-level bindings are specific to Version 7.0 and later Application-specific bindings remain at the version that the application requires. When the user creates an application-specific binding, the application server determines the required binding version to use for application.

Target object

None.

Required parameters

-bindingLocation
Specifies the location of the binding. (Properties, required)
Specify the bindingLocation parameter as a properties object following these guidelines:
  • For WebSphere Application Server Version 7.0 and later server default bindings, specify a null or empty properties. Use the bindingName parameter to identify the binding location.
  • For attachment-specific, specify the application name and attachment ID in the properties. The property names are application and attachmentId.
  • For WSNClient bindings, specify the bus name, service name, and attachment ID in the properties. The property names are bus, WSNService, and attachmentId. If you specify an asterisk character (*) as the attachment ID, then the command returns the list of binding names that corresponds to the attachment type of interest.
  • For system/trust bindings, set the systemType property as trustService.
-policyType
Specifies the policy of interest. (String, required)

Optional parameters

-attachmentType
Specifies the type of policy set attachment. Use this parameter to distinguish between types of attachment custom bindings. (String, optional)
For transitioning users: Even though you can specify the application value for the -attachmentType parameter, use the provider value in place of the application value because the attachments are used for more than just applications, such as system attachments for trust service. For system policy set attachments, specify the provider value for the attachmentType parameter and the "[systemType trustService]" value for the -attachmentProperties parameter. For WSNClient attachments, specify the client value for the attachmentType parameter and the bus and WSNService properties with the -attachmentProperties parameter.
-attributes
Specifies the attribute values to update. This parameter can include all binding attributes for the policy or a subset to update. If the attributes parameter is not specified, the command only updates the binding location used by the specified attachment. (Properties, optional)
-bindingName
Specifies the name for the binding. Specify this parameter to assign a new name to an attachment binding or cell-level binding. A name is generated if it is not specified. (String, optional)
-domainName
Specifies the domain name for the binding. This parameter is required when using the command to create and scope a binding to a specific domain other than the administrative security domain. The default value is global. (String, optional)
-replace
Specifies whether to replace all of the existing binding attributes with the attributes specified in the command. Use this parameter to remove optional parts of the configuration for policies with complex data. The default value is false. (Boolean, optional)
-remove
Specifies whether to remove a server-specific default binding or to remove a custom binding from an attachment. You cannot remove cell-level default binding. The default value is false. (Boolean, optional)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.setBinding('[-policyType WSAddressing -bindingLocation [[application myApplication] 
    [attachmentId 123]] -attributes "[preventWLM false]"
     -attachmentType provider]')
  • Using Jython list:
    AdminTask.setBinding(['-policyType', 'WSAddressing', '-bindingLocation', '[[application myApplication]
     [attachmentId 123]]', '-attributes', '[preventWLM
     false]', '-attachmentType', 'provider'])

Interactive mode example usage

  • Using Jython:
    AdminTask.setBinding('-interactive')

getDefaultBindings

The getDefaultBindings command displays the provider and client default bindings if the bindings are set. If the command does not return output, then the system default binding is the current default.

If administrative security is enabled, each administrative role can query for default bindings.

Target object

None.

Optional parameters

-bindingLocation
Specifies the location of the binding. Specify the bindingLocation parameter as a properties object with values for the node and server properties. (Properties, optional)
-domainName
Specifies the domain name for the binding of interest. This parameter is required if the domain of interest is not in the global security domain and you did not specify the bindingLocation parameter. The bindingLocation and domainName parameters are mutually exclusive. The default value is global. (String, optional)

Return value

The command returns a properties object that contains the names of the provider and client default bindings, if the bindings are set.

Batch mode example usage

  • Using Jython string:
    AdminTask.getDefaultBindings('[-bindingLocation [[node myNode] [server myServer]]]')
  • Using Jython list:
    AdminTask.getDefaultBindings(['-bindingLocation', '[[node myNode] [server myServer]]'])

Interactive mode example usage

  • Using Jython:
    AdminTask.getDefaultBindings('-interactive')

getRequiredBindingVersion

The getRequiredBindingVersion command displays the version number of the binding for a specific application.

Target object

None.

Optional parameters

-assetProps
Specifies the name of the application of interest. (Properties, optional)

Return value

The command returns the binding version number as a number, such as 7.0.0.0 or 6.1.0.0.

Batch mode example usage

  • Using Jython string:
    AdminTask.getRequiredBindingVersion('[-assetProps [[application myApplication]]]')
  • Using Jython list:
    AdminTask.getRequiredBindingVersion(['-assetProps', '[[application myApplication]]'])

Interactive mode example usage

  • Using Jython:
    AdminTask.getRequiredBindingVersion('-interactive')

setDefaultBindings

The setDefaultBindings command to set a binding as the default binding.

If administrative security is enabled, you must use the Administrator role with cell-wide access to configure bindings. If you use the Administrator role and do not have cell-wide access, you can only configure bindings on resources for which you have access.

Target object

None.

Required parameters

-defaultBindings
Specifies the names of the default bindings for the provider, client, or both. (Properties, required)

Optional parameters

-bindingLocation
Specifies the location of the binding. Specify the bindingLocation parameter as a properties object with values for the node and server properties. (Properties, optional)
-domainName
Specifies the domain name for the binding of interest. This parameter is required if the domain of interest is not in the global security domain and you did not specify the bindingLocation parameter. The bindingLocation and domainName parameters are mutually exclusive. The default value is global. (String, optional)

Return value

The command returns a value of true if the command successfully sets the default binding.

Batch mode example usage

  • Using Jython string:
    AdminTask.setDefaultBindings('[-defaultBindings [[provider myDefaultProviderBinding] 
    [client myDefaultClientBinding]] -bindingLocation [[node myNode] [server myServer]]]')
  • Using Jython list:
    AdminTask.setDefaultBindings(['-defaultBindings', '[[provider myDefaultProviderBinding'
     [client myDefaultClientBinding]]', '-bindingLocation', '[[node 
     myNode] [server myServer]]'])

Interactive mode example usage

  • Using Jython:
    AdminTask.setDefaultBindings('-interactive')

exportBinding

The exportBinding command export a general, cell-level binding to an archive file. You can copy this file to a client environment or import the archive to a server environment.

If administrative security is enabled, you must use the Administrator role with cell-wide access to export bindings.

Target object

None.

Required parameters

-bindingName
Specifies the name of the binding to assign as the default binding. If you do not specify this parameter, the system specifies the system default as the default binding. (String, required)
-pathName
Specifies the file path for the archive file to create. (String, required)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.exportBinding('[-bindingName myDefaultBinding -pathName 
     C:/IBM/WebSphere/AppServer/PolicySets/Bindings/]')
  • Using Jython list:
    AdminTask.exportBinding(['-bindingName', 'myDefaultBinding', '-pathName', 
     'C:/IBM/WebSphere/AppServer/PolicySets/Bindings/'])

Interactive mode example usage

  • Using Jython:
    AdminTask.exportBinding('-interactive')

importBinding

The importBinding command imports a general, cell-level binding from a compressed archive file to a server environment.

If administrative security is enabled, you must use the Administrator role with cell-wide access to import bindings.

Target object

None.

Required parameters

-pathName
Specifies the file path for the archive file to import. (String, required)

Optional parameters

-bindingName
Specifies the name of the binding to assign as the imported binding. If you do not specify this parameter, the system specifies the binding name in the archive file. (String, optional)
-domainName
Specifies a new name of the domain of the binding to import. If you do not specify this parameter, the command uses the domain specified in the archive file. (String, optional)
-verifyBindingType
Verifies that the type of binding to import matches a specific binding type. Specify provider to verify that the binding to import is a provider binding, or specify client to verify that it is a client binding. (String, optional)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.importBinding('[-bindingName myDefaultBinding -pathName 
     C:/IBM/WebSphere/AppServer/PolicySets/Bindings/myBinding.ear]')
  • Using Jython list:
    AdminTask.importBinding(['-bindingName', 'myDefaultBinding', '-pathName', 
     'C:/IBM/WebSphere/AppServer/PolicySets/Bindings/myBinding.ear'])

Interactive mode example usage

  • Using Jython:
    AdminTask.importBinding('-interactive')

copyBinding

The copyBinding command creates a new general, cell-level binding from an existing binding.

If administrative security is enabled, you must use the Administrator role with cell-wide access to copy bindings.

Target object

None.

Required parameters

-sourceBinding
Specifies the name of the existing binding that the system uses to create the new binding. (String, required)
-newBinding
Specifies the name of the binding to create. (String, required)

Optional parameters

-newDescription
Specifies the description text for the new binding. (String, optional)
-domainName
Specifies the domain name for the binding. This parameter is only required if you scope the binding to a domain other than the domain of the source binding. (String, optional)

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.copyBinding('[-sourceBinding mySourceBinding -newBinding mySourceCopyBinding]')
  • Using Jython list:
    AdminTask.copyBinding(['-sourceBinding', 'mySourceBinding', '-newBinding', 
     'mySourceCopyBinding'])

Interactive mode example usage

  • Using Jython list:
    AdminTask.copyBinding('-interactive')

upgradeBindings

The upgradeBindings command upgrades application bindings for a specific asset to the latest version.

If administrative security is enabled, you must use the Administrator role with cell-wide access to import bindings.

Target object

None.

Required parameters

-assetProps
Specifies the name of the asset of interest. Specify the name of the application as the value for the application property. (Properties, required)

Optional parameters

None

Return value

The command returns a success or failure message.

Batch mode example usage

  • Using Jython string:
    AdminTask.upgradeBindings('[-assetProps [[application myApplication]]]')
  • Using Jython list:
    AdminTask.upgradeBindings(['-assetProps', '[[application myApplication]]'])

Interactive mode example usage

  • Using Jython:
    AdminTask.upgradeBindings('-interactive')