/AWS1/IF_GRF=>UPDATEWORKSPACE()¶
About UpdateWorkspace¶
Modifies an existing Amazon Managed Grafana workspace. If you use this operation and omit any optional parameters, the existing values of those parameters are not changed.
To modify the user authentication methods that the workspace uses, such as SAML or IAM Identity Center, use UpdateWorkspaceAuthentication.
To modify which users in the workspace have the Admin and
Editor Grafana roles, use UpdatePermissions.
Method Signature¶
METHODS /AWS1/IF_GRF~UPDATEWORKSPACE
IMPORTING
!IV_ACCOUNTACCESSTYPE TYPE /AWS1/GRFACCOUNTACCESSTYPE OPTIONAL
!IV_ORGANIZATIONROLENAME TYPE /AWS1/GRFORGANIZATIONROLENAME OPTIONAL
!IV_PERMISSIONTYPE TYPE /AWS1/GRFPERMISSIONTYPE OPTIONAL
!IV_STACKSETNAME TYPE /AWS1/GRFSTACKSETNAME OPTIONAL
!IT_WORKSPACEDATASOURCES TYPE /AWS1/CL_GRFDATASRCTYPESLIST_W=>TT_DATASOURCETYPESLIST OPTIONAL
!IV_WORKSPACEDESCRIPTION TYPE /AWS1/GRFDESCRIPTION OPTIONAL
!IV_WORKSPACEID TYPE /AWS1/GRFWORKSPACEID OPTIONAL
!IV_WORKSPACENAME TYPE /AWS1/GRFWORKSPACENAME OPTIONAL
!IT_WORKSPACENOTIFDSTS TYPE /AWS1/CL_GRFNOTIFDSTSLIST_W=>TT_NOTIFDESTINATIONSLIST OPTIONAL
!IT_WORKSPACEORGALUNITS TYPE /AWS1/CL_GRFORGALUNITLIST_W=>TT_ORGANIZATIONALUNITLIST OPTIONAL
!IV_WORKSPACEROLEARN TYPE /AWS1/GRFIAMROLEARN OPTIONAL
!IO_VPCCONFIGURATION TYPE REF TO /AWS1/CL_GRFVPCCONFIGURATION OPTIONAL
!IV_REMOVEVPCCONFIGURATION TYPE /AWS1/GRFBOOLEAN OPTIONAL
!IO_NETWORKACCESSCONTROL TYPE REF TO /AWS1/CL_GRFNETWORKACCESSCONF OPTIONAL
!IV_REMOVENETWORKACCESSCONF TYPE /AWS1/GRFBOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_grfupdateworkspacersp
RAISING
/AWS1/CX_GRFACCESSDENIEDEX
/AWS1/CX_GRFCONFLICTEXCEPTION
/AWS1/CX_GRFINTERNALSERVEREX
/AWS1/CX_GRFRESOURCENOTFOUNDEX
/AWS1/CX_GRFTHROTTLINGEX
/AWS1/CX_GRFVALIDATIONEX
/AWS1/CX_GRFCLIENTEXC
/AWS1/CX_GRFSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_workspaceid TYPE /AWS1/GRFWORKSPACEID /AWS1/GRFWORKSPACEID¶
The ID of the workspace to update.
Optional arguments:¶
iv_accountaccesstype TYPE /AWS1/GRFACCOUNTACCESSTYPE /AWS1/GRFACCOUNTACCESSTYPE¶
Specifies whether the workspace can access Amazon Web Services resources in this Amazon Web Services account only, or whether it can also access Amazon Web Services resources in other accounts in the same organization. If you specify
ORGANIZATION, you must specify which organizational units the workspace can access in theworkspaceOrganizationalUnitsparameter.
iv_organizationrolename TYPE /AWS1/GRFORGANIZATIONROLENAME /AWS1/GRFORGANIZATIONROLENAME¶
The name of an IAM role that already exists to use to access resources through Organizations. This can only be used with a workspace that has the
permissionTypeset toCUSTOMER_MANAGED.
iv_permissiontype TYPE /AWS1/GRFPERMISSIONTYPE /AWS1/GRFPERMISSIONTYPE¶
Use this parameter if you want to change a workspace from
SERVICE_MANAGEDtoCUSTOMER_MANAGED. This allows you to manage the permissions that the workspace uses to access datasources and notification channels. If the workspace is in a member Amazon Web Services account of an organization, and that account is not a delegated administrator account, and you want the workspace to access data sources in other Amazon Web Services accounts in the organization, you must chooseCUSTOMER_MANAGED.If you specify this as
CUSTOMER_MANAGED, you must also specify aworkspaceRoleArnthat the workspace will use for accessing Amazon Web Services resources.For more information on the role and permissions needed, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels
Do not use this to convert a
CUSTOMER_MANAGEDworkspace toSERVICE_MANAGED. Do not include this parameter if you want to leave the workspace asSERVICE_MANAGED.You can convert a
CUSTOMER_MANAGEDworkspace toSERVICE_MANAGEDusing the Amazon Managed Grafana console. For more information, see Managing permissions for data sources and notification channels.
iv_stacksetname TYPE /AWS1/GRFSTACKSETNAME /AWS1/GRFSTACKSETNAME¶
The name of the CloudFormation stack set to use to generate IAM roles to be used for this workspace.
it_workspacedatasources TYPE /AWS1/CL_GRFDATASRCTYPESLIST_W=>TT_DATASOURCETYPESLIST TT_DATASOURCETYPESLIST¶
This parameter is for internal use only, and should not be used.
iv_workspacedescription TYPE /AWS1/GRFDESCRIPTION /AWS1/GRFDESCRIPTION¶
A description for the workspace. This is used only to help you identify this workspace.
iv_workspacename TYPE /AWS1/GRFWORKSPACENAME /AWS1/GRFWORKSPACENAME¶
A new name for the workspace to update.
it_workspacenotifdsts TYPE /AWS1/CL_GRFNOTIFDSTSLIST_W=>TT_NOTIFDESTINATIONSLIST TT_NOTIFDESTINATIONSLIST¶
Specify the Amazon Web Services notification channels that you plan to use in this workspace. Specifying these data sources here enables Amazon Managed Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to use these channels.
it_workspaceorgalunits TYPE /AWS1/CL_GRFORGALUNITLIST_W=>TT_ORGANIZATIONALUNITLIST TT_ORGANIZATIONALUNITLIST¶
Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.
iv_workspacerolearn TYPE /AWS1/GRFIAMROLEARN /AWS1/GRFIAMROLEARN¶
Specifies an IAM role that grants permissions to Amazon Web Services resources that the workspace accesses, such as data sources and notification channels. If this workspace has
permissionTypeCUSTOMER_MANAGED, then this role is required.
io_vpcconfiguration TYPE REF TO /AWS1/CL_GRFVPCCONFIGURATION /AWS1/CL_GRFVPCCONFIGURATION¶
The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.
iv_removevpcconfiguration TYPE /AWS1/GRFBOOLEAN /AWS1/GRFBOOLEAN¶
Whether to remove the VPC configuration from the workspace.
Setting this to
trueand providing avpcConfigurationto set will return an error.
io_networkaccesscontrol TYPE REF TO /AWS1/CL_GRFNETWORKACCESSCONF /AWS1/CL_GRFNETWORKACCESSCONF¶
The configuration settings for network access to your workspace.
When this is configured, only listed IP addresses and VPC endpoints will be able to access your workspace. Standard Grafana authentication and authorization will still be required.
If this is not configured, or is removed, then all IP addresses and VPC endpoints will be allowed. Standard Grafana authentication and authorization will still be required.
iv_removenetworkaccessconf TYPE /AWS1/GRFBOOLEAN /AWS1/GRFBOOLEAN¶
Whether to remove the network access configuration from the workspace.
Setting this to
trueand providing anetworkAccessControlto set will return an error.If you remove this configuration by setting this to
true, then all IP addresses and VPC endpoints will be allowed. Standard Grafana authentication and authorization will still be required.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_grfupdateworkspacersp /AWS1/CL_GRFUPDATEWORKSPACERSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->updateworkspace(
io_networkaccesscontrol = new /aws1/cl_grfnetworkaccessconf(
it_prefixlistids = VALUE /aws1/cl_grfprefixlistids_w=>tt_prefixlistids(
( new /aws1/cl_grfprefixlistids_w( |string| ) )
)
it_vpceids = VALUE /aws1/cl_grfvpceids_w=>tt_vpceids(
( new /aws1/cl_grfvpceids_w( |string| ) )
)
)
io_vpcconfiguration = new /aws1/cl_grfvpcconfiguration(
it_securitygroupids = VALUE /aws1/cl_grfsecuritygroupids_w=>tt_securitygroupids(
( new /aws1/cl_grfsecuritygroupids_w( |string| ) )
)
it_subnetids = VALUE /aws1/cl_grfsubnetids_w=>tt_subnetids(
( new /aws1/cl_grfsubnetids_w( |string| ) )
)
)
it_workspacedatasources = VALUE /aws1/cl_grfdatasrctypeslist_w=>tt_datasourcetypeslist(
( new /aws1/cl_grfdatasrctypeslist_w( |string| ) )
)
it_workspacenotifdsts = VALUE /aws1/cl_grfnotifdstslist_w=>tt_notifdestinationslist(
( new /aws1/cl_grfnotifdstslist_w( |string| ) )
)
it_workspaceorgalunits = VALUE /aws1/cl_grforgalunitlist_w=>tt_organizationalunitlist(
( new /aws1/cl_grforgalunitlist_w( |string| ) )
)
iv_accountaccesstype = |string|
iv_organizationrolename = |string|
iv_permissiontype = |string|
iv_removenetworkaccessconf = ABAP_TRUE
iv_removevpcconfiguration = ABAP_TRUE
iv_stacksetname = |string|
iv_workspacedescription = |string|
iv_workspaceid = |string|
iv_workspacename = |string|
iv_workspacerolearn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_workspacedescription = lo_result->get_workspace( ).
IF lo_workspacedescription IS NOT INITIAL.
lv_accountaccesstype = lo_workspacedescription->get_accountaccesstype( ).
lv_timestamp = lo_workspacedescription->get_created( ).
LOOP AT lo_workspacedescription->get_datasources( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_datasourcetype = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_description = lo_workspacedescription->get_description( ).
lv_endpoint = lo_workspacedescription->get_endpoint( ).
lv_grafanaversion = lo_workspacedescription->get_grafanaversion( ).
lv_workspaceid = lo_workspacedescription->get_id( ).
lv_timestamp = lo_workspacedescription->get_modified( ).
lv_workspacename = lo_workspacedescription->get_name( ).
lv_organizationrolename = lo_workspacedescription->get_organizationrolename( ).
LOOP AT lo_workspacedescription->get_notificationdestinations( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_notificationdestination = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_workspacedescription->get_organizationalunits( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_organizationalunit = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_permissiontype = lo_workspacedescription->get_permissiontype( ).
lv_stacksetname = lo_workspacedescription->get_stacksetname( ).
lv_workspacestatus = lo_workspacedescription->get_status( ).
lv_iamrolearn = lo_workspacedescription->get_workspacerolearn( ).
lv_licensetype = lo_workspacedescription->get_licensetype( ).
lv_boolean = lo_workspacedescription->get_freetrialconsumed( ).
lv_timestamp = lo_workspacedescription->get_licenseexpiration( ).
lv_timestamp = lo_workspacedescription->get_freetrialexpiration( ).
lo_authenticationsummary = lo_workspacedescription->get_authentication( ).
IF lo_authenticationsummary IS NOT INITIAL.
LOOP AT lo_authenticationsummary->get_providers( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_authenticationprovidert = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
lv_samlconfigurationstatus = lo_authenticationsummary->get_samlconfigurationstatus( ).
ENDIF.
LOOP AT lo_workspacedescription->get_tags( ) into ls_row_8.
lv_key = ls_row_8-key.
lo_value = ls_row_8-value.
IF lo_value IS NOT INITIAL.
lv_tagvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lo_vpcconfiguration = lo_workspacedescription->get_vpcconfiguration( ).
IF lo_vpcconfiguration IS NOT INITIAL.
LOOP AT lo_vpcconfiguration->get_securitygroupids( ) into lo_row_9.
lo_row_10 = lo_row_9.
IF lo_row_10 IS NOT INITIAL.
lv_securitygroupid = lo_row_10->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_vpcconfiguration->get_subnetids( ) into lo_row_11.
lo_row_12 = lo_row_11.
IF lo_row_12 IS NOT INITIAL.
lv_subnetid = lo_row_12->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_networkaccessconfigurat = lo_workspacedescription->get_networkaccesscontrol( ).
IF lo_networkaccessconfigurat IS NOT INITIAL.
LOOP AT lo_networkaccessconfigurat->get_prefixlistids( ) into lo_row_13.
lo_row_14 = lo_row_13.
IF lo_row_14 IS NOT INITIAL.
lv_prefixlistid = lo_row_14->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_networkaccessconfigurat->get_vpceids( ) into lo_row_15.
lo_row_16 = lo_row_15.
IF lo_row_16 IS NOT INITIAL.
lv_vpceid = lo_row_16->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_grafanatoken = lo_workspacedescription->get_grafanatoken( ).
ENDIF.
ENDIF.